diff options
| author | hathach <[email protected]> | 2024-03-22 16:12:57 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2024-03-22 16:12:57 +0700 |
| commit | e84c9f3e221092687808f175e1e19732a10fea72 (patch) | |
| tree | 6a5c66a4851db1e66aaa87d173c4f5567af5ee0d /src/class/msc | |
| parent | 31f68495cf66706926c408ad15ea90a646c62198 (diff) | |
implement tuh_init()
change usbh driver init() return type from void to bool
Diffstat (limited to 'src/class/msc')
| -rw-r--r-- | src/class/msc/msc_host.c | 5 | ||||
| -rw-r--r-- | src/class/msc/msc_host.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/class/msc/msc_host.c b/src/class/msc/msc_host.c index 61ecb8e4e..ce6e7fb2d 100644 --- a/src/class/msc/msc_host.c +++ b/src/class/msc/msc_host.c @@ -284,15 +284,16 @@ bool tuh_msc_reset(uint8_t dev_addr) { //--------------------------------------------------------------------+ // CLASS-USBH API //--------------------------------------------------------------------+ -void msch_init(void) { +bool msch_init(void) { + TU_LOG_DRV("sizeof(msch_interface_t) = %u\r\n", sizeof(msch_interface_t)); tu_memclr(_msch_itf, sizeof(_msch_itf)); + return true; } bool msch_deinit(void) { return true; } - void msch_close(uint8_t dev_addr) { TU_VERIFY(dev_addr <= CFG_TUH_DEVICE_MAX,); msch_interface_t* p_msc = get_itf(dev_addr); diff --git a/src/class/msc/msc_host.h b/src/class/msc/msc_host.h index 5bf2e62e3..9fda566d8 100644 --- a/src/class/msc/msc_host.h +++ b/src/class/msc/msc_host.h @@ -113,7 +113,7 @@ TU_ATTR_WEAK void tuh_msc_umount_cb(uint8_t dev_addr); // Internal Class Driver API //--------------------------------------------------------------------+ -void msch_init (void); +bool msch_init (void); bool msch_deinit (void); bool msch_open (uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *desc_itf, uint16_t max_len); bool msch_set_config (uint8_t dev_addr, uint8_t itf_num); |
