summaryrefslogtreecommitdiff
path: root/tinyusb/host
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-03-26 17:04:55 +0700
committerhathach <[email protected]>2013-03-26 17:04:55 +0700
commitb0ff7a7e235b1901def71305e6c35e6c3cda222c (patch)
tree37a3bf521d8f22d73af16e55f45a3069d0c02170 /tinyusb/host
parentac905a8d09598067c53ff32835a2d70797d970be (diff)
add code & test for hidh_isr (set status for keyboard)
Diffstat (limited to 'tinyusb/host')
-rw-r--r--tinyusb/host/hcd.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tinyusb/host/hcd.h b/tinyusb/host/hcd.h
index b3c4a57ce..999fbf734 100644
--- a/tinyusb/host/hcd.h
+++ b/tinyusb/host/hcd.h
@@ -73,6 +73,12 @@ static inline bool pipehandle_is_valid(pipe_handle_t pipe_hdl)
return pipe_hdl.dev_addr > 0;
}
+static inline bool pipehandle_is_equal(pipe_handle_t x, pipe_handle_t y) ATTR_CONST ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
+static inline bool pipehandle_is_equal(pipe_handle_t x, pipe_handle_t y)
+{
+ return (x.dev_addr == y.dev_addr) && (x.xfer_type == y.xfer_type) && (x.index == y.index);
+}
+
//--------------------------------------------------------------------+
// USBH-HCD API
//--------------------------------------------------------------------+