[LR11x0] Use const pointers where appropriate
This commit is contained in:
parent
f0ed8cdf00
commit
be4ad51330
2 changed files with 4 additions and 4 deletions
|
@ -1993,7 +1993,7 @@ int16_t LR11x0::eraseInfoPage(void) {
|
|||
return(this->SPIcommand(RADIOLIB_LR11X0_CMD_ERASE_INFO_PAGE, true, buff, sizeof(buff)));
|
||||
}
|
||||
|
||||
int16_t LR11x0::writeInfoPage(uint16_t addr, uint32_t* data, size_t len) {
|
||||
int16_t LR11x0::writeInfoPage(uint16_t addr, const uint32_t* data, size_t len) {
|
||||
// check maximum size
|
||||
if(len > (RADIOLIB_LR11X0_SPI_MAX_READ_WRITE_LEN/sizeof(uint32_t))) {
|
||||
return(RADIOLIB_ERR_SPI_CMD_INVALID);
|
||||
|
@ -3042,7 +3042,7 @@ int16_t LR11x0::bootGetJoinEui(uint8_t* eui) {
|
|||
return(this->SPIcommand(RADIOLIB_LR11X0_CMD_BOOT_GET_JOIN_EUI, false, eui, RADIOLIB_LR11X0_EUI_LEN));
|
||||
}
|
||||
|
||||
int16_t LR11x0::writeCommon(uint16_t cmd, uint32_t addrOffset, uint32_t* data, size_t len) {
|
||||
int16_t LR11x0::writeCommon(uint16_t cmd, uint32_t addrOffset, const uint32_t* data, size_t len) {
|
||||
// build buffers - later we need to ensure endians are correct,
|
||||
// so there is probably no way to do this without copying buffers and iterating
|
||||
size_t buffLen = sizeof(uint32_t) + len*sizeof(uint32_t);
|
||||
|
|
|
@ -1292,7 +1292,7 @@ class LR11x0: public PhysicalLayer {
|
|||
int16_t setFs(void);
|
||||
int16_t getRandomNumber(uint32_t* rnd);
|
||||
int16_t eraseInfoPage(void);
|
||||
int16_t writeInfoPage(uint16_t addr, uint32_t* data, size_t len);
|
||||
int16_t writeInfoPage(uint16_t addr, const uint32_t* data, size_t len);
|
||||
int16_t readInfoPage(uint16_t addr, uint32_t* data, size_t len);
|
||||
int16_t getChipEui(uint8_t* eui);
|
||||
int16_t getSemtechJoinEui(uint8_t* eui);
|
||||
|
@ -1449,7 +1449,7 @@ class LR11x0: public PhysicalLayer {
|
|||
|
||||
// common methods to avoid some copy-paste
|
||||
int16_t bleBeaconCommon(uint16_t cmd, uint8_t chan, uint8_t* payload, size_t len);
|
||||
int16_t writeCommon(uint16_t cmd, uint32_t addrOffset, uint32_t* data, size_t len);
|
||||
int16_t writeCommon(uint16_t cmd, uint32_t addrOffset, const uint32_t* data, size_t len);
|
||||
int16_t cryptoCommon(uint16_t cmd, uint8_t keyId, uint8_t* dataIn, size_t len, uint8_t* dataOut);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue