MIC_StartAutoSamplingAsync

Syntax

#include <nitro/spi.h>
MICResult MIC_StartAutoSamplingAsync(
            const MICAutoParam*    param,
            MICCallback            callback,
            void*                  arg );

Arguments

param Pointer to a MICAutoParam-type auto-sampling settings structure.
callback Pointer to the callback function. This callback is called from inside the interrupt handler.
arg Argument passed to the callback function.

Return Values

Returns the processing result as a MICResult enumerated type. Returns MIC_RESULT_SUCCESS if the asynchronous process started normally; returns some other value if the process failed.

Description

Asynchronously starts microphone auto-sampling. Use the PM_SetAmp* function to turn on the programmable gain amp before sampling.
This function issues a request to the ARM7 to start auto-sampling and returns control to the caller without waiting for a response. You must use the result argument passed by the user callback function to get the ARM7 processing result. If this function fails, the asynchronous operation is not performed and the user callback function is not called.
Where the input volume exceeds the minimum or maximum value, the output data will be clamped. It is possible to use the PM_SetAmpGain* functions to adjust the input volume that can be sampled.

This function returns MIC_RESULT_INVALID_COMMAND when the CODEC is running in CODEC-TWL mode because auto-sampling cannot be run at an arbitrary frequency in CODEC-TWL mode. In other words, this function can only be used when the CODEC is running in CODEC-DS mode.

Note

It is possible to operate other ARM7 processor peripherals (SPI device) during microphone auto-sampling. However, note that if another SPI device had taken over the access for a long time, the microphone would keep returning a certain value during that time.

See Also

MIC_StartAutoSampling
MIC_StopAutoSampling
MIC_StopAutoSamplingAsync
PM_SetAmpGain

Revision History

2009/06/25 Added description about using the PM_SetAmp* function.
2009/05/14 Added the TWL icon and a description related to CODEC.
2008/01/09 Revised a description of differences in behavior due to the CODEC mode.
2007/11/17 Added a description of operations on the TWL platform.
2005/06/27 Added text indicating that the callback is called from the interrupt handler.
2005/06/27 Standardized the Japanese notation of the term for "interrupt."
2005/01/11 Revised return values, revised the description and added reference functions.
2004/09/17 Changed the type of the param argument.
2004/08/10 Added explanations related to input volume and touch panel sampling during microphone auto-sampling.
2004/06/01 Initial version.


CONFIDENTIAL