thermo29 2.1.0.0
|
API for configuring and manipulating Thermo 29 Click driver. More...
Topics | |
Thermo 29 Registers List | |
List of registers of Thermo 29 Click driver. | |
Thermo 29 Registers Settings | |
Settings for registers of Thermo 29 Click driver. | |
Thermo 29 MikroBUS Map | |
MikroBUS pin mapping of Thermo 29 Click driver. | |
Functions | |
void | thermo29_cfg_setup (thermo29_cfg_t *cfg) |
Thermo 29 configuration object setup function. | |
err_t | thermo29_init (thermo29_t *ctx, thermo29_cfg_t *cfg) |
Thermo 29 initialization function. | |
err_t | thermo29_default_cfg (thermo29_t *ctx) |
Thermo 29 default configuration function. | |
err_t | thermo29_write_register (thermo29_t *ctx, uint8_t reg, uint16_t data_in) |
Thermo 29 write register function. | |
err_t | thermo29_read_register (thermo29_t *ctx, uint8_t reg, uint16_t *data_out) |
Thermo 29 read register function. | |
err_t | thermo29_write_registers (thermo29_t *ctx, uint8_t reg, uint16_t *data_in, uint8_t len) |
Thermo 29 write registers function. | |
err_t | thermo29_read_registers (thermo29_t *ctx, uint8_t reg, uint16_t *data_out, uint8_t len) |
Thermo 29 read registers function. | |
uint8_t | thermo29_get_alert_pin (thermo29_t *ctx) |
Thermo 29 get alert pin function. | |
void | thermo29_enable_crc (thermo29_t *ctx) |
Thermo 29 enable crc function. | |
void | thermo29_disable_crc (thermo29_t *ctx) |
Thermo 29 disable crc function. | |
err_t | thermo29_check_communication (thermo29_t *ctx) |
Thermo 29 check communication function. | |
err_t | thermo29_read_unique_id (thermo29_t *ctx, uint16_t *unique_id) |
Thermo 29 read unique id function. | |
err_t | thermo29_read_temperature (thermo29_t *ctx, float *temperature) |
Thermo 29 read temperature function. | |
err_t | thermo29_clear_alert_status (thermo29_t *ctx) |
Thermo 29 clear alert status function. | |
API for configuring and manipulating Thermo 29 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void thermo29_cfg_setup | ( | thermo29_cfg_t * | cfg | ) |
Thermo 29 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See thermo29_cfg_t object definition for detailed explanation. |
err_t thermo29_check_communication | ( | thermo29_t * | ctx | ) |
Thermo 29 check communication function.
This function checks the communication by reading and verifying the device ID.
[in] | ctx | : Click context object. See thermo29_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo29_clear_alert_status | ( | thermo29_t * | ctx | ) |
Thermo 29 clear alert status function.
This function clears the alert status register.
[in] | ctx | : Click context object. See thermo29_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo29_default_cfg | ( | thermo29_t * | ctx | ) |
Thermo 29 default configuration function.
This function executes a default configuration of Thermo 29 click board.
[in] | ctx | : Click context object. See thermo29_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void thermo29_disable_crc | ( | thermo29_t * | ctx | ) |
Thermo 29 disable crc function.
This function disables CRC for writing and reading transactions.
[in] | ctx | : Click context object. See thermo29_t object definition for detailed explanation. |
void thermo29_enable_crc | ( | thermo29_t * | ctx | ) |
Thermo 29 enable crc function.
This function enables CRC for writing and reading transactions.
[in] | ctx | : Click context object. See thermo29_t object definition for detailed explanation. |
uint8_t thermo29_get_alert_pin | ( | thermo29_t * | ctx | ) |
Thermo 29 get alert pin function.
This function returns the alert pin logic state.
[in] | ctx | : Click context object. See thermo29_t object definition for detailed explanation. |
err_t thermo29_init | ( | thermo29_t * | ctx, |
thermo29_cfg_t * | cfg ) |
Thermo 29 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See thermo29_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See thermo29_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo29_read_register | ( | thermo29_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | data_out ) |
Thermo 29 read register function.
This function reads data from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See thermo29_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo29_read_registers | ( | thermo29_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | data_out, | ||
uint8_t | len ) |
Thermo 29 read registers function.
This function reads a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See thermo29_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 ( up to 10 bytes ). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo29_read_temperature | ( | thermo29_t * | ctx, |
float * | temperature ) |
Thermo 29 read temperature function.
This function reads the temperature measurement in degrees Celsius.
[in] | ctx | : Click context object. See thermo29_t object definition for detailed explanation. |
[out] | temperature | : Temperature in degrees Celsius. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo29_read_unique_id | ( | thermo29_t * | ctx, |
uint16_t * | unique_id ) |
Thermo 29 read unique id function.
This function reads the device unique ID words (6 bytes in total).
[in] | ctx | : Click context object. See thermo29_t object definition for detailed explanation. |
[out] | unique_id | : Device unique ID words ( 3 x 16-bit data ). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo29_write_register | ( | thermo29_t * | ctx, |
uint8_t | reg, | ||
uint16_t | data_in ) |
Thermo 29 write register function.
This function writes data to the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See thermo29_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo29_write_registers | ( | thermo29_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | data_in, | ||
uint8_t | len ) |
Thermo 29 write registers function.
This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.
[in] | ctx | : Click context object. See thermo29_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 ( up to 10 bytes ). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.