Merge branch 'master' of github.com:maniacbug/RF24
This commit is contained in:
commit
e005ec75f1
8
RF24.cpp
8
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
|
||||
|
||||
|
|
2
RF24.h
2
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
|
||||
|
||||
|
|
|
@ -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 <WProgram.h>" > $@
|
||||
echo "#line 1 \"$<\"" >> $@
|
||||
cat $< >> $@
|
||||
|
||||
elf: output/$(PROJECT_NAME).elf
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
int serial_putc( char c, FILE *t )
|
||||
{
|
||||
Serial.write( c );
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
void printf_begin(void)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
int serial_putc( char c, FILE *t )
|
||||
{
|
||||
Serial.write( c );
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
void printf_begin(void)
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue