diff --git a/src/main.c b/src/main.c index 8b4c79d..af14b9e 100644 --- a/src/main.c +++ b/src/main.c @@ -545,13 +545,16 @@ void assert_nrf_callback(uint16_t line_num, const uint8_t * p_file_name) //--------------------------------------------------------------------+ // tinyusb callbacks //--------------------------------------------------------------------+ -void tud_mount_cb(uint8_t port) +void tud_mount_cb(uint8_t rhport) { - + (void) rhport; + msc_flash_mount(); } -void tud_umount_cb(uint8_t port) +void tud_umount_cb(uint8_t rhport) { + (void) rhport; + msc_flash_umount(); } uint32_t tusb_hal_millis(void) diff --git a/src/msc/msc_flash.c b/src/msc/msc_flash.c index 6fc2992..84f357d 100644 --- a/src/msc/msc_flash.c +++ b/src/msc/msc_flash.c @@ -51,9 +51,9 @@ static scsi_inquiry_data_t const mscd_inquiry_data = .is_removable = 1, .version = 2, .response_data_format = 2, - .vendor_id = "tinyusb", - .product_id = "MSC Example", - .product_revision = "0.01" + .vendor_id = "Adafruit", + .product_id = "Feather52840", + .product_revision = "1.0" }; static scsi_read_capacity10_data_t const mscd_read_capacity10_data = @@ -88,12 +88,12 @@ static scsi_mode_parameters_t const msc_dev_mode_para = //--------------------------------------------------------------------+ // tinyusb callbacks //--------------------------------------------------------------------+ -void msc_app_mount(uint8_t rhport) +void msc_flash_mount(void) { } -void msc_app_umount(uint8_t rhport) +void msc_flash_umount(void) { } diff --git a/src/msc/msc_flash.h b/src/msc/msc_flash.h index 4be81c3..ece1adf 100644 --- a/src/msc/msc_flash.h +++ b/src/msc/msc_flash.h @@ -57,7 +57,12 @@ VERIFY_STATIC( MSC_FLASH_ADDR_START+MSC_FLASH_SIZE == BOOTLOADER_REGION_START-DFU_APP_DATA_RESERVED, ); +/*------------------------------------------------------------------*/ +/* + *------------------------------------------------------------------*/ +ATTR_WEAK void msc_flash_mount(void); +ATTR_WEAK void msc_flash_umount(void);