diff options
| author | hathach <[email protected]> | 2013-09-18 23:34:03 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-09-18 23:34:03 +0700 |
| commit | 61c591b9ac49022fd287827951cd1f34d4fdbb1a (patch) | |
| tree | f6f96b3be8c69e43cdc67483f8620cb46f707936 /tinyusb | |
| parent | 9d87a1c62b71b9ee2500b235d41297802db3dfe7 (diff) | |
clean up warnings
Diffstat (limited to 'tinyusb')
| -rw-r--r-- | tinyusb/class/cdc_host.c | 4 | ||||
| -rw-r--r-- | tinyusb/class/cdc_host.h | 1 | ||||
| -rw-r--r-- | tinyusb/class/hid_host.h | 4 | ||||
| -rw-r--r-- | tinyusb/osal/osal_none.h | 14 |
4 files changed, 12 insertions, 11 deletions
diff --git a/tinyusb/class/cdc_host.c b/tinyusb/class/cdc_host.c index 49899c63b..c15140ea8 100644 --- a/tinyusb/class/cdc_host.c +++ b/tinyusb/class/cdc_host.c @@ -76,8 +76,8 @@ static inline cdc_pipeid_t get_app_pipeid(pipe_handle_t pipe_hdl) cdch_data_t const * p_cdc = &cdch_data[pipe_hdl.dev_addr-1]; return pipehandle_is_equal( pipe_hdl, p_cdc->pipe_notification ) ? CDC_PIPE_NOTIFICATION : - pipehandle_is_equal( pipe_hdl, p_cdc->pipe_in ) ? CDC_PIPE_DATA_IN : - pipehandle_is_equal( pipe_hdl, p_cdc->pipe_out ) ? CDC_PIPE_DATA_OUT : 0; + pipehandle_is_equal( pipe_hdl, p_cdc->pipe_in ) ? CDC_PIPE_DATA_IN : + pipehandle_is_equal( pipe_hdl, p_cdc->pipe_out ) ? CDC_PIPE_DATA_OUT : CDC_PIPE_ERROR; } //--------------------------------------------------------------------+ diff --git a/tinyusb/class/cdc_host.h b/tinyusb/class/cdc_host.h index 9d6c559c6..159d27856 100644 --- a/tinyusb/class/cdc_host.h +++ b/tinyusb/class/cdc_host.h @@ -55,6 +55,7 @@ #endif typedef enum { + CDC_PIPE_ERROR, CDC_PIPE_NOTIFICATION = 1, CDC_PIPE_DATA_IN, CDC_PIPE_DATA_OUT diff --git a/tinyusb/class/hid_host.h b/tinyusb/class/hid_host.h index a61a66e70..c8ace4eca 100644 --- a/tinyusb/class/hid_host.h +++ b/tinyusb/class/hid_host.h @@ -60,7 +60,7 @@ extern uint8_t const hid_keycode_to_ascii_tbl[2][128]; // TODO used weak attr if build failed without KEYBOARD enabled bool tusbh_hid_keyboard_is_mounted(uint8_t dev_addr) ATTR_PURE ATTR_WARN_UNUSED_RESULT; -tusb_error_t tusbh_hid_keyboard_get_report(uint8_t dev_addr, void * report) ATTR_WARN_UNUSED_RESULT; +tusb_error_t tusbh_hid_keyboard_get_report(uint8_t dev_addr, void * report) /*ATTR_WARN_UNUSED_RESULT*/; tusb_interface_status_t tusbh_hid_keyboard_status(uint8_t dev_addr) ATTR_WARN_UNUSED_RESULT; //------------- Application Callback -------------// void tusbh_hid_keyboard_isr(uint8_t dev_addr, tusb_event_t event) ATTR_WEAK; @@ -71,7 +71,7 @@ void tusbh_hid_keyboard_unmounted_isr(uint8_t dev_addr) ATTR_WEAK; // MOUSE Application API //--------------------------------------------------------------------+ bool tusbh_hid_mouse_is_mounted(uint8_t dev_addr) ATTR_PURE ATTR_WARN_UNUSED_RESULT; -tusb_error_t tusbh_hid_mouse_get_report(uint8_t dev_addr, void* report) ATTR_WARN_UNUSED_RESULT; +tusb_error_t tusbh_hid_mouse_get_report(uint8_t dev_addr, void* report) /*ATTR_WARN_UNUSED_RESULT*/; tusb_interface_status_t tusbh_hid_mouse_status(uint8_t dev_addr) ATTR_WARN_UNUSED_RESULT; //------------- Application Callback -------------// void tusbh_hid_mouse_isr(uint8_t dev_addr, tusb_event_t event) ATTR_WEAK; diff --git a/tinyusb/osal/osal_none.h b/tinyusb/osal/osal_none.h index 7a5b2ff78..853f33e67 100644 --- a/tinyusb/osal/osal_none.h +++ b/tinyusb/osal/osal_none.h @@ -248,12 +248,12 @@ static inline void osal_mutex_reset(osal_mutex_handle_t mutex_hdl) // QUEUE API //--------------------------------------------------------------------+ typedef struct{ - void * const buffer ; ///< buffer pointer - uint8_t const depth ; ///< max items - uint8_t const item_size ; ///< size of each item - volatile uint8_t count ; ///< number of items in queue - volatile uint8_t wr_idx ; ///< write pointer - volatile uint8_t rd_idx ; ///< read pointer + uint8_t* const buffer ; ///< buffer pointer + uint8_t const depth ; ///< max items + uint8_t const item_size ; ///< size of each item + volatile uint8_t count ; ///< number of items in queue + volatile uint8_t wr_idx ; ///< write pointer + volatile uint8_t rd_idx ; ///< read pointer } osal_queue_t; typedef osal_queue_t * osal_queue_handle_t; @@ -262,7 +262,7 @@ typedef osal_queue_t * osal_queue_handle_t; #define OSAL_QUEUE_DEF(name, queue_depth, type)\ type name##_buffer[queue_depth];\ osal_queue_t name = {\ - .buffer = name##_buffer,\ + .buffer = (uint8_t*) name##_buffer,\ .depth = queue_depth,\ .item_size = sizeof(type)\ } |
