Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RF24
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
RF24
Commits
48336102
Commit
48336102
authored
Aug 02, 2011
by
maniacbug
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reorganize header file to better group the now very large list of methods
parent
b715bf0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
114 additions
and
105 deletions
+114
-105
RF24.h
RF24.h
+114
-105
No files found.
RF24.h
View file @
48336102
...
...
@@ -329,12 +329,13 @@ public:
/**@}*/
/**
* @name Optional
public interface
* @name Optional
Configurators
*
* Methods you may want to use but are not needed for regular operation
* Methods you can use to get or set the configuration of the chip.
* None are required. Calling begin() sets up a reasonable set of
* defaults.
*/
/**@{*/
/**
* Set the number and delay of retries upon failed submit
*
...
...
@@ -383,6 +384,116 @@ public:
* @return Payload length of last-received dynamic payload
*/
uint8_t
getDynamicPayloadSize
(
void
);
/**
* Enable custom payloads on the acknowledge packets
*
* Ack payloads are a handy way to return data back to senders without
* manually changing the radio modes on both units.
*
* @see examples/pingpair_pl/pingpair_pl.pde
*/
void
enableAckPayload
(
void
);
/**
* Enable dynamically-sized payloads
*
* This way you don't always have to send large packets just to send them
* once in a while. This enables dynamic payloads on ALL pipes.
*
* @see examples/pingpair_pl/pingpair_dyn.pde
*/
void
enableDynamicPayloads
(
void
);
/**
* Determine whether the hardware is an nRF24L01+ or not.
*
* @return true if the hardware is nRF24L01+ (or compatible) and false
* if its not.
*/
bool
isPVariant
(
void
)
;
/**
* Enable or disable auto-acknowlede packets
*
* This is enabled by default, so it's only needed if you want to turn
* it off for some reason.
*
* @param enable Whether to enable (true) or disable (false) auto-acks
*/
void
setAutoAck
(
bool
enable
);
/**
* Enable or disable auto-acknowlede packets on a per pipeline basis.
*
* AA is enabled by default, so it's only needed if you want to turn
* it off/on for some reason on a per pipeline basis.
*
* @param pipe Which pipeline to modify
* @param enable Whether to enable (true) or disable (false) auto-acks
*/
void
setAutoAck
(
uint8_t
pipe
,
bool
enable
)
;
/**
* Set Power Amplifier (PA) level to one of four levels.
* Relative mnemonics have been used to allow for future PA level
* changes. According to 6.5 of the nRF24L01+ specification sheet,
* they translate to: RF24_PA_MIN=-18dBm, RF24_PA_LOW=-12dBm,
* RF24_PA_MED=-6dBM, and RF24_PA_HIGH=0dBm.
*
* @param level Desired PA level.
*/
void
setPALevel
(
rf24_pa_dbm_e
level
)
;
/**
* Fetches the current PA level.
*
* @return Returns a value from the rf24_pa_dbm_e enum describing
* the current PA setting. Please remember, all values represented
* by the enum mnemonics are negative dBm. See setPALevel for
* return value descriptions.
*/
rf24_pa_dbm_e
getPALevel
(
void
)
;
/**
* Set the transmission data rate
*
* @warning setting RF24_250KBPS will fail for non-plus units
*
* @param speed RF24_250KBPS for 250kbs, RF24_1MBPS for 1Mbps, or RF24_2MBPS for 2Mbps
* @return true if the change was successful
*/
bool
setDataRate
(
rf24_datarate_e
speed
);
/**
* Fetches the transmission data rate
*
* @return Returns the hardware's currently configured datarate. The value
* is one of 250kbs, RF24_1MBPS for 1Mbps, or RF24_2MBPS, as defined in the
* rf24_datarate_e enum.
*/
rf24_datarate_e
getDataRate
(
void
)
;
/**
* Set the CRC length
*
* @param length RF24_CRC_8 for 8-bit or RF24_CRC_16 for 16-bit
*/
void
setCRCLength
(
rf24_crclength_e
length
);
/**
* Disable CRC validation
*
*/
void
disableCRC
(
void
)
;
/**@}*/
/**
* @name Advanced Operation
*
* Methods you can use to drive the chip in more advanced ways
*/
/**@{*/
/**
* Print a giant block of debugging information to stdout
...
...
@@ -432,26 +543,6 @@ public:
*/
void
startWrite
(
const
void
*
buf
,
uint8_t
len
);
/**
* Enable custom payloads on the acknowledge packets
*
* Ack payloads are a handy way to return data back to senders without
* manually changing the radio modes on both units.
*
* @see examples/pingpair_pl/pingpair_pl.pde
*/
void
enableAckPayload
(
void
);
/**
* Enable dynamically-sized payloads
*
* This way you don't always have to send large packets just to send them
* once in a while. This enables dynamic payloads on ALL pipes.
*
* @see examples/pingpair_pl/pingpair_dyn.pde
*/
void
enableDynamicPayloads
(
void
);
/**
* Write an ack payload for the specified pipe
*
...
...
@@ -483,14 +574,6 @@ public:
*/
bool
isAckPayloadAvailable
(
void
);
/**
* Determine whether the hardware is an nRF24L01+ or not.
*
* @return true if the hardware is nRF24L01+ (or compatible) and false
* if its not.
*/
bool
isPVariant
(
void
)
;
/**
* Call this when you get an interrupt to find out why
*
...
...
@@ -503,27 +586,6 @@ public:
*/
void
whatHappened
(
bool
&
tx_ok
,
bool
&
tx_fail
,
bool
&
rx_ready
);
/**
* Enable or disable auto-acknowlede packets
*
* This is enabled by default, so it's only needed if you want to turn
* it off for some reason.
*
* @param enable Whether to enable (true) or disable (false) auto-acks
*/
void
setAutoAck
(
bool
enable
);
/**
* Enable or disable auto-acknowlede packets on a per pipeline basis.
*
* AA is enabled by default, so it's only needed if you want to turn
* it off/on for some reason on a per pipeline basis.
*
* @param pipe Which pipeline to modify
* @param enable Whether to enable (true) or disable (false) auto-acks
*/
void
setAutoAck
(
uint8_t
pipe
,
bool
enable
)
;
/**
* Test whether there was a carrier on the line for the
* previous listening period.
...
...
@@ -546,59 +608,6 @@ public:
*/
bool
testRPD
(
void
)
;
/**
* Set Power Amplifier (PA) level to one of four levels.
* Relative mnemonics have been used to allow for future PA level
* changes. According to 6.5 of the nRF24L01+ specification sheet,
* they translate to: RF24_PA_MIN=-18dBm, RF24_PA_LOW=-12dBm,
* RF24_PA_MED=-6dBM, and RF24_PA_HIGH=0dBm.
*
* @param level Desired PA level.
*/
void
setPALevel
(
rf24_pa_dbm_e
level
)
;
/**
* Fetches the current PA level.
*
* @return Returns a value from the rf24_pa_dbm_e enum describing
* the current PA setting. Please remember, all values represented
* by the enum mnemonics are negative dBm. See setPALevel for
* return value descriptions.
*/
rf24_pa_dbm_e
getPALevel
(
void
)
;
/**
* Set the transmission data rate
*
* @warning setting RF24_250KBPS will fail for non-plus units
*
* @param speed RF24_250KBPS for 250kbs, RF24_1MBPS for 1Mbps, or RF24_2MBPS for 2Mbps
* @return true if the change was successful
*/
bool
setDataRate
(
rf24_datarate_e
speed
);
/**
* Fetches the transmission data rate
*
* @return Returns the hardware's currently configured datarate. The value
* is one of 250kbs, RF24_1MBPS for 1Mbps, or RF24_2MBPS, as defined in the
* rf24_datarate_e enum.
*/
rf24_datarate_e
getDataRate
(
void
)
;
/**
* Set the CRC length
*
* @param length RF24_CRC_8 for 8-bit or RF24_CRC_16 for 16-bit
*/
void
setCRCLength
(
rf24_crclength_e
length
);
/**
* Disable CRC validation
*
*/
void
disableCRC
(
void
)
;
/**@}*/
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment