[nRF24] Cppcheck fixes
This commit is contained in:
parent
d23983bc1f
commit
5e7be10364
2 changed files with 8 additions and 8 deletions
|
@ -387,7 +387,7 @@ int16_t nRF24::setAddressWidth(uint8_t addrWidth) {
|
|||
return(state);
|
||||
}
|
||||
|
||||
int16_t nRF24::setTransmitPipe(uint8_t* addr) {
|
||||
int16_t nRF24::setTransmitPipe(const uint8_t* addr) {
|
||||
// set mode to standby
|
||||
int16_t state = standby();
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
@ -402,7 +402,7 @@ int16_t nRF24::setTransmitPipe(uint8_t* addr) {
|
|||
return(state);
|
||||
}
|
||||
|
||||
int16_t nRF24::setReceivePipe(uint8_t pipeNum, uint8_t* addr) {
|
||||
int16_t nRF24::setReceivePipe(uint8_t pipeNum, const uint8_t* addr) {
|
||||
// set mode to standby
|
||||
int16_t state = standby();
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
@ -610,11 +610,11 @@ void nRF24::SPIreadRxPayload(uint8_t* data, uint8_t numBytes) {
|
|||
SPItransfer(RADIOLIB_NRF24_CMD_READ_RX_PAYLOAD, false, NULL, data, numBytes);
|
||||
}
|
||||
|
||||
void nRF24::SPIwriteTxPayload(uint8_t* data, uint8_t numBytes) {
|
||||
void nRF24::SPIwriteTxPayload(const uint8_t* data, uint8_t numBytes) {
|
||||
SPItransfer(RADIOLIB_NRF24_CMD_WRITE_TX_PAYLOAD, true, data, NULL, numBytes);
|
||||
}
|
||||
|
||||
void nRF24::SPItransfer(uint8_t cmd, bool write, uint8_t* dataOut, uint8_t* dataIn, uint8_t numBytes) {
|
||||
void nRF24::SPItransfer(uint8_t cmd, bool write, const uint8_t* dataOut, uint8_t* dataIn, uint8_t numBytes) {
|
||||
(void)this->mod->SPItransferStream(&cmd, 1, write, dataOut, dataIn, numBytes, false);
|
||||
}
|
||||
|
||||
|
|
|
@ -374,7 +374,7 @@ class nRF24: public PhysicalLayer {
|
|||
\param addr Address to which the next packet shall be transmitted.
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t setTransmitPipe(uint8_t* addr);
|
||||
int16_t setTransmitPipe(const uint8_t* addr);
|
||||
|
||||
/*!
|
||||
\brief Sets address of receive pipes 0 or 1. The address width must be the same as the same
|
||||
|
@ -384,7 +384,7 @@ class nRF24: public PhysicalLayer {
|
|||
\param addr Address from which %nRF24 shall receive new packets on the specified pipe.
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t setReceivePipe(uint8_t pipeNum, uint8_t* addr);
|
||||
int16_t setReceivePipe(uint8_t pipeNum, const uint8_t* addr);
|
||||
|
||||
/*!
|
||||
\brief Sets address of receive pipes 2 - 5. The first 2 - 4 address bytes for these pipes
|
||||
|
@ -471,8 +471,8 @@ class nRF24: public PhysicalLayer {
|
|||
Module* getMod() override;
|
||||
|
||||
void SPIreadRxPayload(uint8_t* data, uint8_t numBytes);
|
||||
void SPIwriteTxPayload(uint8_t* data, uint8_t numBytes);
|
||||
void SPItransfer(uint8_t cmd, bool write = false, uint8_t* dataOut = NULL, uint8_t* dataIn = NULL, uint8_t numBytes = 0);
|
||||
void SPIwriteTxPayload(const uint8_t* data, uint8_t numBytes);
|
||||
void SPItransfer(uint8_t cmd, bool write = false, const uint8_t* dataOut = NULL, uint8_t* dataIn = NULL, uint8_t numBytes = 0);
|
||||
|
||||
#if !RADIOLIB_GODMODE
|
||||
private:
|
||||
|
|
Loading…
Add table
Reference in a new issue