summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2024-04-02 16:55:49 +0700
committerhathach <[email protected]>2024-04-02 16:55:49 +0700
commit172c9f70c74c541892006ff2bbfea818f40a235a (patch)
tree2f328b81067657e1a6dd2539983b807ee7ade211 /src
parent7d3d60f96de3f6e15291c9302463c294e2dc98de (diff)
clean up
Diffstat (limited to 'src')
-rw-r--r--src/portable/analog/max3421/hcd_max3421.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/portable/analog/max3421/hcd_max3421.c b/src/portable/analog/max3421/hcd_max3421.c
index 12d80e0b5..61a7e2703 100644
--- a/src/portable/analog/max3421/hcd_max3421.c
+++ b/src/portable/analog/max3421/hcd_max3421.c
@@ -173,8 +173,8 @@ enum {
enum {
EP_STATE_IDLE = 0,
- EP_STATE_COMPLETE,
- EP_STATE_ATTEMPT_1, // pending 1st attempt
+ EP_STATE_COMPLETE = 1,
+ EP_STATE_ATTEMPT_1 = 2, // pending 1st attempt
EP_STATE_ATTEMPT_MAX = 15
};
@@ -465,7 +465,6 @@ bool hcd_init(uint8_t rhport) {
tuh_max3421_int_api(rhport, false);
TU_LOG2_INT(sizeof(max3421_ep_t));
- TU_LOG2_INT(sizeof(atomic_flag));
TU_LOG2_INT(sizeof(max3421_data_t));
TU_LOG2_INT(offsetof(max3421_data_t, ep));
@@ -873,7 +872,9 @@ static void handle_xfer_done(uint8_t rhport, bool in_isr) {
if (ep_dir) {
// IN transfer: fifo data is already received in RCVDAV IRQ
- if ( hxfr_type & HXFR_HS ) {
+
+ // mark control handshake as complete
+ if (hxfr_type & HXFR_HS) {
ep->state = EP_STATE_COMPLETE;
}