able to response with good crc

This commit is contained in:
hathach
2023-06-07 18:57:48 +07:00
parent b893f1d541
commit 9b7dee563e
9 changed files with 257 additions and 75 deletions

View File

@@ -38,13 +38,19 @@ extern "C" {
//--------------------------------------------------------------------+
//
//--------------------------------------------------------------------+
typedef struct {
uint8_t rhport;
uint8_t event_id;
} tcd_event_t;;
//--------------------------------------------------------------------+
//
//--------------------------------------------------------------------+
// Initialize controller
bool tcd_init(uint8_t rhport, typec_port_type_t port_type);
bool tcd_init(uint8_t rhport, tusb_typec_port_type_t port_type);
// Enable interrupt
void tcd_int_enable (uint8_t rhport);
@@ -55,4 +61,11 @@ void tcd_int_disable(uint8_t rhport);
// Interrupt Handler
void tcd_int_handler(uint8_t rhport);
//--------------------------------------------------------------------+
//
//--------------------------------------------------------------------+
bool tcd_rx_start(uint8_t rhport, uint8_t* buffer, uint16_t total_bytes);
bool tcd_tx_start(uint8_t rhport, uint8_t const* buffer, uint16_t total_bytes);
#endif