diff options
| author | hathach <[email protected]> | 2018-03-11 21:21:09 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-03-11 21:23:10 +0700 |
| commit | c696812cad071e4748bfb44095d93d93cddd65fb (patch) | |
| tree | 80a7af34c8da706084392ba9c8d72d3784db69a1 /tinyusb | |
| parent | c5d8d16858e22fd0b68768aef5cb1660fe7ccb0c (diff) | |
clean up
Diffstat (limited to 'tinyusb')
| -rw-r--r-- | tinyusb/tusb_dcd.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tinyusb/tusb_dcd.h b/tinyusb/tusb_dcd.h index 79ed9589f..f37904b37 100644 --- a/tinyusb/tusb_dcd.h +++ b/tinyusb/tusb_dcd.h @@ -43,7 +43,8 @@ #ifndef _TUSB_DCD_H_
#define _TUSB_DCD_H_
-#include "common/common.h"
+#include <stdint.h>
+#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
@@ -58,8 +59,9 @@ typedef enum USBD_BUS_EVENT_RESUME
}usbd_bus_event_type_t;
-
-//------------- Controller API -------------//
+/*------------------------------------------------------------------*/
+/* Controller API
+ *------------------------------------------------------------------*/
bool tusb_dcd_init (uint8_t port);
void tusb_dcd_connect (uint8_t port);
void tusb_dcd_disconnect (uint8_t port);
@@ -75,19 +77,20 @@ void tusb_dcd_setup_received(uint8_t port, uint8_t const* p_request); void tusb_dcd_xfer_complete(uint8_t port, uint8_t edpt_addr, uint32_t xferred_bytes, bool succeeded);
/*------------------------------------------------------------------*/
-/* API
+/* Endpoint API
*------------------------------------------------------------------*/
+
//------------- Control Endpoint -------------//
bool tusb_dcd_control_xfer(uint8_t port, tusb_dir_t dir, uint8_t * p_buffer, uint16_t length, bool int_on_complete);
void tusb_dcd_control_stall(uint8_t port);
+//------------- Other Endpoints -------------//
bool tusb_dcd_edpt_open(uint8_t port, tusb_descriptor_endpoint_t const * p_endpoint_desc);
tusb_error_t tusb_dcd_edpt_queue_xfer(uint8_t port, uint8_t edpt_addr, uint8_t * buffer, uint16_t total_bytes); // only queue, not transferring yet
tusb_error_t tusb_dcd_edpt_xfer(uint8_t port, uint8_t edpt_addr, uint8_t * buffer, uint16_t total_bytes, bool int_on_complete);
bool tusb_dcd_edpt_busy(uint8_t port, uint8_t edpt_addr);
-// TODO port + endpoint address are part of endpoint handle, not endpoint handle, data toggle also need to be reset
void tusb_dcd_edpt_stall(uint8_t port, uint8_t edpt_addr);
void tusb_dcd_edpt_clear_stall(uint8_t port, uint8_t edpt_addr);
|
