From a22cfb2dee31e437ca43351e705b60e143f169d6 Mon Sep 17 00:00:00 2001 From: hathach Date: Sun, 27 Jan 2013 12:38:06 +0700 Subject: [PATCH] remove violation MISRA 6.3 on errors --- tinyusb/class/hid_host.c | 2 +- tinyusb/class/hid_host.h | 2 +- tinyusb/common/errors.c | 2 +- tinyusb/common/errors.h | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tinyusb/class/hid_host.c b/tinyusb/class/hid_host.c index 3853f2538..a22c97407 100644 --- a/tinyusb/class/hid_host.c +++ b/tinyusb/class/hid_host.c @@ -88,7 +88,7 @@ uint8_t tusbh_hid_keyboard_no_instances(tusb_handle_device_t const device_hdl) //--------------------------------------------------------------------+ // CLASS-USBD API //--------------------------------------------------------------------+ -tusb_error_t class_hid_keyboard_init(void) +void class_hid_keyboard_init(void) { memset(&keyboard_info_pool, 0, sizeof(class_hid_keyboard_info_t)*TUSB_CFG_HOST_DEVICE_MAX); } diff --git a/tinyusb/class/hid_host.h b/tinyusb/class/hid_host.h index a34a813d9..d1729b10b 100644 --- a/tinyusb/class/hid_host.h +++ b/tinyusb/class/hid_host.h @@ -80,7 +80,7 @@ typedef struct { keyboard_interface_t instance[TUSB_CFG_HOST_HID_KEYBOARD_NO_INSTANCES_PER_DEVICE]; } class_hid_keyboard_info_t; -tusb_error_t class_hid_keyboard_init(void); +void class_hid_keyboard_init(void); tusb_error_t class_hid_keyboard_install(uint8_t const dev_addr, uint8_t const *descriptor); #endif diff --git a/tinyusb/common/errors.c b/tinyusb/common/errors.c index 0b36a6c8b..53e10d763 100644 --- a/tinyusb/common/errors.c +++ b/tinyusb/common/errors.c @@ -39,7 +39,7 @@ #if TUSB_CFG_DEBUG == 3 -unsigned char const* const TUSB_ErrorStr[] = +uint8_t const* const TUSB_ErrorStr[] = { ERROR_TABLE(ERROR_STRING) 0 diff --git a/tinyusb/common/errors.h b/tinyusb/common/errors.h index 3b37154d3..e55ab3f4e 100644 --- a/tinyusb/common/errors.h +++ b/tinyusb/common/errors.h @@ -49,6 +49,7 @@ #ifndef _TUSB_ERRORS_H_ #define _TUSB_ERRORS_H_ +#include #include "../tusb_option.h" #ifdef __cplusplus @@ -77,7 +78,7 @@ typedef enum { #if TUSB_CFG_DEBUG == 3 /// Enum to String for debugging purposes. Only available if \ref TUSB_CFG_DEBUG > 0 -extern unsigned char const* const TUSB_ErrorStr[]; +extern uint8_t const* const TUSB_ErrorStr[]; #endif #ifdef __cplusplus