add several helper function

add test & code for hidh_keyboard_open_subtask
- skip parsing HID descriptor for keyboard
This commit is contained in:
hathach
2013-03-25 17:39:22 +07:00
parent c026a9f2e0
commit d0a73f4b0d
7 changed files with 53 additions and 34 deletions

View File

@@ -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
//--------------------------------------------------------------------+