From c35e668dc4a6bce1706ae6bfa63491bfbc409889 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 5 Mar 2014 21:37:53 +0700 Subject: [PATCH] IAR host os none work well with ea4357 --- demos/bsp/boards/printf_retarget.c | 36 ++- demos/host/host_os_none/host_os_none.ewp | 2 +- demos/host/host_os_none/host_os_none.uvopt | 26 +-- tinyusb/tusb.h | 243 +++++++++++---------- 4 files changed, 150 insertions(+), 157 deletions(-) diff --git a/demos/bsp/boards/printf_retarget.c b/demos/bsp/boards/printf_retarget.c index dd33d2dba..ee95f25ef 100644 --- a/demos/bsp/boards/printf_retarget.c +++ b/demos/bsp/boards/printf_retarget.c @@ -41,11 +41,11 @@ #if CFG_PRINTF_TARGET != PRINTF_TARGET_SEMIHOST #if CFG_PRINTF_TARGET == PRINTF_TARGET_UART - #define retarget_getchar() board_uart_getchar() + #define retarget_getchar() board_uart_getchar() #define retarget_putchar(c) board_uart_putchar(c); #elif CFG_PRINTF_TARGET == PRINTF_TARGET_SWO volatile int32_t ITM_RxBuffer; // keil variable to read from SWO - #define retarget_getchar() ITM_ReceiveChar() + #define retarget_getchar() ITM_ReceiveChar() #define retarget_putchar(c) ITM_SendChar(c) #else #error Target is not implemented yet @@ -68,17 +68,14 @@ int __sys_write (int iFileHandle, char *buf, int length) { (void) iFileHandle; - int ret = length; for (int i=0; i @@ -133,18 +130,14 @@ size_t __write(int handle, const unsigned char *buf, size_t length) /* Check for stdout and stderr (only necessary if FILE descriptors are enabled.) */ if (handle != 1 && handle != 2) return -1; - size_t ret = length; for (size_t i=0; i