C
Description
This is the primary MiMAC interface for the protocol layer to set the operating frequency of the RF transceiver. Valid channel number are from 0 to 31. For different frequency band, data rate and other RF settings, some channels from 0 to 31 might be unavailable. Paramater offsetFreq is used to fine tune the center frequency across the frequency band. For transceivers that follow strict definition of channels, this parameter may be discarded. The center frequency is calculated as (LowestFrequency + Channel * ChannelGap + offsetFreq)
Preconditions
Hardware initialization on MCU has been done.
Parameters
Parameters |
Description |
BYTE channel |
Channel number. Range from 0 to 31. Not all channels are available under all conditions. |
BYTE offsetFreq |
Offset frequency used to fine tune the center frequency. May not apply to all RF transceivers |
Returns
A boolean to indicates if channel setting is successful.
Remarks
None
Example
// Set center frequency to be exactly channel 12
MiMAC_SetChannel(12, 0);