|API|uint8_t MiApp_NoiseDetection( uint32_t ChannelMap, uint8_t ScanDuration,uint8_t DetectionMode, uint8_t NoiseLevel)| |Description|This is the primary user interface function for the application layer to perform noise detection on multiple channels.| |Pre-Condition|Protocol initialization is done.| |Parameters|uint32_t ChannelMap – bit map of channels to perform a noise scan. The 32-bit doubleword parameter uses one bit to represent corresponding channels from 0 to 31. For example,0x00000003 represents to scan channel 0 and channel 1.• uint8_t ScanDuration – maximum time to perform a scan on a single channel. The validvalue is from 5 to 14. The real time to perform a scan can be calculated in the followingformula from IEEE 802.15.4 specification:960 x (2^ScanDuration + 1) x 10^(-6) second• uint8_t DetectionMode – the noise detection mode to perform the scan. The twopossible scan modes are as following.– NOISE_DETECT_ENERGY – Energy detection scan mode– NOISE_DETECT_CS – Carrier sense detection scan mode• uint8_t NoiseLevel - noise level at the channel with least noise level| |Returns|The channel that has the lowest noise level.| |Example|<code>uint8_t NoiseLevel;OptimalChannel = MiApp_NoiseDetection(0xFFFFFFFF, 10, NOISE_DETECT_ENERGY,&NoiseLevel);</code>| |Remarks|None|
Parent topic:MiApp API Description