Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Calibration APIs

This group includes all the Calibration related APIs.

Functions

at_ble_status_t at_ble_calib_config (int calib_enable, uint32_t no_samples, uint32_t cal_freq)
 Configures periodic Vbat/Vtemp calibration: enable/disable, number of ADC samples needed for averaging, frequency of the calibration in seconds. More...
 
at_ble_status_t at_ble_calib_get_temp (int *temperature)
 Retrieves temperature value in Celsius. More...
 
at_ble_status_t at_ble_calib_get_voltage (float *voltage)
 Retrieves voltage value in volts. More...
 

at_ble_status_t at_ble_calib_config ( int  calib_enable,
uint32_t  no_samples,
uint32_t  cal_freq 
)

Configures periodic Vbat/Vtemp calibration: enable/disable, number of ADC samples needed for averaging, frequency of the calibration in seconds.

Parameters
[in]calib_enableenables calibration if set to 1 and disables it if set to 0. Calibration is enabled by default.
[in]no_samplesnumber of ADC samples needed to calculate the average ADC output, recommended range from 1 to 16 sample. Default number of samples is 2.
[in]cal_freqfrequency of the calibration in seconds, recommended range from 1 to 60 seconds. Default frequency is 2s.
Returns
Upon successful completion the function shall return AT_BLE_SUCCESS, Otherwise the function shall return at_ble_status_t

Referenced by ble_init().

at_ble_status_t at_ble_calib_get_temp ( int *  temperature)

Retrieves temperature value in Celsius.

Parameters
[in]temperaturevariable passed to the function to store the retrieved temperature value
Returns
Upon successful completion the function shall return AT_BLE_SUCCESS, Otherwise the function shall return at_ble_status_t
at_ble_status_t at_ble_calib_get_voltage ( float *  voltage)

Retrieves voltage value in volts.

Parameters
[in]voltagevariable passed to the function to store the retrieved voltage value
Returns
Upon successful completion the function shall return AT_BLE_SUCCESS, Otherwise the function shall return at_ble_status_t