summaryrefslogtreecommitdiff
path: root/src/class/msc
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2024-04-08 23:48:52 +0700
committerGitHub <[email protected]>2024-04-08 23:48:52 +0700
commit42decf28f1bf7512a4c3e7402c9daf83ee241191 (patch)
tree1a3ed93956a7d51d592d6ba4de6215725ec43c4c /src/class/msc
parentd33fe38a6257bcdd60f51a57c9fd19ce2ad1f202 (diff)
parentbe25a3fc20339c27803e68cb1363f89ffe7a7c67 (diff)
Merge pull request #1835 from MasterQ32/otg_bringup
Implements deinit functions for host/device mode switch
Diffstat (limited to 'src/class/msc')
-rw-r--r--src/class/msc/msc_device.c8
-rw-r--r--src/class/msc/msc_device.h1
2 files changed, 7 insertions, 2 deletions
diff --git a/src/class/msc/msc_device.c b/src/class/msc/msc_device.c
index c145d86a6..588fcaaca 100644
--- a/src/class/msc/msc_device.c
+++ b/src/class/msc/msc_device.c
@@ -251,11 +251,15 @@ static inline void set_sense_medium_not_present(uint8_t lun)
//--------------------------------------------------------------------+
// USBD Driver API
//--------------------------------------------------------------------+
-void mscd_init(void)
-{
+void mscd_init(void) {
tu_memclr(&_mscd_itf, sizeof(mscd_interface_t));
}
+bool mscd_deinit(void) {
+ // nothing to do
+ return true;
+}
+
void mscd_reset(uint8_t rhport)
{
(void) rhport;
diff --git a/src/class/msc/msc_device.h b/src/class/msc/msc_device.h
index 72f95be06..4247a40bd 100644
--- a/src/class/msc/msc_device.h
+++ b/src/class/msc/msc_device.h
@@ -150,6 +150,7 @@ TU_ATTR_WEAK bool tud_msc_is_writable_cb(uint8_t lun);
// Internal Class Driver API
//--------------------------------------------------------------------+
void mscd_init (void);
+bool mscd_deinit (void);
void mscd_reset (uint8_t rhport);
uint16_t mscd_open (uint8_t rhport, tusb_desc_interface_t const * itf_desc, uint16_t max_len);
bool mscd_control_xfer_cb (uint8_t rhport, uint8_t stage, tusb_control_request_t const * p_request);