diff options
| author | hathach <[email protected]> | 2013-03-25 17:39:22 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-03-25 17:39:22 +0700 |
| commit | d0a73f4b0d6d25d5f6a08f3b519241cec4e2a535 (patch) | |
| tree | 1242ed2aa5239a1a71f3de6d10d8120b585e3ed0 /tinyusb/host | |
| parent | c026a9f2e0aca713c7cb5f08eb40018f7f16e1be (diff) | |
add several helper function
add test & code for hidh_keyboard_open_subtask
- skip parsing HID descriptor for keyboard
Diffstat (limited to 'tinyusb/host')
| -rw-r--r-- | tinyusb/host/hcd.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tinyusb/host/hcd.h b/tinyusb/host/hcd.h index ab324b6d4..05b4d6d6d 100644 --- a/tinyusb/host/hcd.h +++ b/tinyusb/host/hcd.h @@ -66,6 +66,12 @@ typedef struct { uint8_t index; } pipe_handle_t; +static inline bool pipehandle_is_valid(pipe_handle_t pipe_hdl) ATTR_CONST ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT; +static inline bool pipehandle_is_valid(pipe_handle_t pipe_hdl) +{ + return pipe_hdl.dev_addr > 0; +} + //--------------------------------------------------------------------+ // USBH-HCD API //--------------------------------------------------------------------+ |
