diff options
| author | Ha Thach <[email protected]> | 2025-04-23 20:08:38 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-04-23 20:08:38 +0700 |
| commit | 8b3c558881b8d79f442b578108660c7b76e59bc8 (patch) | |
| tree | 17326a60eba291361c8eb5476c2241369b9f18f2 /examples | |
| parent | b632686f54fac0a152bbf57deae3f2cf34f22b2c (diff) | |
| parent | 9a1f690ec44dc7cc3e0dbb35e1db8ba89cd3de88 (diff) | |
Merge pull request #3093 from hathach/refactor-usbh-bus-info
refactor(usbh) improve the usage of bus info
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/host/cdc_msc_hid/src/msc_app.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/examples/host/cdc_msc_hid/src/msc_app.c b/examples/host/cdc_msc_hid/src/msc_app.c index 1d7e18e6e..0e9c99766 100644 --- a/examples/host/cdc_msc_hid/src/msc_app.c +++ b/examples/host/cdc_msc_hid/src/msc_app.c @@ -30,13 +30,11 @@ //--------------------------------------------------------------------+ static scsi_inquiry_resp_t inquiry_resp; -bool inquiry_complete_cb(uint8_t dev_addr, tuh_msc_complete_data_t const * cb_data) -{ +static bool inquiry_complete_cb(uint8_t dev_addr, tuh_msc_complete_data_t const * cb_data) { msc_cbw_t const* cbw = cb_data->cbw; msc_csw_t const* csw = cb_data->csw; - if (csw->status != 0) - { + if (csw->status != 0) { printf("Inquiry failed\r\n"); return false; } @@ -55,16 +53,14 @@ bool inquiry_complete_cb(uint8_t dev_addr, tuh_msc_complete_data_t const * cb_da } //------------- IMPLEMENTATION -------------// -void tuh_msc_mount_cb(uint8_t dev_addr) -{ +void tuh_msc_mount_cb(uint8_t dev_addr) { printf("A MassStorage device is mounted\r\n"); uint8_t const lun = 0; tuh_msc_inquiry(dev_addr, lun, &inquiry_resp, inquiry_complete_cb, 0); } -void tuh_msc_umount_cb(uint8_t dev_addr) -{ +void tuh_msc_umount_cb(uint8_t dev_addr) { (void) dev_addr; printf("A MassStorage device is unmounted\r\n"); } |
