mirror of
https://github.com/brmlab/edubrm.git
synced 2025-06-08 21:03:59 +02:00
enable alls warnings, treat them as errors
This commit is contained in:
parent
1b0e861f3e
commit
899f2d18f3
3 changed files with 18 additions and 8 deletions
|
@ -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
|
||||
LIST = $(shell cd src/ ; ls *.c)
|
||||
OBJS = $(addprefix obj/,$(LIST:.c=.o))
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#define mainLED_BIT ( 7 )
|
||||
|
||||
void VCOM_Brm2Usb(void) {
|
||||
void VCOM_Brm2Usb() {
|
||||
/*
|
||||
static char serBuf [USB_CDC_BUFSIZE];
|
||||
int numBytesRead, numAvailByte;
|
||||
|
@ -28,7 +28,7 @@ void VCOM_Brm2Usb(void) {
|
|||
serBuf[0] = 'A';
|
||||
numBytesRead = 1;
|
||||
|
||||
/* ser_AvailChar (&numAvailByte);
|
||||
ser_AvailChar (&numAvailByte);
|
||||
if (numAvailByte > 0) {
|
||||
if (CDC_DepInEmpty) {
|
||||
numBytesRead = ser_Read (&serBuf[0], &numAvailByte);
|
||||
|
@ -37,7 +37,6 @@ void VCOM_Brm2Usb(void) {
|
|||
|
||||
USB_WriteEP (CDC_DEP_IN, (unsigned char *)&serBuf[0], numBytesRead);
|
||||
}
|
||||
/*
|
||||
}
|
||||
*/
|
||||
|
||||
|
@ -46,7 +45,7 @@ void VCOM_Brm2Usb(void) {
|
|||
static char cmdInbuffer[256];
|
||||
int cmdInbufferIndex = 0;
|
||||
|
||||
int checkForCommand(void) {
|
||||
int checkForCommand() {
|
||||
int i=0;
|
||||
for (i=0;i<cmdInbufferIndex;i++) {
|
||||
if (cmdInbuffer[i] == '\n' ) {
|
||||
|
@ -67,14 +66,14 @@ void disableLED() {
|
|||
LPC_GPIO0->DIR |= ( 0x0 << mainLED_BIT );
|
||||
}
|
||||
|
||||
void toggleLED( ){
|
||||
void toggleLED() {
|
||||
ulLEDState = !ulLEDState;
|
||||
LPC_GPIO0->MASKED_ACCESS[ ( 1 << mainLED_BIT) ] = ( ulLEDState << mainLED_BIT );
|
||||
|
||||
}
|
||||
|
||||
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];
|
||||
int numBytesToRead, numBytesRead, numAvailByte;
|
||||
int i=0;
|
||||
|
|
|
@ -3,4 +3,15 @@
|
|||
|
||||
#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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue