add class driver deinit

This commit is contained in:
hathach
2024-04-08 22:07:56 +07:00
parent 47c12a07f2
commit c3c0648456
33 changed files with 292 additions and 113 deletions

View File

@@ -132,11 +132,14 @@ void netd_report(uint8_t *buf, uint16_t len)
//--------------------------------------------------------------------+
// USBD Driver API
//--------------------------------------------------------------------+
void netd_init(void)
{
void netd_init(void) {
tu_memclr(&_netd_itf, sizeof(_netd_itf));
}
bool netd_deinit(void) {
return true;
}
void netd_reset(uint8_t rhport)
{
(void) rhport;

View File

@@ -260,6 +260,10 @@ void netd_init(void)
ncm_prepare_for_tx();
}
bool netd_deinit(void) {
return true;
}
void netd_reset(uint8_t rhport)
{
(void) rhport;

View File

@@ -105,6 +105,7 @@ void tud_network_link_state_cb(bool state);
// INTERNAL USBD-CLASS DRIVER API
//--------------------------------------------------------------------+
void netd_init (void);
bool netd_deinit (void);
void netd_reset (uint8_t rhport);
uint16_t netd_open (uint8_t rhport, tusb_desc_interface_t const * itf_desc, uint16_t max_len);
bool netd_control_xfer_cb (uint8_t rhport, uint8_t stage, tusb_control_request_t const * request);