astyle -A1 -s2

This commit is contained in:
maniacbug 2011-07-08 22:29:16 -07:00
parent b000a87aa1
commit 32e8b3fbbb
2 changed files with 499 additions and 493 deletions

View File

@ -529,12 +529,18 @@ void RF24::openWritingPipe(uint64_t value)
void RF24::openReadingPipe(uint8_t child, uint64_t value)
{
const uint8_t child_pipe[] = {
RX_ADDR_P0, RX_ADDR_P1, RX_ADDR_P2, RX_ADDR_P3, RX_ADDR_P4, RX_ADDR_P5 };
const uint8_t child_payload_size[] = {
RX_PW_P0, RX_PW_P1, RX_PW_P2, RX_PW_P3, RX_PW_P4, RX_PW_P5 };
const uint8_t child_pipe_enable[] = {
ERX_P0, ERX_P1, ERX_P2, ERX_P3, ERX_P4, ERX_P5 };
const uint8_t child_pipe[] =
{
RX_ADDR_P0, RX_ADDR_P1, RX_ADDR_P2, RX_ADDR_P3, RX_ADDR_P4, RX_ADDR_P5
};
const uint8_t child_payload_size[] =
{
RX_PW_P0, RX_PW_P1, RX_PW_P2, RX_PW_P3, RX_PW_P4, RX_PW_P5
};
const uint8_t child_pipe_enable[] =
{
ERX_P0, ERX_P1, ERX_P2, ERX_P3, ERX_P4, ERX_P5
};
// If this is pipe 0, cache the address. This is needed because
// openWritingPipe() will overwrite the pipe 0 address, so

20
RF24.h
View File

@ -43,7 +43,7 @@ protected:
*
* @param mode HIGH to take this unit off the SPI bus, LOW to put it on
*/
void csn(int mode) ;
void csn(int mode);
/**
* Set chip enable
@ -61,7 +61,7 @@ protected:
* @param len How many bytes of data to transfer
* @return Current value of status register
*/
uint8_t read_register(uint8_t reg, uint8_t* buf, uint8_t len) ;
uint8_t read_register(uint8_t reg, uint8_t* buf, uint8_t len);
/**
* Read single byte from a register
@ -110,7 +110,7 @@ protected:
* @param len Maximum number of bytes to read
* @return Current value of status register
*/
uint8_t read_payload(void* buf, uint8_t len) ;
uint8_t read_payload(void* buf, uint8_t len);
/**
* Read the payload length
@ -141,7 +141,7 @@ protected:
*
* @return Current value of status register
*/
uint8_t get_status(void) ;
uint8_t get_status(void);
/**
* Decode and print the given status to stdout
@ -150,7 +150,7 @@ protected:
*
* @warning Does nothing if stdout is not defined. See fdevopen in stdio.h
*/
void print_status(uint8_t status) ;
void print_status(uint8_t status);
/**
* Decode and print the given 'observe_tx' value to stdout
@ -159,7 +159,7 @@ protected:
*
* @warning Does nothing if stdout is not defined. See fdevopen in stdio.h
*/
void print_observe_tx(uint8_t value) ;
void print_observe_tx(uint8_t value);
/**
* Print the name and value of an 8-bit register to stdout
@ -263,7 +263,7 @@ public:
*
* @return True if there is a payload available, false if none is
*/
boolean available(void) ;
boolean available(void);
/**
* Read the payload
@ -279,7 +279,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 ) ;
boolean read( void* buf, uint8_t len );
/**
* Open a pipe for writing
@ -372,14 +372,14 @@ public:
*
* @return The number of bytes in the payload
*/
uint8_t getPayloadSize(void) ;
uint8_t getPayloadSize(void);
/**
* Print a giant block of debugging information to stdout
*
* @warning Does nothing if stdout is not defined. See fdevopen in stdio.h
*/
void printDetails(void) ;
void printDetails(void);
/**
* Enter low-power mode