thermo23
2.0.0.0
|
API for configuring and manipulating Thermo 23 Click driver. More...
Modules | |
Thermo 23 Device Settings | |
Settings for registers of Thermo 23 Click driver. | |
Thermo 23 MikroBUS Map | |
MikroBUS pin mapping of Thermo 23 Click driver. | |
Functions | |
void | thermo23_cfg_setup (thermo23_cfg_t *cfg) |
Thermo 23 configuration object setup function. More... | |
err_t | thermo23_init (thermo23_t *ctx, thermo23_cfg_t *cfg) |
Thermo 23 initialization function. More... | |
err_t | thermo23_default_cfg (thermo23_t *ctx) |
Thermo 23 default configuration function. More... | |
err_t | thermo23_write_command (thermo23_t *ctx, uint8_t cmd, uint16_t data_in) |
Thermo 23 write command function. More... | |
err_t | thermo23_read_command (thermo23_t *ctx, uint8_t cmd, uint16_t *data_out) |
Thermo 23 read command function. More... | |
err_t | thermo23_set_config (thermo23_t *ctx, uint16_t config) |
Thermo 23 set config function. More... | |
err_t | thermo23_read_temperature (thermo23_t *ctx, float *temperature) |
Thermo 23 read temperature function. More... | |
API for configuring and manipulating Thermo 23 Click driver.
void thermo23_cfg_setup | ( | thermo23_cfg_t * | cfg | ) |
Thermo 23 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See thermo23_cfg_t object definition for detailed explanation. |
err_t thermo23_default_cfg | ( | thermo23_t * | ctx | ) |
Thermo 23 default configuration function.
This function executes a default configuration of Thermo 23 click board.
[in] | ctx | : Click context object. See thermo23_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo23_init | ( | thermo23_t * | ctx, |
thermo23_cfg_t * | cfg | ||
) |
Thermo 23 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See thermo23_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See thermo23_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo23_read_command | ( | thermo23_t * | ctx, |
uint8_t | cmd, | ||
uint16_t * | data_out | ||
) |
Thermo 23 read command function.
This function reads data from the selected command by using UART serial interface.
[in] | ctx | : Click context object. See thermo23_t object definition for detailed explanation. |
[in] | cmd | : Command byte. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error/Timeout. See #err_t definition for detailed explanation. err_t thermo23_read_temperature | ( | thermo23_t * | ctx, |
float * | temperature | ||
) |
Thermo 23 read temperature function.
This function reads the temperature value in Celsius.
[in] | ctx | : Click context object. See thermo23_t object definition for detailed explanation. |
[out] | temperature | : Temperature in Celsius. |
0
- Success, -1
- Error/Timeout. See #err_t definition for detailed explanation. err_t thermo23_set_config | ( | thermo23_t * | ctx, |
uint16_t | config | ||
) |
Thermo 23 set config function.
This function sets the configuration register.
[in] | ctx | : Click context object. See thermo23_t object definition for detailed explanation. |
[in] | config | : Config register value to be set. |
0
- Success, -1
- Error/Timeout. See #err_t definition for detailed explanation. err_t thermo23_write_command | ( | thermo23_t * | ctx, |
uint8_t | cmd, | ||
uint16_t | data_in | ||
) |
Thermo 23 write command function.
This function writes a desired data to the selected command by using UART serial interface.
[in] | ctx | : Click context object. See thermo23_t object definition for detailed explanation. |
[in] | cmd | : Command byte. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error/Timeout. See #err_t definition for detailed explanation.