summaryrefslogtreecommitdiff
path: root/tinyusb/device/dcd.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-03-11 12:37:07 +0700
committerhathach <[email protected]>2018-03-11 12:37:07 +0700
commit539fbe5d6276575d3f2dd943b7d5d7463a522732 (patch)
treeb5d2020985240da39063d02880c4f34e9785c694 /tinyusb/device/dcd.h
parent6392903fb2b81c24bcbdfea323f58aaaf94e15ce (diff)
rename endpoint_handle_t to edpt_hdl_t
Diffstat (limited to 'tinyusb/device/dcd.h')
-rw-r--r--tinyusb/device/dcd.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/tinyusb/device/dcd.h b/tinyusb/device/dcd.h
index 344ec4f3c..b786a92a1 100644
--- a/tinyusb/device/dcd.h
+++ b/tinyusb/device/dcd.h
@@ -62,9 +62,9 @@ typedef enum
typedef struct {
uint8_t port;
uint8_t index; // must be zero to indicate control
-} endpoint_handle_t;
+} edpt_hdl_t;
-static inline bool edpt_equal(endpoint_handle_t x, endpoint_handle_t y)
+static inline bool edpt_equal(edpt_hdl_t x, edpt_hdl_t y)
{
return (x.port == y.port) && (x.index == y.index);
}
@@ -79,22 +79,22 @@ void hal_dcd_set_config (uint8_t port, uint8_t config_num);
/*------------- Event function -------------*/
void hal_dcd_bus_event(uint8_t port, usbd_bus_event_type_t bus_event);
void hal_dcd_setup_received(uint8_t port, uint8_t const* p_request);
-void usbd_xfer_isr(endpoint_handle_t edpt_hdl, tusb_event_t event, uint32_t xferred_bytes);
+void usbd_xfer_isr(edpt_hdl_t edpt_hdl, tusb_event_t event, uint32_t xferred_bytes);
//------------- PIPE API -------------//
bool hal_dcd_control_xfer(uint8_t port, tusb_direction_t dir, uint8_t * p_buffer, uint16_t length, bool int_on_complete);
void hal_dcd_control_stall(uint8_t port);
-bool hal_dcd_pipe_open(uint8_t port, tusb_descriptor_endpoint_t const * p_endpoint_desc, endpoint_handle_t* eh);
+bool hal_dcd_pipe_open(uint8_t port, tusb_descriptor_endpoint_t const * p_endpoint_desc, edpt_hdl_t* eh);
-tusb_error_t dcd_pipe_queue_xfer(endpoint_handle_t edpt_hdl, uint8_t * buffer, uint16_t total_bytes); // only queue, not transferring yet
-tusb_error_t hal_dcd_pipe_xfer(endpoint_handle_t edpt_hdl, uint8_t * buffer, uint16_t total_bytes, bool int_on_complete);
+tusb_error_t dcd_pipe_queue_xfer(edpt_hdl_t edpt_hdl, uint8_t * buffer, uint16_t total_bytes); // only queue, not transferring yet
+tusb_error_t hal_dcd_pipe_xfer(edpt_hdl_t edpt_hdl, uint8_t * buffer, uint16_t total_bytes, bool int_on_complete);
-bool dcd_pipe_is_busy(endpoint_handle_t edpt_hdl);
+bool dcd_pipe_is_busy(edpt_hdl_t edpt_hdl);
// TODO port + endpoint address are part of endpoint handle, not endpoint handle, data toggle also need to be reset
-void hal_dcd_pipe_stall(endpoint_handle_t edpt_hdl);
+void hal_dcd_pipe_stall(edpt_hdl_t edpt_hdl);
void hal_dcd_pipe_clear_stall(uint8_t port, uint8_t edpt_addr);
#ifdef __cplusplus