# WM_MeasureChannel

## Syntax

      #include <nitro/wm.h>

      WMErrCode WM_MeasureChannel(
              WMCallbackFunc  callback ,
              u16             ccaMode ,
              u16             edThreshold ,
              u16             channel ,
              u16             measureTime
      );

## Arguments

callback | Designates the callback function to call when the asynchronous process completes. This callback is called from within the interrupt handler.

ccaMode

Select the measure mode by using a value below (0-3).

- 0 : carrier sense mode. Measures only signals that are strong enough to affect Nintendo DS Wireless Communications.
- 1 : ED threshold specification mode. Measures signals that exceed the value specified by `edThreshold`.
- 2 : Measures signals meeting both carrier sense AND ED threshold strength requirements.
- 3 : Measures signals meeting either carrier sense OR ED threshold strength requirements.

edThreshold | If not in carrier sense mode, specifies the lower limit of signal strength to measure. The value should be from 0 through 61 (-60 dBm to -80 dBm).
channel | Specifies channel to measure. Use a value in the range of 1-14.
measureTime | Specifies the measure period in units of 1 ms. The value should be 1 or higher.

## Return Values

Returns the results of the `WMErrCode` enumerated type process.

## Description

This measures the signal usage rate of the specified channel The function is only executable when the WM is in the `IDLE` state. If the API return value is `WM_ERRCODE_OPERATING`, a callback occurs after the measurement of the signal usage rate is complete.

## Revision History

2005/06/08 Added statement about callbacks being called from the interrupt handler.
2005/03/02 Added to Description.
2004/10/22 Changed return value type.
2004/08/11 Initial version

CONFIDENTIAL