tempprobe
2.0.0.0
|
API for configuring and manipulating Temp Probe Click driver. More...
Modules | |
Temp Probe Registers List | |
List of registers of Temp Probe Click driver. | |
Temp Probe Registers Settings | |
Settings for registers of Temp Probe Click driver. | |
Temp Probe MikroBUS Map | |
MikroBUS pin mapping of Temp Probe Click driver. | |
Functions | |
void | tempprobe_cfg_setup (tempprobe_cfg_t *cfg) |
Temp Probe configuration object setup function. More... | |
err_t | tempprobe_init (tempprobe_t *ctx, tempprobe_cfg_t *cfg) |
Temp Probe initialization function. More... | |
err_t | tempprobe_default_cfg (tempprobe_t *ctx) |
Temp Probe default configuration function. More... | |
err_t | tempprobe_generic_write (tempprobe_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Temp Probe data writing function. More... | |
err_t | tempprobe_generic_read (tempprobe_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Temp Probe data reading function. More... | |
err_t | tempprobe_write_byte (tempprobe_t *ctx, uint16_t reg_addr, uint8_t data_in) |
Byte Write function. More... | |
err_t | tempprobe_write_word (tempprobe_t *ctx, uint16_t reg_addr, uint32_t data_in) |
Word Write function. More... | |
err_t | tempprobe_read_bytes (tempprobe_t *ctx, uint16_t reg_addr, uint8_t *data_out, uint8_t n_bytes) |
Byte Read function. More... | |
uint8_t | tempprobe_read_word (tempprobe_t *ctx, uint16_t reg_addr, uint32_t *data_out) |
Word Read function. More... | |
uint8_t | tempprobe_check_busy (tempprobe_t *ctx) |
Busy Check function. More... | |
void | tempprobe_reset (tempprobe_t *ctx) |
Reset function. More... | |
uint8_t | tempprobe_write_eeprom_data (tempprobe_t *ctx) |
EEPROM Write function. More... | |
uint8_t | tempprobe_read_eeprom_data (tempprobe_t *ctx) |
EEPROM Read function. More... | |
uint8_t | tempprobe_read_temp (tempprobe_t *ctx, uint16_t sel_channel, float *data_out) |
Temperature Read function. More... | |
API for configuring and manipulating Temp Probe Click driver.
void tempprobe_cfg_setup | ( | tempprobe_cfg_t * | cfg | ) |
Temp Probe configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See tempprobe_cfg_t object definition for detailed explanation. |
uint8_t tempprobe_check_busy | ( | tempprobe_t * | ctx | ) |
Busy Check function.
Function returns 2 if the device is busy, or 1 if is not (conversion cycle is finished).
[in] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
1
- Conversion cycle is finished, 2
- Busy. err_t tempprobe_default_cfg | ( | tempprobe_t * | ctx | ) |
Temp Probe default configuration function.
This function executes a default configuration of Temp Probe click board.
[in] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t tempprobe_generic_read | ( | tempprobe_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len | ||
) |
Temp Probe data reading 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 tempprobe_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. |
0
- Success, -1
- Error.err_t tempprobe_generic_write | ( | tempprobe_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len | ||
) |
Temp Probe data writing 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 tempprobe_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. |
0
- Success, -1
- Error.err_t tempprobe_init | ( | tempprobe_t * | ctx, |
tempprobe_cfg_t * | cfg | ||
) |
Temp Probe initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See tempprobe_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t tempprobe_read_bytes | ( | tempprobe_t * | ctx, |
uint16_t | reg_addr, | ||
uint8_t * | data_out, | ||
uint8_t | n_bytes | ||
) |
Byte Read function.
Function reads the desired number of bytes from the registers.
[in] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
[in] | reg_addr | : Start address which from byte/bytes be read. |
[out] | data_out | : Memory where byte/bytes be stored. |
[in] | n_bytes | : Number of bytes to be read. |
0
- Success, 1
- Wrong address parameter, 2
- Number of bytes is out of range, -1
- Error. uint8_t tempprobe_read_eeprom_data | ( | tempprobe_t * | ctx | ) |
EEPROM Read function.
Function reads the memorized settings from the EEPROM memory and writes this settings to the chip configuration registers. Also checks is reading has passed or not.
[in] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
uint8_t tempprobe_read_temp | ( | tempprobe_t * | ctx, |
uint16_t | sel_channel, | ||
float * | data_out | ||
) |
Temperature Read function.
Function reads temperature data from the desired channel.
[in] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
[in] | sel_channel | : Channel which from temperature be read. |
[out] | data_out | : Memory where temperature data be stored. |
uint8_t tempprobe_read_word | ( | tempprobe_t * | ctx, |
uint16_t | reg_addr, | ||
uint32_t * | data_out | ||
) |
Word Read function.
Function reads 32-bit data from the registers.
[in] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
[in] | reg_addr | : Address which from data be read. |
[out] | data_out | : Memory where data be stored. |
0
- Success, 1
- Wrong address parameter, -1
- Error.void tempprobe_reset | ( | tempprobe_t * | ctx | ) |
Reset function.
Function performs the device reset and waits until reset command is finished and the device is ready for ussing.
[in] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
err_t tempprobe_write_byte | ( | tempprobe_t * | ctx, |
uint16_t | reg_addr, | ||
uint8_t | data_in | ||
) |
Byte Write function.
Function writes one byte data to the register.
[in] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
[in] | reg_addr | : Address where byte be written. |
[in] | data_in | : Data byte to be written. |
0
- Success, 1
- Wrong address parameter, -1
- Error.uint8_t tempprobe_write_eeprom_data | ( | tempprobe_t * | ctx | ) |
EEPROM Write function.
Function writes the current settings from the chip registers to the EEPROM memory and checks is error occurred.
[in] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
err_t tempprobe_write_word | ( | tempprobe_t * | ctx, |
uint16_t | reg_addr, | ||
uint32_t | data_in | ||
) |
Word Write function.
Function writes 32-bit data to the register.
[in] | ctx | : Click context object. See tempprobe_t object definition for detailed explanation. |
[in] | reg_addr | : Address where data be written. |
[in] | data_in | : 32-bit data to be written. |
0
- Success, 1
- Wrong address parameter, -1
- Error.