LoRaMAC  4.4.6
Documentation of the API
US region common implementations.

Functions

LoRaMacStatus_t RegionBaseUSComputeNext125kHzJoinChannel (uint16_t *channelsMaskRemaining, uint8_t *groupsCurrentIndex, uint8_t *newChannelIndex)
 Computes the next 125kHz channel used for join requests. And it returns all the parameters updated. More...
 
bool RegionBaseUSVerifyFrequencyGroup (uint32_t freq, uint32_t minFreq, uint32_t maxFreq, uint32_t stepwidth)
 Verifies if the frequency is in the correct range with a specific stepwidth. More...
 
uint32_t RegionBaseUSCalcDownlinkFrequency (uint8_t channel, uint32_t frequency, uint32_t stepwidth)
 Calculates the downlink frequency for a given channel. This function is used in class B only. More...
 

Detailed Description

Function Documentation

◆ RegionBaseUSComputeNext125kHzJoinChannel()

LoRaMacStatus_t RegionBaseUSComputeNext125kHzJoinChannel ( uint16_t *  channelsMaskRemaining,
uint8_t *  groupsCurrentIndex,
uint8_t *  newChannelIndex 
)

Computes the next 125kHz channel used for join requests. And it returns all the parameters updated.

Parameters
[IN]channelsMaskRemaining pointer to remaining channels.
[IN]groupsCurrentIndex Index of current channel.
[OUT]newChannelIndex Index of next available channel.
Return values
Status

◆ RegionBaseUSVerifyFrequencyGroup()

bool RegionBaseUSVerifyFrequencyGroup ( uint32_t  freq,
uint32_t  minFreq,
uint32_t  maxFreq,
uint32_t  stepwidth 
)

Verifies if the frequency is in the correct range with a specific stepwidth.

Parameters
[IN]freq Frequency to verify.
[IN]minFreq Minimum frequency.
[IN]maxFreq Maximum frequency.
[IN]stepwidth Frequency stepwidth.
Return values
True,ifthe frequency is valid, false if not.

◆ RegionBaseUSCalcDownlinkFrequency()

uint32_t RegionBaseUSCalcDownlinkFrequency ( uint8_t  channel,
uint32_t  frequency,
uint32_t  stepwidth 
)

Calculates the downlink frequency for a given channel. This function is used in class B only.

Parameters
[IN]channel The channel according to the channel plan.
[IN]frequency The base frequency.
[IN]stepwidth The frequency stepwidth.
Return values
Thedownlink frequency.