thermo21 2.0.0.0
|
API for configuring and manipulating Thermo 21 Click driver. More...
Modules | |
Thermo 21 Registers Settings | |
Settings for registers of Thermo 21 Click driver. | |
Thermo 21 MikroBUS Map | |
MikroBUS pin mapping of Thermo 21 Click driver. | |
Functions | |
void | thermo21_cfg_setup (thermo21_cfg_t *cfg) |
Thermo 21 configuration object setup function. More... | |
err_t | thermo21_init (thermo21_t *ctx, thermo21_cfg_t *cfg) |
Thermo 21 initialization function. More... | |
err_t | thermo21_generic_read (thermo21_t *ctx, uint8_t *data_out, uint8_t len) |
Data reading function. More... | |
err_t | thermo21_temperature_read (thermo21_t *ctx, float *data_out) |
Temperature reading function. More... | |
API for configuring and manipulating Thermo 21 Click driver.
void thermo21_cfg_setup | ( | thermo21_cfg_t * | cfg | ) |
Thermo 21 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See thermo21_cfg_t object definition for detailed explanation. |
err_t thermo21_generic_read | ( | thermo21_t * | ctx, |
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
Data reading function.
This function reads a desired number of data bytes from the device by using SPI serial interface.
[in] | ctx | : Click context object. See thermo21_t object definition for detailed explanation. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t thermo21_init | ( | thermo21_t * | ctx, |
thermo21_cfg_t * | cfg | ||
) |
Thermo 21 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See thermo21_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See thermo21_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t thermo21_temperature_read | ( | thermo21_t * | ctx, |
float * | data_out | ||
) |
Temperature reading function.
This function reads a 2 bytes and calculates temperature from device.
[in] | ctx | : Click context object. See thermo21_t object definition for detailed explanation. |
[out] | data_out | : Output temperature data. |
0
- Success, -1
- Error.