summaryrefslogtreecommitdiff
path: root/src/host/usbh.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2020-09-05 15:45:03 +0700
committerhathach <[email protected]>2020-09-05 15:46:50 +0700
commitb8b95e84944b4c07cc9c9f4a7e4d53e6256b42f0 (patch)
tree15762a43bbc74bc5b28e22a1a027f7b7a7b6712d /src/host/usbh.c
parent90c8c14652ec81b34c9f2fa6ce69fa25d74a5bbf (diff)
add in_isr to all hcd event functions
Diffstat (limited to 'src/host/usbh.c')
-rw-r--r--src/host/usbh.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/host/usbh.c b/src/host/usbh.c
index da163f9e4..6304b6b48 100644
--- a/src/host/usbh.c
+++ b/src/host/usbh.c
@@ -268,7 +268,7 @@ void hcd_event_handler(hcd_event_t const* event, bool in_isr)
}
// interrupt caused by a TD (with IOC=1) in pipe of class class_code
-void hcd_event_xfer_complete(uint8_t dev_addr, uint8_t ep_addr, uint8_t result, uint32_t xferred_bytes)
+void hcd_event_xfer_complete(uint8_t dev_addr, uint8_t ep_addr, uint32_t xferred_bytes, xfer_result_t result, bool in_isr)
{
usbh_device_t* dev = &_usbh_devices[ dev_addr ];
@@ -276,7 +276,7 @@ void hcd_event_xfer_complete(uint8_t dev_addr, uint8_t ep_addr, uint8_t result,
{
dev->control.pipe_status = result;
// usbh_devices[ pipe_hdl.dev_addr ].control.xferred_bytes = xferred_bytes; not yet neccessary
- osal_semaphore_post( dev->control.sem_hdl, true );
+ osal_semaphore_post( dev->control.sem_hdl, true ); // FIXME post within ISR
}
else
{
@@ -293,11 +293,11 @@ void hcd_event_xfer_complete(uint8_t dev_addr, uint8_t ep_addr, uint8_t result,
}
};
- hcd_event_handler(&event, true);
+ hcd_event_handler(&event, in_isr);
}
}
-void hcd_event_device_attach(uint8_t rhport)
+void hcd_event_device_attach(uint8_t rhport, bool in_isr)
{
hcd_event_t event =
{
@@ -308,10 +308,10 @@ void hcd_event_device_attach(uint8_t rhport)
event.attach.hub_addr = 0;
event.attach.hub_port = 0;
- hcd_event_handler(&event, true);
+ hcd_event_handler(&event, in_isr);
}
-void hcd_event_device_remove(uint8_t hostid)
+void hcd_event_device_remove(uint8_t hostid, bool in_isr)
{
hcd_event_t event =
{
@@ -322,7 +322,7 @@ void hcd_event_device_remove(uint8_t hostid)
event.attach.hub_addr = 0;
event.attach.hub_port = 0;
- hcd_event_handler(&event, true);
+ hcd_event_handler(&event, in_isr);
}