hvac 2.0.0.0
|
API for configuring and manipulating HVAC Click driver. More...
Topics | |
HVAC Registers Settings | |
Settings for registers of HVAC Click driver. | |
HVAC MikroBUS Map | |
MikroBUS pin mapping of HVAC Click driver. | |
Functions | |
void | hvac_cfg_setup (hvac_cfg_t *cfg) |
HVAC configuration object setup function. | |
err_t | hvac_init (hvac_t *ctx, hvac_cfg_t *cfg) |
HVAC initialization function. | |
err_t | hvac_generic_write (hvac_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
HVAC I2C writing function. | |
err_t | hvac_generic_read (hvac_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
HVAC I2C reading function. | |
err_t | hvac_scd40_write_data (hvac_t *ctx, uint16_t reg, uint16_t tx_data) |
SCD40 generic write data function. | |
err_t | hvac_scd40_read_data (hvac_t *ctx, uint16_t reg, uint16_t *rx_data) |
SCD40 generic read data function. | |
void | hvac_scd40_send_cmd (hvac_t *ctx, uint16_t cmd) |
SCD40 send command function. | |
void | hvac_scd40_read_measurement (hvac_t *ctx, measuremen_data_t *m_data) |
SCD40 read measurement function. | |
void | hvac_scd40_get_serial_number (hvac_t *ctx, uint16_t *serial_number) |
SCD40 get serial number function. | |
void | hvac_scd40_get_feature_set_version (hvac_t *ctx, feature_data_t *f_data) |
SCD40 get feature set version function. | |
void | hvac_scd40_set_temperature_offset (hvac_t *ctx, float temp_offset) |
SCD40 set temperature offset function. | |
float | hvac_scd40_get_temperature_offset (hvac_t *ctx) |
SCD40 get temperature offset function. | |
err_t | hvac_sps30_i2c_write_data (hvac_t *ctx, uint16_t reg, uint16_t tx_data) |
SPS30 generic write data function. | |
err_t | hvac_sps30_i2c_read_data (hvac_t *ctx, uint16_t reg, uint16_t *rx_data) |
SPS30 generic read data function. | |
void | hvac_sps30_start_measurement (hvac_t *ctx) |
SPS30 start measurement command function. | |
void | hvac_sps30_stop_measurement (hvac_t *ctx) |
SPS30 stop measurement command function. | |
void | hvac_sps30_device_reset (hvac_t *ctx) |
SPS30 set device reset function. | |
uint8_t | hvac_sps30_get_ready_flag (hvac_t *ctx) |
SPS30 get ready flag function. | |
void | hvac_sps30_read_measured_data (hvac_t *ctx, mass_and_num_cnt_data_t *m_n_c_data) |
SPS30 read measured data function. | |
API for configuring and manipulating HVAC Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void hvac_cfg_setup | ( | hvac_cfg_t * | cfg | ) |
HVAC configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See hvac_cfg_t object definition for detailed explanation. |
err_t hvac_generic_read | ( | hvac_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
HVAC I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See hvac_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | rx_buf | : Output read data. |
[in] | rx_len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t hvac_generic_write | ( | hvac_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
HVAC I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See hvac_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | tx_buf | : Data to be written. |
[in] | tx_len | : Number of bytes to be written. |
0
- Success, -1
- Error.err_t hvac_init | ( | hvac_t * | ctx, |
hvac_cfg_t * | cfg ) |
HVAC initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See hvac_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See hvac_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void hvac_scd40_get_feature_set_version | ( | hvac_t * | ctx, |
feature_data_t * | f_data ) |
SCD40 get feature set version function.
The function get feature set version value of the SCD40 CO2, RH and T Sensor on the HVAC click board.
[in] | ctx | : Click context object. See hvac_t object definition for detailed explanation. |
[in] | f_data | : Pointer to the memory location where structure data be stored. |
void hvac_scd40_get_serial_number | ( | hvac_t * | ctx, |
uint16_t * | serial_number ) |
SCD40 get serial number function.
The function get serial number value of the SCD40 CO2, RH and T Sensor on the HVAC click board.
[in] | ctx | : Click context object. See hvac_t object definition for detailed explanation. |
[in] | serial_number | : Pointer to the memory location where serial numbe value be stored. |
float hvac_scd40_get_temperature_offset | ( | hvac_t * | ctx | ) |
SCD40 get temperature offset function.
The function get temperature offset value of the SCD40 CO2, RH and T Sensor on the HVAC click board.
[in] | ctx | : Click context object. See hvac_t object definition for detailed explanation. |
err_t hvac_scd40_read_data | ( | hvac_t * | ctx, |
uint16_t | reg, | ||
uint16_t * | rx_data ) |
SCD40 generic read data function.
The function read a 16-bit data from the targeted 16-bit register address of the SCD40 CO2, RH and T Sensor on the HVAC click board.
[in] | ctx | : Click context object. See hvac_t object definition for detailed explanation. |
[in] | reg | : 16-bit register address. |
[out] | rx_data | : Pointer to the memory location where 16-bit read data be stored. |
0
- Success, -1
- Error.void hvac_scd40_read_measurement | ( | hvac_t * | ctx, |
measuremen_data_t * | m_data ) |
SCD40 read measurement function.
The function read sensor measurement data of the SCD40 CO2, RH and T Sensor on the HVAC click board.
[in] | ctx | : Click context object. See hvac_t object definition for detailed explanation. |
[in] | m_data | : Pointer to the memory location where structure data be stored. |
void hvac_scd40_send_cmd | ( | hvac_t * | ctx, |
uint16_t | cmd ) |
SCD40 send command function.
The function send command to the SCD40 CO2, RH and T Sensor on the HVAC click board.
[in] | ctx | : Click context object. See hvac_t object definition for detailed explanation. |
[in] | cmd | : 16-bit command. |
void hvac_scd40_set_temperature_offset | ( | hvac_t * | ctx, |
float | temp_offset ) |
SCD40 set temperature offset function.
The function set temperature offset value of the SCD40 CO2, RH and T Sensor on the HVAC click board.
[in] | ctx | : Click context object. See hvac_t object definition for detailed explanation. |
[in] | temp_offset | : Float temperature offset value ( degree Celsius ). |
err_t hvac_scd40_write_data | ( | hvac_t * | ctx, |
uint16_t | reg, | ||
uint16_t | tx_data ) |
SCD40 generic write data function.
The function writes a 16-bit data to the targeted 16-bit register address of the SCD40 CO2, RH and T Sensor on the HVAC click board.
[in] | ctx | : Click context object. See hvac_t object definition for detailed explanation. |
[in] | reg | : 16-bit register address. |
[in] | tx_data | : 16-bit data to be written. |
0
- Success, -1
- Error.void hvac_sps30_device_reset | ( | hvac_t * | ctx | ) |
SPS30 set device reset function.
The function set set device reset of the SPS30 Particulate Matter Sensor for Air Quality Monitoring and Control on the HVAC click board.
[in] | ctx | : Click context object. See hvac_t object definition for detailed explanation. |
uint8_t hvac_sps30_get_ready_flag | ( | hvac_t * | ctx | ) |
SPS30 get ready flag function.
The function get new data ready flag of the SPS30 Particulate Matter Sensor for Air Quality Monitoring and Control on the HVAC click board.
[in] | ctx | : Click context object. See hvac_t object definition for detailed explanation. |
0
- No new data, 1
- Data ready.err_t hvac_sps30_i2c_read_data | ( | hvac_t * | ctx, |
uint16_t | reg, | ||
uint16_t * | rx_data ) |
SPS30 generic read data function.
The function read a 16-bit data from the targeted 16-bit register address of the SPS30 Particulate Matter Sensor for Air Quality Monitoring and Control on the HVAC click board.
[in] | ctx | : Click context object. See hvac_t object definition for detailed explanation. |
[in] | reg | : 16-bit register address. |
[out] | rx_data | : Pointer to the memory location where 16-bit read data be stored. |
0
- Success, -1
- Error.err_t hvac_sps30_i2c_write_data | ( | hvac_t * | ctx, |
uint16_t | reg, | ||
uint16_t | tx_data ) |
SPS30 generic write data function.
The function writes a 16-bit data to the targeted 16-bit register address of the SPS30 Particulate Matter Sensor for Air Quality Monitoring and Control on the HVAC click board.
[in] | ctx | : Click context object. See hvac_t object definition for detailed explanation. |
[in] | reg | : 16-bit register address. |
[in] | tx_data | : 16-bit data to be written. |
0
- Success, -1
- Error.void hvac_sps30_read_measured_data | ( | hvac_t * | ctx, |
mass_and_num_cnt_data_t * | m_n_c_data ) |
SPS30 read measured data function.
The functionread measured data of the SPS30 Particulate Matter Sensor for Air Quality Monitoring and Control on the HVAC click board.
[in] | ctx | : Click context object. See hvac_t object definition for detailed explanation. |
[out] | m_n_c_data | : Pointer to the memory location where structure data be stored. |
void hvac_sps30_start_measurement | ( | hvac_t * | ctx | ) |
SPS30 start measurement command function.
The function set starts the measurement mode of the SPS30 Particulate Matter Sensor for Air Quality Monitoring and Control on the HVAC click board.
[in] | ctx | : Click context object. See hvac_t object definition for detailed explanation. |
void hvac_sps30_stop_measurement | ( | hvac_t * | ctx | ) |
SPS30 stop measurement command function.
The function set stop the measurement mode of the SPS30 Particulate Matter Sensor for Air Quality Monitoring and Control on the HVAC click board.
[in] | ctx | : Click context object. See hvac_t object definition for detailed explanation. |