[LoRaWAN] Add const
This commit is contained in:
parent
8119a606b0
commit
c0ba1e9901
2 changed files with 2 additions and 2 deletions
|
@ -3313,7 +3313,7 @@ int16_t LoRaWANNode::checkBufferCommon(uint8_t *buffer, uint16_t size) {
|
||||||
return(RADIOLIB_ERR_NONE);
|
return(RADIOLIB_ERR_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t LoRaWANNode::checkSum16(uint8_t *key, uint16_t keyLen) {
|
uint16_t LoRaWANNode::checkSum16(const uint8_t *key, uint16_t keyLen) {
|
||||||
uint16_t checkSum = 0;
|
uint16_t checkSum = 0;
|
||||||
for(uint16_t i = 0; i < keyLen; i += 2) {
|
for(uint16_t i = 0; i < keyLen; i += 2) {
|
||||||
uint16_t word = (key[i] << 8);
|
uint16_t word = (key[i] << 8);
|
||||||
|
|
|
@ -1097,7 +1097,7 @@ class LoRaWANNode {
|
||||||
void processAES(const uint8_t* in, size_t len, uint8_t* key, uint8_t* out, uint32_t fCnt, uint8_t dir, uint8_t ctrId, bool counter);
|
void processAES(const uint8_t* in, size_t len, uint8_t* key, uint8_t* out, uint32_t fCnt, uint8_t dir, uint8_t ctrId, bool counter);
|
||||||
|
|
||||||
// 16-bit checksum method that takes a uint8_t array of even length and calculates the checksum
|
// 16-bit checksum method that takes a uint8_t array of even length and calculates the checksum
|
||||||
static uint16_t checkSum16(uint8_t *key, uint16_t keyLen);
|
static uint16_t checkSum16(const uint8_t *key, uint16_t keyLen);
|
||||||
|
|
||||||
// network-to-host conversion method - takes data from network packet and converts it to the host endians
|
// network-to-host conversion method - takes data from network packet and converts it to the host endians
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
Loading…
Add table
Reference in a new issue