add tuh_mount_cb/tuh_umount_cb

This commit is contained in:
hathach
2018-12-10 19:25:57 +07:00
parent 9c4c797502
commit 4e7596ca9c
7 changed files with 26 additions and 39 deletions

View File

@@ -84,7 +84,7 @@ int main(void)
#if CFG_TUH_CDC
CFG_TUSB_MEM_SECTION static char serial_in_buffer[64] = { 0 };
void tuh_cdc_mounted_cb(uint8_t dev_addr)
void tuh_mount_cb(uint8_t dev_addr)
{
// application set-up
printf("\na CDC device (address %d) is mounted\n", dev_addr);
@@ -92,7 +92,7 @@ void tuh_cdc_mounted_cb(uint8_t dev_addr)
tuh_cdc_receive(dev_addr, serial_in_buffer, sizeof(serial_in_buffer), true); // schedule first transfer
}
void tuh_cdc_unmounted_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);