diff options
| author | hathach <[email protected]> | 2013-03-26 16:39:25 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-03-26 16:39:25 +0700 |
| commit | ac905a8d09598067c53ff32835a2d70797d970be (patch) | |
| tree | 2ea02bce7ac3f4174dc99f4a22e56abb1c109595 /tinyusb/host/usbh.h | |
| parent | 0b08dc7724a67f09be16fad3d6702ce0d7566f03 (diff) | |
rename pipe_status_t to tusb_interface_status_t
add tusbh_hid_keyboard_status & test code
Diffstat (limited to 'tinyusb/host/usbh.h')
| -rw-r--r-- | tinyusb/host/usbh.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tinyusb/host/usbh.h b/tinyusb/host/usbh.h index 1e1653e8c..684505471 100644 --- a/tinyusb/host/usbh.h +++ b/tinyusb/host/usbh.h @@ -63,12 +63,13 @@ //--------------------------------------------------------------------+ // MACRO CONSTANT TYPEDEF //--------------------------------------------------------------------+ -typedef enum pipe_status_{ - PIPE_STATUS_READY = 0, - PIPE_STATUS_BUSY, - PIPE_STATUS_COMPLETE, - PIPE_STATUS_ERROR -} pipe_status_t; +typedef enum tusb_interface_status_{ + TUSB_INTERFACE_STATUS_READY = 0, + TUSB_INTERFACE_STATUS_BUSY, + TUSB_INTERFACE_STATUS_COMPLETE, + TUSB_INTERFACE_STATUS_ERROR, + TUSB_INTERFACE_STATUS_INVALID_PARA +} tusb_interface_status_t; typedef struct { void (* const init) (void); @@ -84,9 +85,9 @@ typedef struct { // APPLICATION API //--------------------------------------------------------------------+ tusb_error_t tusbh_configuration_set (uint8_t dev_addr, uint8_t configure_number) ATTR_WARN_UNUSED_RESULT; -tusb_device_state_t tusbh_device_get_state (uint8_t const dev_addr) ATTR_WARN_UNUSED_RESULT ATTR_PURE; -static inline bool tusbh_device_is_configured(uint8_t const dev_addr) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT ATTR_PURE; -static inline bool tusbh_device_is_configured(uint8_t const dev_addr) +tusb_device_state_t tusbh_device_get_state (uint8_t dev_addr) ATTR_WARN_UNUSED_RESULT ATTR_PURE; +static inline bool tusbh_device_is_configured(uint8_t dev_addr) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT ATTR_PURE; +static inline bool tusbh_device_is_configured(uint8_t dev_addr) { return tusbh_device_get_state(dev_addr) == TUSB_DEVICE_STATE_CONFIGURED; } |
