Skip to content

Commit

Permalink
usb-glue: add flush
Browse files Browse the repository at this point in the history
  • Loading branch information
DrZlo13 committed Jun 5, 2024
1 parent ff7f7b8 commit 9b4f186
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 127 deletions.
9 changes: 6 additions & 3 deletions components/usbglue/drivers/usb-glue.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <tusb.h>
#include <esp_mac.h>
#include <esp_log.h>

#include "dap-link/dap-link-descriptors.h"
#include "dual-cdc/dual-cdc-descriptors.h"
Expand Down Expand Up @@ -249,9 +250,8 @@ void tud_cdc_line_coding_cb(uint8_t interface, cdc_line_coding_t const* p_line_c
#include <esp_log.h>
#include <esp_check.h>


#define GPIO_FUNC_IN_HIGH 0x38
#define GPIO_FUNC_IN_LOW 0x3C
#define GPIO_FUNC_IN_HIGH 0x38
#define GPIO_FUNC_IN_LOW 0x3C

static void usb_hal_init_pins(usb_hal_context_t* usb) {
/* usb_periph_iopins currently configures USB_OTG as USB Device.
Expand Down Expand Up @@ -449,6 +449,9 @@ size_t usb_glue_gdb_receive(uint8_t* buf, size_t len) {
void usb_glue_dap_send(const uint8_t* buf, size_t len, bool flush) {
if(usb_device_type == USBDeviceTypeDapLink) {
tud_vendor_write(buf, len);
if(flush) {
tud_vendor_write_flush();
}
} else {
esp_system_abort("Wrong USB device type");
}
Expand Down
12 changes: 6 additions & 6 deletions dependencies.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
dependencies:
espressif/mdns:
component_hash: 46ee81d32fbf850462d8af1e83303389602f6a6a9eddd2a55104cb4c063858ed
component_hash: 31117d76cae83a6d83ffd7f035f6fdae5bd05b914fc30b641afeb208b84de19a
source:
service_url: https://api.components.espressif.com/
type: service
version: 1.1.0
version: 1.3.2
espressif/tinyusb:
component_hash: 68e971ee08d20180b1a092e5ee727877a3b3d8c815fde0a91fc6fdff06d41ead
component_hash: 256fd8aee92ae9f1014538b8601508907a2da386b64f6d42f35a67f9288d1b20
source:
service_url: https://api.components.espressif.com/
type: service
version: 0.14.3
version: 0.15.0~9
idf:
component_hash: null
source:
type: idf
version: 5.0.2
manifest_hash: c64f6ab4afe7b51976719443799f4b2bed8d651d0bd98b9fc4ed18e4c4647f17
version: 5.0.0
manifest_hash: 04b3564edaaf5e6104c57c153c7731c16711f464deb0b5ef2fd604b5c46a79bc
target: esp32s2
version: 1.0.0
Loading

0 comments on commit 9b4f186

Please sign in to comment.