From bc9274591fe4b1b21cbe85aa9a4ebf4e8d2723e9 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 2 Mar 2018 19:00:03 +0700 Subject: clean up compiler --- tinyusb/class/cdc.h | 1 - tinyusb/class/cdc_host.c | 4 +--- tinyusb/class/custom_class.h | 2 +- tinyusb/class/hid_host.c | 3 --- tinyusb/class/msc_host.c | 1 - 5 files changed, 2 insertions(+), 9 deletions(-) (limited to 'tinyusb/class') diff --git a/tinyusb/class/cdc.h b/tinyusb/class/cdc.h index 5cabf1ec4..2bc6448c3 100644 --- a/tinyusb/class/cdc.h +++ b/tinyusb/class/cdc.h @@ -374,7 +374,6 @@ typedef struct ATTR_PACKED } bmCapabilities; }cdc_desc_func_telephone_call_state_reporting_capabilities_t; -static inline uint8_t cdc_functional_desc_typeof(uint8_t const * p_desc) ATTR_PURE ATTR_ALWAYS_INLINE; static inline uint8_t cdc_functional_desc_typeof(uint8_t const * p_desc) { return p_desc[2]; diff --git a/tinyusb/class/cdc_host.c b/tinyusb/class/cdc_host.c index 04ca46f00..ddacdb1f3 100644 --- a/tinyusb/class/cdc_host.c +++ b/tinyusb/class/cdc_host.c @@ -57,7 +57,6 @@ //--------------------------------------------------------------------+ STATIC_VAR cdch_data_t cdch_data[TUSB_CFG_HOST_DEVICE_MAX]; // TODO to be static -static inline cdc_pipeid_t get_app_pipeid(pipe_handle_t pipe_hdl) ATTR_PURE ATTR_ALWAYS_INLINE; 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]; @@ -68,8 +67,7 @@ static inline cdc_pipeid_t get_app_pipeid(pipe_handle_t pipe_hdl) } -STATIC_ INLINE_ bool tusbh_cdc_is_mounted(uint8_t dev_addr) ATTR_PURE ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT; -STATIC_ INLINE_ bool tusbh_cdc_is_mounted(uint8_t dev_addr) +static inline bool tusbh_cdc_is_mounted(uint8_t dev_addr) { // FIXME cannot use mounted class flag as at the point _open_sublass is called, the flag is not set yet #ifdef _TEST_ diff --git a/tinyusb/class/custom_class.h b/tinyusb/class/custom_class.h index 850f12a39..787c59abd 100644 --- a/tinyusb/class/custom_class.h +++ b/tinyusb/class/custom_class.h @@ -58,7 +58,7 @@ typedef struct { //--------------------------------------------------------------------+ // USBH-CLASS DRIVER API //--------------------------------------------------------------------+ -STATIC_ INLINE_ bool tusbh_custom_is_mounted(uint8_t dev_addr, uint16_t vendor_id, uint16_t product_id) +static inline bool tusbh_custom_is_mounted(uint8_t dev_addr, uint16_t vendor_id, uint16_t product_id) { (void) vendor_id; // TODO check this later (void) product_id; diff --git a/tinyusb/class/hid_host.c b/tinyusb/class/hid_host.c index 1263d4cf1..0f39a0487 100644 --- a/tinyusb/class/hid_host.c +++ b/tinyusb/class/hid_host.c @@ -54,7 +54,6 @@ //--------------------------------------------------------------------+ // HID Interface common functions //--------------------------------------------------------------------+ -static inline tusb_error_t hidh_interface_open(uint8_t dev_addr, uint8_t interface_number, tusb_descriptor_endpoint_t const *p_endpoint_desc, hidh_interface_info_t *p_hid) ATTR_ALWAYS_INLINE; static inline tusb_error_t hidh_interface_open(uint8_t dev_addr, uint8_t interface_number, tusb_descriptor_endpoint_t const *p_endpoint_desc, hidh_interface_info_t *p_hid) { p_hid->pipe_hdl = hcd_pipe_open(dev_addr, p_endpoint_desc, TUSB_CLASS_HID); @@ -66,7 +65,6 @@ static inline tusb_error_t hidh_interface_open(uint8_t dev_addr, uint8_t interfa return TUSB_ERROR_NONE; } -static inline void hidh_interface_close(hidh_interface_info_t *p_hid) ATTR_ALWAYS_INLINE; static inline void hidh_interface_close(hidh_interface_info_t *p_hid) { (void) hcd_pipe_close(p_hid->pipe_hdl); @@ -74,7 +72,6 @@ static inline void hidh_interface_close(hidh_interface_info_t *p_hid) } // called from public API need to validate parameters -tusb_error_t hidh_interface_get_report(uint8_t dev_addr, void * report, hidh_interface_info_t *p_hid) ATTR_ALWAYS_INLINE; tusb_error_t hidh_interface_get_report(uint8_t dev_addr, void * report, hidh_interface_info_t *p_hid) { //------------- parameters validation -------------// diff --git a/tinyusb/class/msc_host.c b/tinyusb/class/msc_host.c index 00186ddd9..cff0bf472 100644 --- a/tinyusb/class/msc_host.c +++ b/tinyusb/class/msc_host.c @@ -102,7 +102,6 @@ tusb_error_t tuh_msc_get_capacity(uint8_t dev_addr, uint32_t* p_last_lba, uint32 //--------------------------------------------------------------------+ // PUBLIC API: SCSI COMMAND //--------------------------------------------------------------------+ -static inline void msc_cbw_add_signature(msc_cmd_block_wrapper_t *p_cbw, uint8_t lun) ATTR_ALWAYS_INLINE; static inline void msc_cbw_add_signature(msc_cmd_block_wrapper_t *p_cbw, uint8_t lun) { p_cbw->signature = MSC_CBW_SIGNATURE; -- cgit v1.3.1