MiApp_NoiseDetection Function

MiWi Development Environment

MiWi(TM) Development Environment Help
MiApp_NoiseDetection Function
C
BYTE MiApp_NoiseDetection(
    DWORD ChannelMap, 
    BYTE ScanDuration, 
    BYTE DetectionMode, 
    OUTPUT BYTE * NoiseLevel
);
Description

This is the primary user interface functions for the application layer to perform noise detection on multiple channels.

Preconditions

Protocol initialization has been done.

Parameters
Parameters 
Description 
DWORD ChannelMap 
The bit map of channels to perform noise scan. The 32-bit double word parameter use one bit to represent corresponding channels from 0 to 31. For instance, 0x00000003 represent to scan channel 0 and channel 1. 
BYTE ScanDuration 
The maximum time to perform scan on single channel. The value is from 5 to 14. The real time to perform scan can be calculated in following formula from IEEE 802.15.4 specification 960 * (2^ScanDuration + 1) * 10^(-6) second 
BYTE DetectionMode 
The noise detection mode to perform the scan. The two possible scan modes are

 

BYTE *NoiseLevel 
The noise level at the channel with least noise level 
Returns

The channel that has the lowest noise level

Remarks

None

Example
BYTE NoiseLevel;
OptimalChannel = MiApp_NoiseDetection(0xFFFFFFFF, 10, NOISE_DETECT_ENERGY, &NoiseLevel);
Microchip My Application xx.yy - [Jan 1, 2009]
Copyright © 2009 Microchip Technology, Inc.  All rights reserved.