diff --git a/RF24.cpp b/RF24.cpp index 0d5e99e..ddd9f02 100644 --- a/RF24.cpp +++ b/RF24.cpp @@ -220,14 +220,14 @@ void RF24::printDetails(void) uint8_t buffer[5]; uint8_t status = read_register(RX_ADDR_P0,buffer,5); print_status(status); - printf("RX_ADDR_P0 = 0x",buffer); + printf("RX_ADDR_P0 = 0x"); uint8_t *bufptr = buffer + 5; while( bufptr-- > buffer ) printf("%02x",*bufptr); printf("\n\r"); status = read_register(RX_ADDR_P1,buffer,5); - printf("RX_ADDR_P1 = 0x",buffer); + printf("RX_ADDR_P1 = 0x"); bufptr = buffer + 5; while( bufptr-- > buffer ) printf("%02x",*bufptr); @@ -242,7 +242,7 @@ void RF24::printDetails(void) printf("\n\r"); status = read_register(TX_ADDR,buffer,5); - printf("TX_ADDR = 0x",buffer); + printf("TX_ADDR = 0x"); bufptr = buffer + 5; while( bufptr-- > buffer ) printf("%02x",*bufptr); @@ -451,5 +451,5 @@ void RF24::openReadingPipe(uint8_t child, uint64_t value) write_register(EN_RXADDR,en_rx); } } -// vim:ai sts=2 sw=2 ft=cpp +// vim:ai:cin:sts=2 sw=2 ft=cpp diff --git a/RF24.h b/RF24.h index 0975fdf..4c4e653 100644 --- a/RF24.h +++ b/RF24.h @@ -347,5 +347,5 @@ public: */ #endif // __RF24_H__ -// vim:ai sts=2 sw=2 ft=cpp +// vim:ai:cin:sts=2 sw=2 ft=cpp diff --git a/examples/pingpair/makefile b/examples/pingpair/makefile index 55a4885..a1c6d4c 100644 --- a/examples/pingpair/makefile +++ b/examples/pingpair/makefile @@ -139,8 +139,8 @@ CXXINCS = -I$(ARDUINO_CORE) -I$(ARDUINO_LIB) #CSTANDARD = -std=gnu99 CDEBUG = -g$(DEBUG) #CWARN = -Wall -Wstrict-prototypes -#CWARN = -Wall # show all warnings -CWARN = -w # suppress all warnings +CWARN = -Wall # show all warnings +#CWARN = -w # suppress all warnings CMAP = -Wl,-Map,output.map ####CTUNING = -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums CTUNING = -ffunction-sections -fdata-sections @@ -198,6 +198,7 @@ build: elf hex output/$(PROJECT_NAME).cpp: $(PROJECT_NAME).pde test -d output || mkdir output echo "#include " > $@ + echo "#line 1 \"$<\"" >> $@ cat $< >> $@ elf: output/$(PROJECT_NAME).elf diff --git a/examples/pingpair/pingpair.pde b/examples/pingpair/pingpair.pde index 3a1cf41..b0b3f0e 100644 --- a/examples/pingpair/pingpair.pde +++ b/examples/pingpair/pingpair.pde @@ -29,7 +29,7 @@ RF24 radio(8,9); // sets the role of this unit in hardware. Connect to GND to be the 'pong' receiver -// Leave open to be the 'pong' receiver. +// Leave open to be the 'ping' transmitter const int role_pin = 7; // @@ -137,7 +137,7 @@ void loop(void) // Take the time, and send it. This will block until complete unsigned long time = millis(); printf("Now sending %lu...",time); - bool ok = radio.write( &time, sizeof(unsigned long) ); + radio.write( &time, sizeof(unsigned long) ); // Now, continue listening radio.startListening(); diff --git a/examples/pingpair/printf.h b/examples/pingpair/printf.h index 52e0c89..63501e4 100644 --- a/examples/pingpair/printf.h +++ b/examples/pingpair/printf.h @@ -21,6 +21,8 @@ int serial_putc( char c, FILE *t ) { Serial.write( c ); + + return c; } void printf_begin(void) diff --git a/examples/starping/makefile b/examples/starping/makefile index 42aa4e0..935d5dc 100644 --- a/examples/starping/makefile +++ b/examples/starping/makefile @@ -140,8 +140,8 @@ CXXINCS = -I$(ARDUINO_CORE) -I$(ARDUINO_LIB) #CSTANDARD = -std=gnu99 CDEBUG = -g$(DEBUG) #CWARN = -Wall -Wstrict-prototypes -#CWARN = -Wall # show all warnings -CWARN = -w # suppress all warnings +CWARN = -Wall # show all warnings +#CWARN = -w # suppress all warnings CMAP = -Wl,-Map,output.map ####CTUNING = -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums CTUNING = -ffunction-sections -fdata-sections diff --git a/examples/starping/printf.h b/examples/starping/printf.h index 52e0c89..63501e4 100644 --- a/examples/starping/printf.h +++ b/examples/starping/printf.h @@ -21,6 +21,8 @@ int serial_putc( char c, FILE *t ) { Serial.write( c ); + + return c; } void printf_begin(void) diff --git a/examples/starping/starping.pde b/examples/starping/starping.pde index f3c4e9c..828b07d 100644 --- a/examples/starping/starping.pde +++ b/examples/starping/starping.pde @@ -201,7 +201,7 @@ void loop(void) // Take the time, and send it. This will block until complete unsigned long time = millis(); printf("Now sending %lu...",time); - bool ok = radio.write( &time, sizeof(unsigned long) ); + radio.write( &time, sizeof(unsigned long) ); // Now, continue listening radio.startListening();