thermo20
2.0.0.0
|
API for configuring and manipulating Thermo 20 Click driver. More...
Modules | |
Thermo 20 Registers List | |
List of registers of Thermo 20 Click driver. | |
Thermo 20 Registers Settings | |
Settings for registers of Thermo 20 Click driver. | |
Thermo 20 MikroBUS Map | |
MikroBUS pin mapping of Thermo 20 Click driver. | |
Functions | |
void | thermo20_cfg_setup (thermo20_cfg_t *cfg) |
Thermo 20 configuration object setup function. More... | |
err_t | thermo20_init (thermo20_t *ctx, thermo20_cfg_t *cfg) |
Thermo 20 initialization function. More... | |
err_t | thermo20_default_cfg (thermo20_t *ctx) |
Thermo 20 default configuration function. More... | |
err_t | thermo20_generic_write (thermo20_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
Thermo 20 I2C writing function. More... | |
err_t | thermo20_generic_read (thermo20_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
Thermo 20 I2C reading function. More... | |
err_t | thermo20_set_cmd (thermo20_t *ctx, uint8_t cmd) |
Send command function. More... | |
void | thermo20_soft_reset (thermo20_t *ctx) |
Soft reset function. More... | |
void | thermo20_start_conversion (thermo20_t *ctx) |
Start conversion function. More... | |
uint16_t | thermo20_read_adc (thermo20_t *ctx) |
Read ADC data function. More... | |
float | thermo20_get_temperature (thermo20_t *ctx) |
Get temperature data function. More... | |
uint32_t | thermo20_get_serial_number (thermo20_t *ctx) |
Get serial number function. More... | |
API for configuring and manipulating Thermo 20 Click driver.
void thermo20_cfg_setup | ( | thermo20_cfg_t * | cfg | ) |
Thermo 20 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See thermo20_cfg_t object definition for detailed explanation. |
err_t thermo20_default_cfg | ( | thermo20_t * | ctx | ) |
Thermo 20 default configuration function.
This function executes a default configuration of Thermo 20 click board.
[in] | ctx | : Click context object. See thermo20_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t thermo20_generic_read | ( | thermo20_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len | ||
) |
Thermo 20 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 thermo20_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 thermo20_generic_write | ( | thermo20_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len | ||
) |
Thermo 20 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 thermo20_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.uint32_t thermo20_get_serial_number | ( | thermo20_t * | ctx | ) |
Get serial number function.
The function get the serial number of the TSYS03 Digital Temperature Sensor on the Thermo 20 click board.
[in] | ctx | : Click context object. See thermo20_t object definition for detailed explanation. |
float thermo20_get_temperature | ( | thermo20_t * | ctx | ) |
Get temperature data function.
The function get temperature value in degree Celsius of the TSYS03 Digital Temperature Sensor on the Thermo 20 click board.
[in] | ctx | : Click context object. See thermo20_t object definition for detailed explanation. |
err_t thermo20_init | ( | thermo20_t * | ctx, |
thermo20_cfg_t * | cfg | ||
) |
Thermo 20 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See thermo20_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See thermo20_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.uint16_t thermo20_read_adc | ( | thermo20_t * | ctx | ) |
Read ADC data function.
The function 16-bit temperature reprinting ADC result of the TSYS03 Digital Temperature Sensor on the Thermo 20 click board.
[in] | ctx | : Click context object. See thermo20_t object definition for detailed explanation. |
err_t thermo20_set_cmd | ( | thermo20_t * | ctx, |
uint8_t | cmd | ||
) |
Send command function.
The function send the desired command to the TSYS03 Digital Temperature Sensor on the Thermo 20 click board.
[in] | ctx | : Click context object. See thermo20_t object definition for detailed explanation. |
[in] | cmd | Commands byte. See #thermo20_reg defgroup for detailed explanation. * |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void thermo20_soft_reset | ( | thermo20_t * | ctx | ) |
Soft reset function.
The function is performed by a software reset of the TSYS03 Digital Temperature Sensor on the Thermo 20 click board.
[in] | ctx | : Click context object. See thermo20_t object definition for detailed explanation. |
void thermo20_start_conversion | ( | thermo20_t * | ctx | ) |
Start conversion function.
The function set conversion a single temperature conversion of the TSYS03 Digital Temperature Sensor on the Thermo 20 click board.
[in] | ctx | : Click context object. See thermo20_t object definition for detailed explanation. |