add in_isr to all hcd event functions
This commit is contained in:
@@ -109,20 +109,6 @@ tusb_speed_t hcd_port_speed_get(uint8_t hostid);
|
||||
// HCD closes all opened endpoints belong to this device
|
||||
void hcd_device_close(uint8_t rhport, uint8_t dev_addr);
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Event function
|
||||
//--------------------------------------------------------------------+
|
||||
void hcd_event_handler(hcd_event_t const* event, bool in_isr);
|
||||
|
||||
// Helper to send device attach event
|
||||
void hcd_event_device_attach(uint8_t rhport);
|
||||
|
||||
// Helper to send device removal event
|
||||
void hcd_event_device_remove(uint8_t rhport);
|
||||
|
||||
// Helper to send USB transfer event
|
||||
void hcd_event_xfer_complete(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes);
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Endpoints API
|
||||
//--------------------------------------------------------------------+
|
||||
@@ -145,6 +131,22 @@ bool hcd_pipe_xfer(uint8_t dev_addr, uint8_t ep_addr, uint8_t buffer[], uint16_t
|
||||
|
||||
// tusb_error_t hcd_pipe_cancel();
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Event API (implemented by stack)
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
// Called by HCD to notify stack
|
||||
extern void hcd_event_handler(hcd_event_t const* event, bool in_isr);
|
||||
|
||||
// Helper to send device attach event
|
||||
extern void hcd_event_device_attach(uint8_t rhport, bool in_isr);
|
||||
|
||||
// Helper to send device removal event
|
||||
extern void hcd_event_device_remove(uint8_t rhport, bool in_isr);
|
||||
|
||||
// Helper to send USB transfer event
|
||||
extern void hcd_event_xfer_complete(uint8_t dev_addr, uint8_t ep_addr, uint32_t xferred_bytes, xfer_result_t result, bool in_isr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user