diff options
| author | hathach <[email protected]> | 2023-08-18 12:48:12 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2023-08-18 12:48:12 +0700 |
| commit | 9257a0f562a1cb939a902e7c41de5032b0f7de19 (patch) | |
| tree | 52a90b9a4eda71b62c0c6096f2b0813670c3f626 /src/host | |
| parent | 1fdf29075d4e613eacfa881166015263797db0f6 (diff) | |
- update nrf52 bsp for cmake
- add empty tuh_int_handler/tud_int_handler if corresponidng stack not enabled
- add hcd_template.c
Diffstat (limited to 'src/host')
| -rw-r--r-- | src/host/hcd.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/host/hcd.h b/src/host/hcd.h index 9bcc1c6df..1b5038ef4 100644 --- a/src/host/hcd.h +++ b/src/host/hcd.h @@ -198,8 +198,7 @@ extern void hcd_event_handler(hcd_event_t const* event, bool in_isr); // Helper to send device attach event TU_ATTR_ALWAYS_INLINE static inline -void hcd_event_device_attach(uint8_t rhport, bool in_isr) -{ +void hcd_event_device_attach(uint8_t rhport, bool in_isr) { hcd_event_t event; event.rhport = rhport; event.event_id = HCD_EVENT_DEVICE_ATTACH; @@ -211,8 +210,7 @@ void hcd_event_device_attach(uint8_t rhport, bool in_isr) // Helper to send device removal event TU_ATTR_ALWAYS_INLINE static inline -void hcd_event_device_remove(uint8_t rhport, bool in_isr) -{ +void hcd_event_device_remove(uint8_t rhport, bool in_isr) { hcd_event_t event; event.rhport = rhport; event.event_id = HCD_EVENT_DEVICE_REMOVE; @@ -224,10 +222,8 @@ void hcd_event_device_remove(uint8_t rhport, bool in_isr) // Helper to send USB transfer event TU_ATTR_ALWAYS_INLINE static inline -void hcd_event_xfer_complete(uint8_t dev_addr, uint8_t ep_addr, uint32_t xferred_bytes, xfer_result_t result, bool in_isr) -{ - hcd_event_t event = - { +void hcd_event_xfer_complete(uint8_t dev_addr, uint8_t ep_addr, uint32_t xferred_bytes, xfer_result_t result, bool in_isr) { + hcd_event_t event = { .rhport = 0, // TODO correct rhport .event_id = HCD_EVENT_XFER_COMPLETE, .dev_addr = dev_addr, |
