diff options
| author | hathach <[email protected]> | 2018-03-03 16:24:43 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-03-03 16:24:43 +0700 |
| commit | 185b240f033fc692e3dfe1593895a9c28ee41c7b (patch) | |
| tree | ae9e82b2df3fd9d9c95c322e2479c09b54db2dce /tinyusb/device/dcd.h | |
| parent | 394302c8cb1b712d55929ae19805a96d560376db (diff) | |
rename usbd_dcd_bus_event_isr to hal_dcd_bus_event
Diffstat (limited to 'tinyusb/device/dcd.h')
| -rw-r--r-- | tinyusb/device/dcd.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/tinyusb/device/dcd.h b/tinyusb/device/dcd.h index 06e3f1976..925506a5a 100644 --- a/tinyusb/device/dcd.h +++ b/tinyusb/device/dcd.h @@ -49,6 +49,14 @@ extern "C" {
#endif
+typedef enum
+{
+ USBD_BUS_EVENT_RESET = 1,
+ USBD_BUS_EVENT_UNPLUGGED,
+ USBD_BUS_EVENT_SUSPENDED,
+ USBD_BUS_EVENT_RESUME
+}usbd_bus_event_type_t;
+
typedef struct {
uint8_t coreid;
uint8_t reserved; // TODO redundant, cannot be control as control uses separated API
@@ -68,15 +76,19 @@ static inline bool endpointhandle_is_equal(endpoint_handle_t x, endpoint_handle_ return (x.coreid == y.coreid) && (x.index == y.index) && (x.class_code == y.class_code);
}
-bool hal_dcd_init(uint8_t coreid);
void dcd_isr(uint8_t coreid);
//------------- Controller API -------------//
-void hal_dcd_connect (uint8_t coreid);
-void hal_dcd_disconnect (uint8_t coreid);
-void hal_dcd_set_address(uint8_t coreid, uint8_t dev_addr);
-void hal_dcd_set_config (uint8_t coreid, uint8_t config_num);
+bool hal_dcd_init (uint8_t coreid);
+void hal_dcd_connect (uint8_t coreid);
+void hal_dcd_disconnect (uint8_t coreid);
+void hal_dcd_set_address (uint8_t coreid, uint8_t dev_addr);
+void hal_dcd_set_config (uint8_t coreid, uint8_t config_num);
+
+/*------------- Event function -------------*/
+void hal_dcd_setup_received(uint8_t coreid, uint8_t const* p_request);
+void hal_dcd_bus_event(uint8_t coreid, usbd_bus_event_type_t bus_event);
//------------- PIPE API -------------//
bool dcd_pipe_control_xfer(uint8_t coreid, tusb_direction_t dir, uint8_t * p_buffer, uint16_t length, bool int_on_complete);
|
