#include <nitro/spi.h>
MICResult MIC_StartAutoSamplingAsync(
const MICAutoParam* param,
MICCallback callback,
void* arg );
param | Specifies a pointer to the MICAutoParam type auto-sampling structure. |
callback | Specifies the pointer to the callback function. This callback is called from within the interrupt handler. |
arg | Specifies the argument passed to the callback function. |
Returns the enumerated-type MICResult
process result. If the asynchronous process started normally, returns MIC_RESULT_SUCCESS
. If the process fails for some reason, returns some other value.
Asynchronously starts microphone auto-sampling. This function issues a request to the ARM7 processor to start auto-sampling and returns to the place from which it was called without waiting for a response from the ARM7 processor. To get the result from the processor, you must use the result
argument. If the input volume exceeds the minimum or maximum value, the output data will be clamped. It is possible to set the input volume that can be sampled using the PM_SetAmpGain
function.
If this function fails, asynchronous operations are not performed and the user callback function cannot be called.
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.
MIC_StartAutoSampling
, MIC_StopAutoSampling
, MIC_StopAutoSamplingAsync
, PM_SetAmpGain
06/27/2005 Added statement about callbacks being called from the interrupt handler.
01/11/2005 Revised return values, revised description, added reference function.
09/17/2004 Changed the type for the argument param
.
08/10/2001 Added the description to touch panel sampling during microphone auto sampling. Added the description regarding the input volume.
06/01/2004 Initial version.