vacuum
2.0.0.0
|
Functions | |
void | vacuum_cfg_setup (vacuum_cfg_t *cfg) |
Config Object Initialization function. More... | |
VACCUM_RETVAL | vacuum_init (vacuum_t *ctx, vacuum_cfg_t *cfg) |
Initialization function. More... | |
void | vacuum_default_cfg (vacuum_t *ctx) |
Click Default Configuration function. More... | |
void | vacuum_generic_write (vacuum_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. More... | |
void | vacuum_generic_read (vacuum_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. More... | |
uint16_t | vacuum_read_data (vacuum_t *ctx) |
Function for reads 12 bit ADC data. More... | |
float | vacuum_get_voltage (vacuum_t *ctx) |
Voltage reading function. More... | |
float | vacuum_get_pressure (vacuum_t *ctx) |
Function for converting ADC value to pressure data. More... | |
float | vacuum_get_percentage_of_vacuum (vacuum_t *ctx) |
Function for converting ADC value to percentage of Vacuum. More... | |
void | vacuum_calibration (vacuum_t *ctx) |
Sensor calibration. More... | |
void vacuum_calibration | ( | vacuum_t * | ctx | ) |
Sensor calibration.
ctx | Click object. |
This function sensor calibration.
void vacuum_cfg_setup | ( | vacuum_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
void vacuum_default_cfg | ( | vacuum_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
This function executes default configuration for Vacuum click.
void vacuum_generic_read | ( | vacuum_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len | ||
) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
This function reads data from the desired register.
void vacuum_generic_write | ( | vacuum_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len | ||
) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
This function writes data to the desired register.
float vacuum_get_percentage_of_vacuum | ( | vacuum_t * | ctx | ) |
Function for converting ADC value to percentage of Vacuum.
ctx | Click object. |
This function gets percentage of vacuum.
float vacuum_get_pressure | ( | vacuum_t * | ctx | ) |
Function for converting ADC value to pressure data.
ctx | Click object. |
This function gets pressure.
float vacuum_get_voltage | ( | vacuum_t * | ctx | ) |
Voltage reading function.
ctx | Click object. |
This function gets voltage.
VACCUM_RETVAL vacuum_init | ( | vacuum_t * | ctx, |
vacuum_cfg_t * | cfg | ||
) |
Initialization function.
vacuum | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
uint16_t vacuum_read_data | ( | vacuum_t * | ctx | ) |
Function for reads 12 bit ADC data.
ctx | Click object. |
This function reads data.