1.1.4.33 DRV_METROLOGY_CaptureStart Function

C
bool DRV_METROLOGY_CaptureStart(uint32_t *pData, uint32_t samplesNum);
Summary

Set the data buffer where the captured samples will be written, its length, and start the capture process.

Description

This routine triggers the start of Capture samples process, samples are written to provided data buffer, number of samples to capture is also set as parameter.

Parameters
ParamDescription
pDataPointer to the data buffer where the captured samples will be written.
samplesNumSpecifies buffer size used for the capture function in units of 32-bit values. It must be divisible by the number of channels selected.
Returns

True if the capture process was started successfully. Otherwise false.

Example
    #define MET_CAPTURE_SAMPLING_FREQ (16000UL)
    #define MET_CAPTURE_FREQ          (50U)
    #define MET_CAPTURE_NUM_CHN       (4U)
    #define MET_CAPTURE_CHN_SAMPLES   (MET_CAPTURE_SAMPLING_FREQ / MET_CAPTURE_FREQ) 
    #define MET_CAPTURE_SAMPLES       (MET_CAPTURE_CHN_SAMPLES * MET_CAPTURE_NUM_CHN)
    static uint32_t metCaptureData[MET_CAPTURE_SAMPLES];

    DRV_METROLOGY_CaptureStart(metCaptureData, MET_CAPTURE_SAMPLES);
Remarks

None.