remove device CDC debug

This commit is contained in:
2025-08-17 17:18:27 -04:00
parent 8a8ec23d87
commit 5b3a5beb32
6 changed files with 15 additions and 13 deletions
+1 -1
View File
@@ -1 +1 @@
/build/**/*
/*/**/*
+2 -2
View File
@@ -15,7 +15,7 @@ target_sources(${PROJECT} PRIVATE
bt_device.c
hid_report.c
main.c
usb_descriptors.c
#usb_descriptors.c
usb_device.c
usb_host.c
)
@@ -38,7 +38,7 @@ target_link_libraries(${PROJECT} PRIVATE
pico_pio_usb
pico_stdlib
tinyusb_board
tinyusb_device
#tinyusb_device
tinyusb_host
tinyusb_pico_pio_usb
)
-3
View File
@@ -45,9 +45,6 @@ const uint8_t adv_data_len = sizeof(adv_data);
static void bt_hid_setup(void);
static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);
//extern uint8_t desc_hid_report[];
//extern uint16_t desc_hid_report_len;
// start BTstack
void btstack_main(void){
bt_hid_setup();
+3 -3
View File
@@ -27,7 +27,7 @@ int main(void) {
usb_host_init();
// init and run usb device
usb_device_init();
//usb_device_init();
while (true) {
switch ( get_host_state() ) {
@@ -64,8 +64,8 @@ int main(void) {
break;
}
tuh_task(); // tinyusb host task
tud_task(); // tinyusb device task
tud_cdc_write_flush();
//tud_task(); // tinyusb device task
//tud_cdc_write_flush();
}
return 0;
+2 -1
View File
@@ -39,7 +39,8 @@
#endif
// Enable device stack
#define CFG_TUD_ENABLED 1
//#define CFG_TUD_ENABLED 1
#define CFG_TUD_ENABLED 0
// Enable host stack
#define CFG_TUH_ENABLED 1
+7 -3
View File
@@ -44,18 +44,22 @@ uint16_t tud_hid_get_report_cb(uint8_t instance, uint8_t report_id, hid_report_t
// print message to CDC in raw hex
void cdc_print_hex(uint8_t const* msg, uint16_t msg_len) {
char tempbuf[8];
(void) msg;
(void) msg_len;
/*char tempbuf[8];
size_t count;
for (int i=0; i<msg_len; i++) {
count=sprintf(tempbuf, "%02X ", msg[i]);
tud_cdc_write(tempbuf, count);
}
tud_cdc_write_str("\n");
tud_cdc_write_str("\n");*/
}
// print text message to CDC
void cdc_print_str(char const* msg, uint16_t msg_len) {
tud_cdc_write(msg, msg_len);
(void) msg;
(void) msg_len;
//tud_cdc_write(msg, msg_len);
}
void cdc_print_msg(char const* msg) {