diff options
| author | hathach <[email protected]> | 2020-05-19 00:55:43 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2020-05-19 00:55:43 +0700 |
| commit | 58cedf4c061fbf9f95cd88cafb6e581fc04549ff (patch) | |
| tree | 3a8d0855fd69d45501750c93ff8072c17d575b3e /examples/host/cdc_msc_hid/src/main.c | |
| parent | 905a80d1b2de5e8ad67b3687ffd0543d90ac904e (diff) | |
usb0 host on mcb1800 work with fullspeed mode.
use usbh_edpt_open() to correctly map ep2drv[]
Diffstat (limited to 'examples/host/cdc_msc_hid/src/main.c')
| -rw-r--r-- | examples/host/cdc_msc_hid/src/main.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/examples/host/cdc_msc_hid/src/main.c b/examples/host/cdc_msc_hid/src/main.c index 6f5df1250..273c95c77 100644 --- a/examples/host/cdc_msc_hid/src/main.c +++ b/examples/host/cdc_msc_hid/src/main.c @@ -75,7 +75,7 @@ CFG_TUSB_MEM_SECTION static char serial_in_buffer[64] = { 0 }; void tuh_mount_cb(uint8_t dev_addr) { // application set-up - printf("\na CDC device (address %d) is mounted\n", dev_addr); + printf("\na device with address %d is mounted\n", dev_addr); tuh_cdc_receive(dev_addr, serial_in_buffer, sizeof(serial_in_buffer), true); // schedule first transfer } @@ -83,7 +83,7 @@ void tuh_mount_cb(uint8_t dev_addr) void tuh_umount_cb(uint8_t dev_addr) { // application tear-down - printf("\na CDC device (address %d) is unmounted \n", dev_addr); + printf("\na device with address %d is unmounted \n", dev_addr); } // invoked ISR context @@ -195,8 +195,15 @@ void print_greeting(void) printf("This Host demo is configured to support:\r\n"); printf(" - RTOS = %s\n", rtos_name[CFG_TUSB_OS]); -// if (CFG_TUH_CDC ) puts(" - Communication Device Class"); -// if (CFG_TUH_MSC ) puts(" - Mass Storage"); + +#if CFG_TUH_CDC + printf(" - Communication Device Class\r\n"); +#endif + +#if CFG_TUH_MSC + printf(" - Mass Storage\r\n"); +#endif + // if (CFG_TUH_HID_KEYBOARD ) puts(" - HID Keyboard"); // if (CFG_TUH_HID_MOUSE ) puts(" - HID Mouse"); } |
