enable alls warnings, treat them as errors

This commit is contained in:
Pavol Rusnak 2011-04-02 02:18:33 +02:00
parent 1b0e861f3e
commit 899f2d18f3
3 changed files with 18 additions and 8 deletions

View file

@ -1,4 +1,4 @@
CFLAGS = -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv1p30_LPC13xx -Iinc -O0 -g3 -Wall -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m3 -mthumb CFLAGS = -Wall -Werror -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv1p30_LPC13xx -Iinc -O0 -g3 -Wall -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m3 -mthumb
LDFLAGS = -nostdlib -Xlinker -Map=obj/edubrm.map --gc-sections -mcpu=cortex-m3 -mthumb -T obj/debug.ld LDFLAGS = -nostdlib -Xlinker -Map=obj/edubrm.map --gc-sections -mcpu=cortex-m3 -mthumb -T obj/debug.ld
LIST = $(shell cd src/ ; ls *.c) LIST = $(shell cd src/ ; ls *.c)
OBJS = $(addprefix obj/,$(LIST:.c=.o)) OBJS = $(addprefix obj/,$(LIST:.c=.o))

View file

@ -19,7 +19,7 @@
#define mainLED_BIT ( 7 ) #define mainLED_BIT ( 7 )
void VCOM_Brm2Usb(void) { void VCOM_Brm2Usb() {
/* /*
static char serBuf [USB_CDC_BUFSIZE]; static char serBuf [USB_CDC_BUFSIZE];
int numBytesRead, numAvailByte; int numBytesRead, numAvailByte;
@ -28,7 +28,7 @@ void VCOM_Brm2Usb(void) {
serBuf[0] = 'A'; serBuf[0] = 'A';
numBytesRead = 1; numBytesRead = 1;
/* ser_AvailChar (&numAvailByte); ser_AvailChar (&numAvailByte);
if (numAvailByte > 0) { if (numAvailByte > 0) {
if (CDC_DepInEmpty) { if (CDC_DepInEmpty) {
numBytesRead = ser_Read (&serBuf[0], &numAvailByte); numBytesRead = ser_Read (&serBuf[0], &numAvailByte);
@ -37,7 +37,6 @@ void VCOM_Brm2Usb(void) {
USB_WriteEP (CDC_DEP_IN, (unsigned char *)&serBuf[0], numBytesRead); USB_WriteEP (CDC_DEP_IN, (unsigned char *)&serBuf[0], numBytesRead);
} }
/*
} }
*/ */
@ -46,7 +45,7 @@ void VCOM_Brm2Usb(void) {
static char cmdInbuffer[256]; static char cmdInbuffer[256];
int cmdInbufferIndex = 0; int cmdInbufferIndex = 0;
int checkForCommand(void) { int checkForCommand() {
int i=0; int i=0;
for (i=0;i<cmdInbufferIndex;i++) { for (i=0;i<cmdInbufferIndex;i++) {
if (cmdInbuffer[i] == '\n' ) { if (cmdInbuffer[i] == '\n' ) {
@ -67,14 +66,14 @@ void disableLED() {
LPC_GPIO0->DIR |= ( 0x0 << mainLED_BIT ); LPC_GPIO0->DIR |= ( 0x0 << mainLED_BIT );
} }
void toggleLED( ){ void toggleLED() {
ulLEDState = !ulLEDState; ulLEDState = !ulLEDState;
LPC_GPIO0->MASKED_ACCESS[ ( 1 << mainLED_BIT) ] = ( ulLEDState << mainLED_BIT ); LPC_GPIO0->MASKED_ACCESS[ ( 1 << mainLED_BIT) ] = ( ulLEDState << mainLED_BIT );
} }
void sendToUSB(char *string) { void sendToUSB(char *string) {
USB_WriteEP (CDC_DEP_IN, string, strlen(string)); USB_WriteEP (CDC_DEP_IN, (unsigned char *)string, strlen(string));
} }
@ -92,7 +91,7 @@ void commandReceived(char * receivedCommand) {
void VCOM_Usb2Brm(void) { void VCOM_Usb2Brm() {
static char serBuf [32]; static char serBuf [32];
int numBytesToRead, numBytesRead, numAvailByte; int numBytesToRead, numBytesRead, numAvailByte;
int i=0; int i=0;

View file

@ -3,4 +3,15 @@
#define VERSION "0.0000001 pre-alpha\n" #define VERSION "0.0000001 pre-alpha\n"
void VCOM_Brm2Usb();
int checkForCommand();
void enableLED();
void disableLED();
void toggleLED();
void sendToUSB(char *string);
void commandReceived(char * receivedCommand);
void VCOM_Usb2Brm();
#endif #endif