diff --git a/.gitignore b/.gitignore index a5f1b11..0eb1179 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/build/**/* +/*/**/* diff --git a/CMakeLists.txt b/CMakeLists.txt index d886277..511826c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 ) diff --git a/bt_device.c b/bt_device.c index a2557e2..fe728a2 100644 --- a/bt_device.c +++ b/bt_device.c @@ -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(); diff --git a/main.c b/main.c index c0695b4..3a40cc8 100644 --- a/main.c +++ b/main.c @@ -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; diff --git a/tusb_config.h b/tusb_config.h index 48266f1..3d997b0 100644 --- a/tusb_config.h +++ b/tusb_config.h @@ -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 diff --git a/usb_device.c b/usb_device.c index fb8c34d..5e85e82 100644 --- a/usb_device.c +++ b/usb_device.c @@ -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