Skip to content

Commit

Permalink
Merge pull request #23 from nimo-labs/compiler_warning_fixes
Browse files Browse the repository at this point in the history
Compiler warning fixes
  • Loading branch information
nimo-labs committed Feb 23, 2024
2 parents d2eb68f + 42d9e4a commit 1c2d157
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 21 deletions.
15 changes: 0 additions & 15 deletions FreeRTOS/Source/include/CMakeLists.txt

This file was deleted.

6 changes: 4 additions & 2 deletions FreeRTOS/Source/portable/GCC/ARM_CM0/printf-stdarg.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
*/

// #define putchar(c) c

#include <stdarg.h>
#include <stdint.h>

#include <usbVcom.h>

static void printchar(char **str, int c)
{
//extern int putchar(int c);
Expand Down Expand Up @@ -240,7 +240,9 @@ int snprintf( char *buf, unsigned int count, const char *format, ... )

void *_sbrk(int32_t incr)
{
(void) incr;

return NULL;
}

#ifdef TEST_PRINTF
Expand Down
1 change: 1 addition & 0 deletions delay/m032.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ void SysTick_Handler(void)
{
sysTickTicks++;
#ifdef NIMOLIB_FREERTOS
extern void xPortSysTickHandler( void );
xPortSysTickHandler();
#endif
}
11 changes: 7 additions & 4 deletions usbVcom/m032/m032.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "usbd.h"

uint8_t volatile g_u8Suspend = 0;
static volatile uint8_t txBuf[SIMPLE_VCOM_TX_BUFSIZE];
static uint8_t txBuf[SIMPLE_VCOM_TX_BUFSIZE];
static volatile uint32_t txBufHead = 0;
static volatile uint32_t txBufTail = 0;
static volatile uint8_t txLock=0;
Expand Down Expand Up @@ -216,7 +216,7 @@ void usbTriggerSend(void)
sendDataSize = SIMPLE_VCOM_TX_BUFSIZE - txBufTail;
USBD_MemCopy((uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2)), &txBuf[txBufTail], sendDataSize);
txBufTail=0;
if(txBufHead <= (64-sendDataSize)) /*Unsent data <= 64 bytes*/
if(txBufHead <= (uint8_t)(64-sendDataSize)) /*Unsent data <= 64 bytes*/
{
USBD_MemCopy((uint8_t *)(USBD_BUF_BASE + USBD_GET_EP_BUF_ADDR(EP2))+sendDataSize, &txBuf[txBufTail], txBufHead);
txBufTail+=txBufHead;
Expand Down Expand Up @@ -372,7 +372,8 @@ void VCOM_ClassRequest(void)

__attribute__((weak)) void vcomRecv(uint8_t *data, uint32_t size)
{

(void) data;
(void) size;
}

uint8_t vcomSend(uint8_t *data, uint32_t size)
Expand Down Expand Up @@ -405,5 +406,7 @@ uint8_t vcomSend(uint8_t *data, uint32_t size)

int putchar(int c)
{
vcomSend(&c, 1);
uint8_t uiC = (uint8_t) c;
vcomSend(&uiC, 1);
return 0;
}
1 change: 1 addition & 0 deletions usbVcom/m032/m032.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ void EP2_Handler(void);
void EP3_Handler(void);
void VCOM_LineCoding(uint8_t port);
void VCOM_TransferData(void);
int putchar(int c);

#endif /* __USBD_CDC_H_ */

Expand Down

0 comments on commit 1c2d157

Please sign in to comment.