add usbh_edpt_claim/release

implement USBH_EVENT_FUNC_CALL
This commit is contained in:
hathach
2020-10-12 00:35:38 +07:00
parent b5d4c8185d
commit 87b989e8b4
6 changed files with 120 additions and 8 deletions

View File

@@ -45,6 +45,11 @@ typedef enum
HCD_EVENT_DEVICE_ATTACH,
HCD_EVENT_DEVICE_REMOVE,
HCD_EVENT_XFER_COMPLETE,
// Not an HCD event, just a convenient way to defer ISR function
USBH_EVENT_FUNC_CALL,
HCD_EVENT_COUNT
} hcd_eventid_t;
typedef struct
@@ -67,6 +72,12 @@ typedef struct
uint8_t result;
uint32_t len;
} xfer_complete;
// FUNC_CALL
struct {
void (*func) (void*);
void* param;
}func_call;
};
} hcd_event_t;