thermo26
2.1.0.0
|
API for configuring and manipulating Thermo 26 Click driver. More...
Modules | |
Thermo 26 Registers List | |
List of registers of Thermo 26 Click driver. | |
Thermo 26 Registers Settings | |
Settings for registers of Thermo 26 Click driver. | |
Thermo 26 MikroBUS Map | |
MikroBUS pin mapping of Thermo 26 Click driver. | |
Functions | |
void | thermo26_cfg_setup (thermo26_cfg_t *cfg) |
Thermo 26 configuration object setup function. More... | |
err_t | thermo26_init (thermo26_t *ctx, thermo26_cfg_t *cfg) |
Thermo 26 initialization function. More... | |
err_t | thermo26_write_command (thermo26_t *ctx, uint16_t cmd) |
Thermo 26 write command function. More... | |
err_t | thermo26_read_command (thermo26_t *ctx, uint16_t cmd, uint16_t *data_out) |
Thermo 26 read command function. More... | |
void | thermo26_reset_device (thermo26_t *ctx) |
Thermo 26 reset device function. More... | |
void | thermo26_set_rst_pin (thermo26_t *ctx, uint8_t state) |
Thermo 26 set rst pin function. More... | |
uint8_t | thermo26_get_alert_pin (thermo26_t *ctx) |
Thermo 26 get alert pin function. More... | |
err_t | thermo26_read_temperature (thermo26_t *ctx, float *temperature) |
Thermo 26 read temperature function. More... | |
err_t | thermo26_read_serial_num (thermo26_t *ctx, uint32_t *serial_num) |
Thermo 26 read serial num function. More... | |
err_t | thermo26_start_measurement (thermo26_t *ctx, uint16_t cmd) |
Thermo 26 start measurement function. More... | |
err_t | thermo26_stop_measurement (thermo26_t *ctx) |
Thermo 26 stop measurement function. More... | |
API for configuring and manipulating Thermo 26 Click driver.
void thermo26_cfg_setup | ( | thermo26_cfg_t * | cfg | ) |
Thermo 26 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See thermo26_cfg_t object definition for detailed explanation. |
uint8_t thermo26_get_alert_pin | ( | thermo26_t * | ctx | ) |
Thermo 26 get alert pin function.
This function returns the alert pin logic state.
[in] | ctx | : Click context object. See thermo26_t object definition for detailed explanation. |
err_t thermo26_init | ( | thermo26_t * | ctx, |
thermo26_cfg_t * | cfg | ||
) |
Thermo 26 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See thermo26_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See thermo26_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo26_read_command | ( | thermo26_t * | ctx, |
uint16_t | cmd, | ||
uint16_t * | data_out | ||
) |
Thermo 26 read command function.
This function writes a desired command word and then reads its response word with CRC byte. If the read CRC byte matches internal CRC calculation the response word will be stored in data_out.
[in] | ctx | : Click context object. See thermo26_t object definition for detailed explanation. |
[in] | cmd | : Command word to be written. |
[out] | data_out | : Read response word. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo26_read_serial_num | ( | thermo26_t * | ctx, |
uint32_t * | serial_num | ||
) |
Thermo 26 read serial num function.
This function reads the 32-bit unique serial number.
[in] | ctx | : Click context object. See thermo26_t object definition for detailed explanation. |
[out] | serial_num | : 32-bit unique serial number. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo26_read_temperature | ( | thermo26_t * | ctx, |
float * | temperature | ||
) |
Thermo 26 read temperature function.
This function reads the temperature raw data measurements and converts it to degrees Celsius.
[in] | ctx | : Click context object. See thermo26_t object definition for detailed explanation. |
[out] | temperature | : Temperature measurements in Celsius. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void thermo26_reset_device | ( | thermo26_t * | ctx | ) |
Thermo 26 reset device function.
This function resets the device by toggling the RST pin.
[in] | ctx | : Click context object. See thermo26_t object definition for detailed explanation. |
void thermo26_set_rst_pin | ( | thermo26_t * | ctx, |
uint8_t | state | ||
) |
Thermo 26 set rst pin function.
This function sets the RST pin logic state.
[in] | ctx | : Click context object. See thermo26_t object definition for detailed explanation. |
[in] | state | : Pin logic state. |
err_t thermo26_start_measurement | ( | thermo26_t * | ctx, |
uint16_t | cmd | ||
) |
Thermo 26 start measurement function.
This function starts the measurements by sending the specified command.
[in] | ctx | : Click context object. See thermo26_t object definition for detailed explanation. |
[in] | cmd | : Single-shot or periodic measurements command, refer to the commands list macros. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo26_stop_measurement | ( | thermo26_t * | ctx | ) |
Thermo 26 stop measurement function.
This function stops the measurements by sending the break command.
[in] | ctx | : Click context object. See thermo26_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermo26_write_command | ( | thermo26_t * | ctx, |
uint16_t | cmd | ||
) |
Thermo 26 write command function.
This function writes a desired command by using I2C serial interface.
[in] | ctx | : Click context object. See thermo26_t object definition for detailed explanation. |
[in] | cmd | : Command word to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.