Files | Functions
Noise sensor

Noise Sensor Interface. More...

+ Collaboration diagram for Noise sensor:

Files

file  XDK_NoiseSensor.h
 

Functions

Retcode_T NoiseSensor_Close (void)
 To close noise sensor module. More...
 
Retcode_T NoiseSensor_Disable (void)
 Disable the noise sensor module and stop adc scan. More...
 
Retcode_T NoiseSensor_Enable (void)
 Enable the noise sensor, Configure the ADC parameters and start ADC scan. More...
 
Retcode_T NoiseSensor_ReadRmsValue (float *rmsValue, uint32_t timeout)
 To read the last calculated RMS voltage. More...
 
Retcode_T NoiseSensor_Setup (uint32_t samplingFreqency)
 Initialize the required components and variables of noise sensor module. More...
 

Detailed Description

Function Documentation

Retcode_T NoiseSensor_Close ( void  )
Return values
RETCODE_OKupon successful execution

<

Retcode_T NoiseSensor_Disable ( void  )
Return values
RETCODE_OKupon successful execution
Returns
In case of any other error code refer AdcCentral_StopScan

+ Here is the call graph for this function:

Retcode_T NoiseSensor_Enable ( void  )
Return values
RETCODE_OKon success
RETCODE_NULL_POINTERif the Adc resource handle is NULL
Returns
In case of any other error code refer AdcCentral_StartScan
Note
Channel-4 is used for ADC to read the noise sensor data. ADC Resolution as 12 bit

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T NoiseSensor_ReadRmsValue ( float *  rmsValue,
uint32_t  timeout 
)
Parameters
[out]rmsValueCalculated RMS voltage for the range of 256 samples
[in]timeoutin milli seconds Timeout to read the RmsVoltage
Return values
RETCODE_OKupon successful execution
RETCODE_RTOS_QUEUE_ERRORif queue create fails
RETCODE_NULL_POINTERif the pointer is NULL
RETCODE_NOISE_SENSOR_ENABLE_FAILEDif noise sensor enable fails
RETCODE_NO_DATA_ON_QUEUEif no data available on queue
Note
If the calculated value isn't available in queue then it will wait until the data availability

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T NoiseSensor_Setup ( uint32_t  samplingFreqency)
Parameters
[in]samplingFreqencyAdc Sampling frequency in hertz (Hz)
Return values
RETCODE_OKupon successful initialization
RETCODE_RTOS_QUEUE_ERRORif freertos queue create fails

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


This documentation file has been automatically generated on Fri Oct 4 2019 03:47:34 by doxygen 1.8.8