diff --git a/.gitignore b/.gitignore index bac8ddd..4b1d772 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +*.bak *.o .*.swp *.orig diff --git a/RF24.cpp b/RF24.cpp index 958877b..53cf1ee 100644 --- a/RF24.cpp +++ b/RF24.cpp @@ -364,9 +364,9 @@ void RF24::powerDown(void) /******************************************************************/ -boolean RF24::write( const void* buf, uint8_t len ) +bool RF24::write( const void* buf, uint8_t len ) { - boolean result = false; + bool result = false; // Begin the write startWrite(buf,len); @@ -456,20 +456,20 @@ uint8_t RF24::getDynamicPayloadSize(void) /******************************************************************/ -boolean RF24::available(void) +bool RF24::available(void) { return available(NULL); } /******************************************************************/ -boolean RF24::available(uint8_t* pipe_num) +bool RF24::available(uint8_t* pipe_num) { uint8_t status = get_status(); // Too noisy, enable if you really want lots o data!! IF_SERIAL_DEBUG(print_status(status)); - boolean result = ( status & _BV(RX_DR) ); + bool result = ( status & _BV(RX_DR) ); if (result) { @@ -496,7 +496,7 @@ boolean RF24::available(uint8_t* pipe_num) /******************************************************************/ -boolean RF24::read( void* buf, uint8_t len ) +bool RF24::read( void* buf, uint8_t len ) { // Fetch the payload read_payload( buf, len ); @@ -648,9 +648,9 @@ void RF24::writeAckPayload(uint8_t pipe, const void* buf, uint8_t len) /******************************************************************/ -boolean RF24::isAckPayloadAvailable(void) +bool RF24::isAckPayloadAvailable(void) { - boolean result = ack_payload_available; + bool result = ack_payload_available; ack_payload_available = false; return result; } @@ -667,7 +667,7 @@ void RF24::setAutoAck(bool enable) /******************************************************************/ -boolean RF24::testCarrier(void) +bool RF24::testCarrier(void) { return ( read_register(CD) & 1 ); } diff --git a/RF24.h b/RF24.h index 58a4a92..1f28ef8 100644 --- a/RF24.h +++ b/RF24.h @@ -24,7 +24,7 @@ private: uint8_t ce_pin; /**< "Chip Enable" pin, activates the RX or TX role */ uint8_t csn_pin; /**< SPI Chip select */ uint8_t payload_size; /**< Fixed size of payloads */ - boolean ack_payload_available; /**< Whether there is an ack payload waiting */ + bool ack_payload_available; /**< Whether there is an ack payload waiting */ uint8_t ack_payload_length; /**< Dynamic size of pending ack payload. Note: not used. */ uint64_t pipe0_reading_address; /**< Last address set on pipe 0 for reading. */ @@ -246,14 +246,14 @@ public: * @param len Number of bytes to be sent * @return True if the payload was delivered successfully false if not */ - boolean write( const void* buf, uint8_t len ); + bool write( const void* buf, uint8_t len ); /** * Test whether there are bytes available to be read * * @return True if there is a payload available, false if none is */ - boolean available(void); + bool available(void); /** * Read the payload @@ -269,7 +269,7 @@ public: * @param len Maximum number of bytes to read into the buffer * @return True if the payload was delivered successfully false if not */ - boolean read( void* buf, uint8_t len ); + bool read( void* buf, uint8_t len ); /** * Open a pipe for writing @@ -398,7 +398,7 @@ public: * @param[out] pipe_num Which pipe has the payload available * @return True if there is a payload available, false if none is */ - boolean available(uint8_t* pipe_num); + bool available(uint8_t* pipe_num); /** * Non-blocking write to the open writing pipe @@ -464,7 +464,7 @@ public: * * @return True if an ack payload is available. */ - boolean isAckPayloadAvailable(void); + bool isAckPayloadAvailable(void); /** * Call this when you get an interrupt to find out why @@ -496,7 +496,7 @@ public: * * @return true if was carrier, false if not */ - boolean testCarrier(void); + bool testCarrier(void); /** * Set the transmission data rate diff --git a/examples/led_remote/led_remote.pde b/examples/led_remote/led_remote.pde index 7550a90..45f971d 100644 --- a/examples/led_remote/led_remote.pde +++ b/examples/led_remote/led_remote.pde @@ -229,7 +229,7 @@ void loop(void) if ( radio.available() ) { // Dump the payloads until we've gotten everything - boolean done = false; + bool done = false; while (!done) { // Fetch the payload, and see if this was the last one. diff --git a/examples/pingpair/pingpair.pde b/examples/pingpair/pingpair.pde index 9590b40..bd4b439 100644 --- a/examples/pingpair/pingpair.pde +++ b/examples/pingpair/pingpair.pde @@ -192,7 +192,7 @@ void loop(void) { // Dump the payloads until we've gotten everything unsigned long got_time; - boolean done = false; + bool done = false; while (!done) { // Fetch the payload, and see if this was the last one. diff --git a/examples/pingpair_dyn/pingpair_dyn.pde b/examples/pingpair_dyn/pingpair_dyn.pde index 3ee7c86..7655505 100644 --- a/examples/pingpair_dyn/pingpair_dyn.pde +++ b/examples/pingpair_dyn/pingpair_dyn.pde @@ -209,7 +209,7 @@ void loop(void) { // Dump the payloads until we've gotten everything uint8_t len; - boolean done = false; + bool done = false; while (!done) { // Fetch the payload, and see if this was the last one. diff --git a/examples/pingpair_pl/pingpair_pl.pde b/examples/pingpair_pl/pingpair_pl.pde index da1dc36..8980293 100644 --- a/examples/pingpair_pl/pingpair_pl.pde +++ b/examples/pingpair_pl/pingpair_pl.pde @@ -160,7 +160,7 @@ void loop(void) { // Dump the payloads until we've gotten everything static unsigned long got_time; - boolean done = false; + bool done = false; while (!done) { // Fetch the payload, and see if this was the last one. diff --git a/examples/pingpair_sleepy/pingpair_sleepy.pde b/examples/pingpair_sleepy/pingpair_sleepy.pde index 7ef0db2..dea0d3c 100644 --- a/examples/pingpair_sleepy/pingpair_sleepy.pde +++ b/examples/pingpair_sleepy/pingpair_sleepy.pde @@ -227,7 +227,7 @@ void loop(void) { // Dump the payloads until we've gotten everything unsigned long got_time; - boolean done = false; + bool done = false; while (!done) { // Fetch the payload, and see if this was the last one. diff --git a/examples/starping/starping.pde b/examples/starping/starping.pde index 28470c1..ac5197a 100644 --- a/examples/starping/starping.pde +++ b/examples/starping/starping.pde @@ -244,7 +244,7 @@ void loop(void) { // Dump the payloads until we've gotten everything unsigned long got_time; - boolean done = false; + bool done = false; while (!done) { // Fetch the payload, and see if this was the last one.