From b81561b4369d75108040740570774f0712793d0d Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 22 Jan 2013 18:19:05 +0700 Subject: [PATCH] use unsigned char instead of char for error string use #if 0 instead of // for remove code --- tinyusb/class/cdc.c | 10 ++++++---- tinyusb/common/errors.c | 2 +- tinyusb/common/errors.h | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tinyusb/class/cdc.c b/tinyusb/class/cdc.c index d6b0ec51..138666f4 100644 --- a/tinyusb/class/cdc.c +++ b/tinyusb/class/cdc.c @@ -188,12 +188,14 @@ uint16_t tusb_cdc_recv(uint8_t* buffer, uint16_t max) return fifo_read_n(&ffRX, buffer, max); } +#if 0 // ROM driver bug: cannot hook this to CIC_GetRequest // Need this to implement GetLineCode & detect -//ErrorCode_t CDC_Control_GetRequest(USBD_HANDLE_T hUsb, USB_SETUP_PACKET *pSetup, uint8_t **pBuffer, uint16_t *length) -//{ -// return LPC_OK; -//} +ErrorCode_t CDC_Control_GetRequest(USBD_HANDLE_T hUsb, USB_SETUP_PACKET *pSetup, uint8_t **pBuffer, uint16_t *length) +{ + return LPC_OK; +} +#endif /**************************************************************************/ /*! diff --git a/tinyusb/common/errors.c b/tinyusb/common/errors.c index 58b9e6b8..0b36a6c8 100644 --- a/tinyusb/common/errors.c +++ b/tinyusb/common/errors.c @@ -39,7 +39,7 @@ #if TUSB_CFG_DEBUG == 3 -char const* const TUSB_ErrorStr[] = +unsigned char const* const TUSB_ErrorStr[] = { ERROR_TABLE(ERROR_STRING) 0 diff --git a/tinyusb/common/errors.h b/tinyusb/common/errors.h index e771794c..bf199836 100644 --- a/tinyusb/common/errors.h +++ b/tinyusb/common/errors.h @@ -76,7 +76,7 @@ typedef enum { #if TUSB_CFG_DEBUG == 3 /// Enum to String for debugging purposes. Only available if \ref TUSB_CFG_DEBUG > 0 -extern char const* const TUSB_ErrorStr[]; +extern unsigned char const* const TUSB_ErrorStr[]; #endif #ifdef __cplusplus