mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-22 10:20:55 +00:00
migrate midi device to new control xfer cb
This commit is contained in:
parent
dc9a309839
commit
e2abb089f4
@ -375,17 +375,11 @@ uint16_t midid_open(uint8_t rhport, tusb_desc_interface_t const * desc_itf, uint
|
|||||||
return drv_len;
|
return drv_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool midid_control_complete(uint8_t rhport, tusb_control_request_t const * p_request)
|
bool midid_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_request_t const * request)
|
||||||
{
|
{
|
||||||
(void) rhport;
|
(void) rhport;
|
||||||
(void) p_request;
|
(void) stage;
|
||||||
return true;
|
(void) request;
|
||||||
}
|
|
||||||
|
|
||||||
bool midid_control_request(uint8_t rhport, tusb_control_request_t const * p_request)
|
|
||||||
{
|
|
||||||
(void) rhport;
|
|
||||||
(void) p_request;
|
|
||||||
|
|
||||||
// driver doesn't support any request yet
|
// driver doesn't support any request yet
|
||||||
return false;
|
return false;
|
||||||
|
@ -142,12 +142,11 @@ static inline bool tud_midi_send (uint8_t const packet[4])
|
|||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
// Internal Class Driver API
|
// Internal Class Driver API
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
void midid_init (void);
|
void midid_init (void);
|
||||||
void midid_reset (uint8_t rhport);
|
void midid_reset (uint8_t rhport);
|
||||||
uint16_t midid_open (uint8_t rhport, tusb_desc_interface_t const * itf_desc, uint16_t max_len);
|
uint16_t midid_open (uint8_t rhport, tusb_desc_interface_t const * itf_desc, uint16_t max_len);
|
||||||
bool midid_control_request (uint8_t rhport, tusb_control_request_t const * request);
|
bool midid_control_xfer_cb (uint8_t rhport, uint8_t stage, tusb_control_request_t const * request);
|
||||||
bool midid_control_complete (uint8_t rhport, tusb_control_request_t const * request);
|
bool midid_xfer_cb (uint8_t rhport, uint8_t edpt_addr, xfer_result_t result, uint32_t xferred_bytes);
|
||||||
bool midid_xfer_cb (uint8_t rhport, uint8_t edpt_addr, xfer_result_t result, uint32_t xferred_bytes);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -146,8 +146,7 @@ static usbd_class_driver_t const _usbd_driver[] =
|
|||||||
.init = midid_init,
|
.init = midid_init,
|
||||||
.open = midid_open,
|
.open = midid_open,
|
||||||
.reset = midid_reset,
|
.reset = midid_reset,
|
||||||
.control_xfer_cb = midid_control_request,
|
.control_xfer_cb = midid_control_xfer_cb,
|
||||||
.control_complete = midid_control_complete,
|
|
||||||
.xfer_cb = midid_xfer_cb,
|
.xfer_cb = midid_xfer_cb,
|
||||||
.sof = NULL
|
.sof = NULL
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user