Skip to content

Commit

Permalink
CMSIS-DAPv2: blink LED on bulk interface activity
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrossard authored and mathias-arm committed Mar 17, 2023
1 parent 64cf6e8 commit 71c0378
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/usb/bulk/usbd_bulk.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include "usb_for_lib.h"
#include "util.h"
#include "DAP_queue.h"
#include "daplink.h"
#include DAPLINK_MAIN_HEADER

static U8 *ptrDataIn;
static U16 DataInReceLen;
Expand Down Expand Up @@ -76,6 +78,7 @@ void USBD_BULK_EP_BULKOUT_Event(U32 event)
if ((DataInReceLen >= USBD_Bulk_BulkBufSize) ||
(bytes_rece < usbd_bulk_maxpacketsize[USBD_HighSpeed])) {
if (DAP_queue_execute_buf(&DAP_Cmd_queue, USBD_Bulk_BulkOutBuf, DataInReceLen, &rbuf)) {
main_blink_hid_led(MAIN_LED_FLASH);
//Trigger the BULKIn for the reply
if (USB_ResponseIdle) {
USBD_BULK_EP_BULKIN_Event(0);
Expand Down

0 comments on commit 71c0378

Please sign in to comment.