diff options
| author | hathach <[email protected]> | 2013-09-21 14:28:59 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-09-21 14:38:40 +0700 |
| commit | 57088638598ccd0ea185debb8ca0fc7cbb404587 (patch) | |
| tree | 500c081b52abe45535d7e0f64ff1e26673a6dc9e /tinyusb/host | |
| parent | d15ba08fdc5c75aa061dc7dde10eff54f6dc607f (diff) | |
house keeping, clean up warnings
Diffstat (limited to 'tinyusb/host')
| -rw-r--r-- | tinyusb/host/ehci/ehci.c | 4 | ||||
| -rw-r--r-- | tinyusb/host/usbh.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/tinyusb/host/ehci/ehci.c b/tinyusb/host/ehci/ehci.c index 9ec9fc7a8..3a8562a36 100644 --- a/tinyusb/host/ehci/ehci.c +++ b/tinyusb/host/ehci/ehci.c @@ -689,7 +689,9 @@ void hcd_isr(uint8_t hostid) { ehci_registers_t* const regs = get_operational_register(hostid); - uint32_t int_status = regs->usb_sts & regs->usb_int_enable; + uint32_t int_status = regs->usb_sts; + int_status &= regs->usb_int_enable; + regs->usb_sts |= int_status; // Acknowledge handled interrupt if (int_status == 0) diff --git a/tinyusb/host/usbh.c b/tinyusb/host/usbh.c index dd930845e..67cc8f96c 100644 --- a/tinyusb/host/usbh.c +++ b/tinyusb/host/usbh.c @@ -206,9 +206,11 @@ tusb_error_t usbh_control_xfer_subtask(uint8_t dev_addr, uint8_t bmRequestType, #ifndef _TEST_ usbh_devices[dev_addr].control.pipe_status = 0; #else - usbh_devices[dev_addr].control.pipe_status = TUSB_EVENT_XFER_COMPLETE; // in Test project, mark as complete to imm pass + usbh_devices[dev_addr].control.pipe_status = TUSB_EVENT_XFER_COMPLETE; // in Test project, mark as complete immediately #endif - /*SUBTASK_ASSERT_STATUS*/ (void) ( hcd_pipe_control_xfer(dev_addr, &usbh_devices[dev_addr].control.request, data) ); + + SUBTASK_ASSERT_STATUS_WITH_HANDLER( hcd_pipe_control_xfer(dev_addr, &usbh_devices[dev_addr].control.request, data), + osal_mutex_release(usbh_devices[dev_addr].control.mutex_hdl) ); osal_semaphore_wait(usbh_devices[dev_addr].control.sem_hdl, OSAL_TIMEOUT_NORMAL, &error); // careful of local variable without static osal_mutex_release(usbh_devices[dev_addr].control.mutex_hdl); |
