thermo25 2.1.0.0
|
API for configuring and manipulating Thermo 25 Click driver. More...
Topics | |
Thermo 25 Registers Settings | |
Settings for registers of Thermo 25 Click driver. | |
Thermo 25 MikroBUS Map | |
MikroBUS pin mapping of Thermo 25 Click driver. | |
Functions | |
void | thermo25_cfg_setup (thermo25_cfg_t *cfg) |
Thermo 25 configuration object setup function. | |
err_t | thermo25_init (thermo25_t *ctx, thermo25_cfg_t *cfg) |
Thermo 25 initialization function. | |
err_t | thermo25_set_mode (thermo25_t *ctx, uint8_t mode) |
Thermo 25 set mode function. | |
err_t | thermo25_read_data (thermo25_t *ctx, uint16_t *data_out) |
Thermo 25 read data function. | |
err_t | thermo25_check_communication (thermo25_t *ctx) |
Thermo 25 check communication function. | |
err_t | thermo25_read_temperature (thermo25_t *ctx, float *temperature) |
Thermo 25 read temperature function. | |
API for configuring and manipulating Thermo 25 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void thermo25_cfg_setup | ( | thermo25_cfg_t * | cfg | ) |
Thermo 25 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See thermo25_cfg_t object definition for detailed explanation. |
err_t thermo25_check_communication | ( | thermo25_t * | ctx | ) |
Thermo 25 check communication function.
This function sets the operating mode to shutdown, then reads and verifies the device ID, and switches back to the continuous mode.
[in] | ctx | : Click context object. See thermo25_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo25_init | ( | thermo25_t * | ctx, |
thermo25_cfg_t * | cfg ) |
Thermo 25 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See thermo25_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See thermo25_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo25_read_data | ( | thermo25_t * | ctx, |
uint16_t * | data_out ) |
Thermo 25 read data function.
This function reads 16-bit data and keeps the previously set operating mode unchanged by using SPI serial interface.
[in] | ctx | : Click context object. See thermo25_t object definition for detailed explanation. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo25_read_temperature | ( | thermo25_t * | ctx, |
float * | temperature ) |
Thermo 25 read temperature function.
This function reads the temperature measurements in degrees Celsius.
[in] | ctx | : Click context object. See thermo25_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 thermo25_set_mode | ( | thermo25_t * | ctx, |
uint8_t | mode ) |
Thermo 25 set mode function.
This function sets the device operating mode to shutdown or continuous mode by using SPI serial interface.
[in] | ctx | : Click context object. See thermo25_t object definition for detailed explanation. |
[in] | mode | : Device operating mode
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation.