MiApp_SetChannel Function

MiWi Development Environment

MiWi(TM) Development Environment Help
MiApp_SetChannel Function
C
BOOL MiApp_SetChannel(
    BYTE channel
);
Description

This is the primary user interface function to set the operating channel for the RF transceiver. Valid channels are from 0 to 31. Depends on the RF transceiver, its frequency band, data rate and other settings, not all channels are available. If input channel is not available under the current condition, the current operating channel will not be change, and the return value will be FALSE. Otherwise, the return value will be TRUE.

Preconditions

Protocol initialization has been done.

Parameters
Parameters 
Description 
BYTE Channel 
The channel to as the future operating channel. Channels higher than 31 are invalid. Valid channels between 0-31 depends on a lot of factors 
Returns

a boolean to indicate if channel change has been performed successfully

Remarks

None

Example
if( TRUE == MiApp_SetChannel(15) )
{
    // channel changes successfully
}
Microchip My Application xx.yy - [Jan 1, 2009]
Copyright © 2009 Microchip Technology, Inc.  All rights reserved.