airflow
2.0.0.0
|
API for configuring and manipulating Air Flow Click driver. More...
Modules | |
Air Flow Registers List | |
List of registers of Air Flow Click driver. | |
Air Flow Registers Settings | |
Settings for registers of Air Flow Click driver. | |
Air Flow MikroBUS Map | |
MikroBUS pin mapping of Air Flow Click driver. | |
Functions | |
void | airflow_cfg_setup (airflow_cfg_t *cfg) |
Air Flow configuration object setup function. More... | |
void | airflow_drv_interface_selection (airflow_cfg_t *cfg, airflow_drv_t drv_sel) |
Air Flow driver interface setup function. More... | |
err_t | airflow_init (airflow_t *ctx, airflow_cfg_t *cfg) |
Air Flow initialization function. More... | |
err_t | airflow_default_cfg (airflow_t *ctx) |
Air Flow default configuration function. More... | |
err_t | airflow_generic_write (airflow_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Air Flow data writing function. More... | |
err_t | airflow_generic_read (airflow_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Air Flow data reading function. More... | |
void | airflow_reset_device (airflow_t *ctx) |
Reset device. More... | |
uint8_t | airflow_check_ready (airflow_t *ctx) |
Reads ready pin state. More... | |
err_t | airflow_get_differential_pressure (airflow_t *ctx, float *pressure) |
Reads differential pressure. More... | |
err_t | airflow_get_atmospheric_pressure (airflow_t *ctx, float *pressure, float *temperature) |
Reads atmospheric pressure and temperature. More... | |
err_t | airflow_get_status (airflow_t *ctx, uint8_t *status) |
Reads status data. More... | |
API for configuring and manipulating Air Flow Click driver.
void airflow_cfg_setup | ( | airflow_cfg_t * | cfg | ) |
Air Flow configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See airflow_cfg_t object definition for detailed explanation. |
uint8_t airflow_check_ready | ( | airflow_t * | ctx | ) |
Reads ready pin state.
This function reads logic level of rdy pin.
[in] | ctx | : Click context object. See airflow_t object definition for detailed explanation. |
err_t airflow_default_cfg | ( | airflow_t * | ctx | ) |
Air Flow default configuration function.
This function executes a default configuration of Air Flow click board.
[in] | ctx | : Click context object. See airflow_t object definition for detailed explanation. |
0
- Success, -1
- Error.void airflow_drv_interface_selection | ( | airflow_cfg_t * | cfg, |
airflow_drv_t | drv_sel | ||
) |
Air Flow driver interface setup function.
This function sets a serial driver interface which will be used further in the click driver.
[out] | cfg | : Click configuration structure. See airflow_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See airflow_drv_t object definition for detailed explanation. |
err_t airflow_generic_read | ( | airflow_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
Air Flow data reading function.
This function reads a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See airflow_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t airflow_generic_write | ( | airflow_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
Air Flow data writing function.
This function writes a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See airflow_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error.err_t airflow_get_atmospheric_pressure | ( | airflow_t * | ctx, |
float * | pressure, | ||
float * | temperature | ||
) |
Reads atmospheric pressure and temperature.
This function reads pressure and temperature data from sensor.
[in] | ctx | : Click context object. See airflow_t object definition for detailed explanation. |
[out] | pressure | : Pressure data in mBar. |
[out] | temperature | : Temperature data in C. |
0
- Success, -1
- Error.err_t airflow_get_differential_pressure | ( | airflow_t * | ctx, |
float * | pressure | ||
) |
Reads differential pressure.
This function reads differential pressure data from sensor.
[in] | ctx | : Click context object. See airflow_t object definition for detailed explanation. |
[out] | pressure | : Differential pressure data in Pascals. |
0
- Success, -1
- Error.err_t airflow_get_status | ( | airflow_t * | ctx, |
uint8_t * | status | ||
) |
Reads status data.
This function reads status data from sensor.
[in] | ctx | : Click context object. See airflow_t object definition for detailed explanation. |
[out] | status | : Device status. |
0
- Success, -1
- Error.err_t airflow_init | ( | airflow_t * | ctx, |
airflow_cfg_t * | cfg | ||
) |
Air Flow initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See airflow_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See airflow_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.