MICAutoParam

Definitions

#include <nitro/spi.h>
typedef struct
{ 
    MICSamplingType     type;
    void*               buffer;
    u32                 size;
    u32                 rate;
    BOOL                loop_enable;
    MICCallback         full_callback;
    void*               full_arg;

} MICAutoParam;

Elements

type Sampling type of the MICSamplingType enumerator type
buffer Specifies a pointer to the buffer that stores the sampling result. Because ARM7 writes the sampling result directly to this buffer, this buffer needs to be 32-byte cache-aligned. In addition, since it is not possible for the ARM7 to accurately determine whether or not extended main memory is in a usable condition, sampling results are restricted from being written into extended main memory space. Be sure, therefore, to prepare a buffer for storing sampling results in the 4MB of conventional main memory space.
size Size of the buffer storing the sampling result
rate The sampling rate. Directly specifies the CPU timer rate of the ARM7.
You can also select a rate from MICSamplingRate enumerator type.
loop_enable Flag for looping buffer during continuous sampling
full_callback Pointer to callback function called when buffer is full
full_arg Argument to pass to callback function called when buffer is full

Description

This structure shows the settings for microphone auto-sampling. When TRUE is specified for the loop_enable flag, continuous sampling continues when the buffer becomes full by returning the sampling-data storage-position to the start of the buffer. Continuous sampling will proceed until the function that stops auto-sampling is called. When FALSE is set for the loop_enable flag, microphone sampling will stop automatically when the buffer becomes full. Regardless of the setting of the loop_enable flag, the function specified by full_callback will be called when the buffer becomes full.

Caution

The buffer that will store the sampling results should have an address with 32-byte alignment and be a size that is a multiple of 32. This is because when the sampling results are read, the cache of the target area gets destroyed.

See Also

MIC_StartAutoSampling, MIC_StartAutoSamplingAsync, MIC_StopAutoSampling, MIC_StopAutoSamplingAsync

Revision History

02/16/2006 Added a description of why extended main memory cannot be specified for a buffer member.
09/17/2006 Added a description of buffer member alignment.
06/01/2004 Initial release.

CONFIDENTIAL