thermo27 2.1.0.0
|
API for configuring and manipulating Thermo 27 Click driver. More...
Modules | |
Thermo 27 Registers List | |
List of registers of Thermo 27 Click driver. | |
Thermo 27 Registers Settings | |
Settings for registers of Thermo 27 Click driver. | |
Thermo 27 MikroBUS Map | |
MikroBUS pin mapping of Thermo 27 Click driver. | |
Functions | |
void | thermo27_cfg_setup (thermo27_cfg_t *cfg) |
Thermo 27 configuration object setup function. More... | |
err_t | thermo27_init (thermo27_t *ctx, thermo27_cfg_t *cfg) |
Thermo 27 initialization function. More... | |
err_t | thermo27_default_cfg (thermo27_t *ctx) |
Thermo 27 default configuration function. More... | |
err_t | thermo27_generic_write (thermo27_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Thermo 27 I2C writing function. More... | |
err_t | thermo27_generic_read (thermo27_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Thermo 27 I2C reading function. More... | |
err_t | thermo27_write_register (thermo27_t *ctx, uint8_t reg, uint16_t data_in) |
Thermo 27 register writing function. More... | |
err_t | thermo27_read_register (thermo27_t *ctx, uint8_t reg, uint16_t *data_out) |
Thermo 27 register reading function. More... | |
err_t | thermo27_get_device_id (thermo27_t *ctx, uint16_t *device_id) |
Thermo 27 get device id function. More... | |
err_t | thermo27_sw_reset (thermo27_t *ctx) |
Thermo 27 software reset function. More... | |
err_t | thermo27_read_temp (thermo27_t *ctx, float *temp_out) |
Thermo 27 get read temperature function. More... | |
err_t | thermo27_enable_crc (thermo27_t *ctx) |
Thermo 27 enable CRC function. More... | |
err_t | thermo27_set_low_temp_limit (thermo27_t *ctx, float low_temp_limit) |
Thermo 27 set low temperature limit function. More... | |
err_t | thermo27_set_high_temp_limit (thermo27_t *ctx, float high_temp_limit) |
Thermo 27 set high temperature limit function. More... | |
err_t | thermo27_set_hysteresis (thermo27_t *ctx, uint8_t thigh_hyst, uint8_t tlow_hyst) |
Thermo 27 set hysteresis function. More... | |
err_t | thermo27_set_slew_limit (thermo27_t *ctx, float slew_limit) |
Thermo 27 set slew limit function. More... | |
err_t | thermo27_get_alert_reg (thermo27_t *ctx, uint8_t *register_flags) |
Thermo 27 get alert register staus function. More... | |
API for configuring and manipulating Thermo 27 Click driver.
void thermo27_cfg_setup | ( | thermo27_cfg_t * | cfg | ) |
Thermo 27 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See thermo27_cfg_t object definition for detailed explanation. |
err_t thermo27_default_cfg | ( | thermo27_t * | ctx | ) |
Thermo 27 default configuration function.
This function executes a default configuration of Thermo 27 click board.
[in] | ctx | : Click context object. See thermo27_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo27_enable_crc | ( | thermo27_t * | ctx | ) |
Thermo 27 enable CRC function.
This function sets device in CRC mode. CRC is generated and added as part of the read and write functions.
[in] | ctx | : Click context object. See thermo27_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo27_generic_read | ( | thermo27_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
Thermo 27 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 thermo27_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. See #err_t definition for detailed explanation. err_t thermo27_generic_write | ( | thermo27_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
Thermo 27 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 thermo27_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. See #err_t definition for detailed explanation. err_t thermo27_get_alert_reg | ( | thermo27_t * | ctx, |
uint8_t * | register_flags | ||
) |
Thermo 27 get alert register staus function.
This function is used to read alert register data.
[in] | ctx | : Click context object. See thermo27_t object definition for detailed explanation. |
[out] | register_flags | : Read data from the alert register. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo27_get_device_id | ( | thermo27_t * | ctx, |
uint16_t * | device_id | ||
) |
Thermo 27 get device id function.
This function reads a device id from the register by using I2C serial interface.
[in] | ctx | : Click context object. See thermo27_t object definition for detailed explanation. |
[out] | device_id | : Read device id. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo27_init | ( | thermo27_t * | ctx, |
thermo27_cfg_t * | cfg | ||
) |
Thermo 27 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See thermo27_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See thermo27_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo27_read_register | ( | thermo27_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | data_out | ||
) |
Thermo 27 register reading function.
This function reads a 16 bits of data from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See thermo27_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo27_read_temp | ( | thermo27_t * | ctx, |
float * | temp_out | ||
) |
Thermo 27 get read temperature function.
This function reads a temperature from the register by using I2C serial interface. Temperature is converted and returned in degC.
[in] | ctx | : Click context object. See thermo27_t object definition for detailed explanation. |
[out] | temp_out | : Temperature in degC. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo27_set_high_temp_limit | ( | thermo27_t * | ctx, |
float | high_temp_limit | ||
) |
Thermo 27 set high temperature limit function.
This function is used to set high temperature limit.
[in] | ctx | : Click context object. See thermo27_t object definition for detailed explanation. |
[in] | high_temp_limit | : High temperature limit in degC. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo27_set_hysteresis | ( | thermo27_t * | ctx, |
uint8_t | thigh_hyst, | ||
uint8_t | tlow_hyst | ||
) |
Thermo 27 set hysteresis function.
This function is used to set temperature high hysteresis and temperature low hysteresis.
[in] | ctx | : Click context object. See thermo27_t object definition for detailed explanation. |
[in] | thigh_hyst | : High temperature hysteresis. |
[in] | tlow_hyst | : Low temperature hysteresis. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo27_set_low_temp_limit | ( | thermo27_t * | ctx, |
float | low_temp_limit | ||
) |
Thermo 27 set low temperature limit function.
This function is used to set low temperature limit.
[in] | ctx | : Click context object. See thermo27_t object definition for detailed explanation. |
[in] | low_temp_limit | : Low temperature limit in degC. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo27_set_slew_limit | ( | thermo27_t * | ctx, |
float | slew_limit | ||
) |
Thermo 27 set slew limit function.
This function is used to set temperature slew limit.
[in] | ctx | : Click context object. See thermo27_t object definition for detailed explanation. |
[in] | slew_limit | : Input temperature slew limit. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo27_sw_reset | ( | thermo27_t * | ctx | ) |
Thermo 27 software reset function.
This function is used to perform software reset.
[in] | ctx | : Click context object. See thermo27_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo27_write_register | ( | thermo27_t * | ctx, |
uint8_t | reg, | ||
uint16_t | data_in | ||
) |
Thermo 27 register writing function.
This function writes a 16 bits of data from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See thermo27_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.