piezoaccel 2.0.0.0
|
API for configuring and manipulating Piezo Accel Click driver. More...
Topics | |
Piezo Accel MikroBUS Map | |
MikroBUS pin mapping of Piezo Accel Click driver. | |
Measurement_mode | |
Sensor_voltage | |
Functions | |
void | piezoaccel_cfg_setup (piezoaccel_cfg_t *cfg) |
Piezo Accel configuration object setup function. | |
err_t | piezoaccel_init (piezoaccel_t *ctx, piezoaccel_cfg_t *cfg) |
Piezo Accel initialization function. | |
void | piezoaccel_default_cfg (piezoaccel_t *ctx, piezoaccel_setup_t *setup_cfg_data) |
Piezo Accel default configuration function. | |
uint16_t | piezoaccel_adc_raw_read (piezoaccel_t *ctx) |
Piezo Accel read raw adc function. | |
float | piezoaccel_adc_voltage_read (piezoaccel_t *ctx) |
Piezo Accel read adc converted to voltage function. | |
err_t | piezoaccel_read_an_pin_value (piezoaccel_t *ctx, uint16_t *data_out) |
Piezo Accel read AN pin value function. | |
err_t | piezoaccel_read_an_pin_voltage (piezoaccel_t *ctx, float *data_out) |
Piezo Accel read AN pin voltage level function. | |
float | piezoaccel_g_unit_read (piezoaccel_t *ctx, piezoaccel_setup_t *cfg_data) |
Piezo Accel read force of acceleration function. | |
void | piezoaccel_calibration (piezoaccel_t *ctx, piezoaccel_setup_t *cfg_data) |
Piezo Accel calibration function. | |
API for configuring and manipulating Piezo Accel Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
uint16_t piezoaccel_adc_raw_read | ( | piezoaccel_t * | ctx | ) |
Piezo Accel read raw adc function.
This function returns raw value of LTC1864 adc.
[in] | ctx | : Click context object. See piezoaccel_t object definition for detailed explanation. |
float piezoaccel_adc_voltage_read | ( | piezoaccel_t * | ctx | ) |
Piezo Accel read adc converted to voltage function.
This function returns input voltage value of LTC1864 adc.
[in] | ctx | : Click context object. See piezoaccel_t object definition for detailed explanation. |
void piezoaccel_calibration | ( | piezoaccel_t * | ctx, |
piezoaccel_setup_t * | cfg_data ) |
Piezo Accel calibration function.
This function performs calibration which updates the offset data in config structure. Used to correct the offset output voltage caused by the inaccurate power supply of the sensor.
[in] | ctx | : Click context object. See #analogmux2_t object definition for detailed explanation. |
cfg_data | : Config data structure. |
void piezoaccel_cfg_setup | ( | piezoaccel_cfg_t * | cfg | ) |
Piezo Accel configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See piezoaccel_cfg_t object definition for detailed explanation. |
void piezoaccel_default_cfg | ( | piezoaccel_t * | ctx, |
piezoaccel_setup_t * | setup_cfg_data ) |
Piezo Accel default configuration function.
This function executes a default configuration of Piezo Accel click board.
[in] | ctx | : Click context object. See piezoaccel_t object definition for detailed explanation. |
setup_cfg_data | : Setup config structure. |
float piezoaccel_g_unit_read | ( | piezoaccel_t * | ctx, |
piezoaccel_setup_t * | cfg_data ) |
Piezo Accel read force of acceleration function.
This function returns the converted G-force of acceleration depending on the config settings. In addition, the configuration has to be set on the click board by soldering jumpers.
[in] | ctx | : Click context object. See #analogmux2_t object definition for detailed explanation. |
cfg_data | : Config data structure. |
err_t piezoaccel_init | ( | piezoaccel_t * | ctx, |
piezoaccel_cfg_t * | cfg ) |
Piezo Accel initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See piezoaccel_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See piezoaccel_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t piezoaccel_read_an_pin_value | ( | piezoaccel_t * | ctx, |
uint16_t * | data_out ) |
Piezo Accel read AN pin value function.
This function reads results of AD conversion of the AN pin.
[in] | ctx | : Click context object. See #analogmux2_t object definition for detailed explanation. |
[out] | data_out | : Output ADC result. |
0
- Success, -1
- Error.err_t piezoaccel_read_an_pin_voltage | ( | piezoaccel_t * | ctx, |
float * | data_out ) |
Piezo Accel read AN pin voltage level function.
This function reads results of AD conversion of the AN pin and converts them to proportional voltage level.
[in] | ctx | : Click context object. See #analogmux2_t object definition for detailed explanation. |
[out] | data_out | : Output voltage level of the analog pin [V]. |
0
- Success, -1
- Error.