irgrid 2.0.0.0
|
API for configuring and manipulating IR Grid Click driver. More...
Topics | |
IR Grid Registers List | |
List of registers of IR Grid Click driver. | |
IR Grid Registers Settings | |
Settings for registers of IR Grid Click driver. | |
IR Grid MikroBUS Map | |
MikroBUS pin mapping of IR Grid Click driver. | |
Functions | |
void | irgrid_cfg_setup (irgrid_cfg_t *cfg) |
IR Grid configuration object setup function. | |
err_t | irgrid_init (irgrid_t *ctx, irgrid_cfg_t *cfg) |
IR Grid initialization function. | |
uint8_t | irgrid_device_init (irgrid_t *ctx, irgrid_data_t *data_str, uint8_t refrate) |
Device Initialization. | |
void | irgrid_write_ram (irgrid_t *ctx, uint8_t *data_buf, uint8_t len) |
Write function using RAM slave adress. | |
void | irgrid_read_ram (irgrid_t *ctx, uint8_t *reg, uint8_t *data_buf, uint8_t len) |
Read function using RAM slave adress. | |
void | irgrid_write_eeprom (irgrid_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Write function using EEPROM slave adress. | |
void | irgrid_read_eeprom (irgrid_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Read function using EEPROM slave adress. | |
uint8_t | irgrid_measure (irgrid_t *ctx, irgrid_data_t *data_str) |
Measurement. | |
void | irgrid_get_ir_raw (irgrid_data_t *data_str, int16_t *buffer) |
Read Raw Temperature buffer. | |
void | irgrid_get_temperature (irgrid_data_t *data_str, float *buffer) |
Read Calculated Temperature buffer. | |
float | irgrid_get_amb_temperature (irgrid_t *ctx) |
Read Ambient Temperature. | |
API for configuring and manipulating IR Grid Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void irgrid_cfg_setup | ( | irgrid_cfg_t * | cfg | ) |
IR Grid configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See irgrid_cfg_t object definition for detailed explanation. |
uint8_t irgrid_device_init | ( | irgrid_t * | ctx, |
irgrid_data_t * | data_str, | ||
uint8_t | refrate ) |
Device Initialization.
ctx | Click object. |
data_str | Data click object. |
refrate | Refresh Rate |
@description Initializes device, reads eeprom memory and places it inside internal buffers.
float irgrid_get_amb_temperature | ( | irgrid_t * | ctx | ) |
Read Ambient Temperature.
ctx | Click object. |
@description Read Ambient temperautre.
void irgrid_get_ir_raw | ( | irgrid_data_t * | data_str, |
int16_t * | buffer ) |
Read Raw Temperature buffer.
data_str | Data click object. |
buffer | Output data buf. |
@description Populates provided buffer with raw measurements. Buffer must have at least 64 members.
void irgrid_get_temperature | ( | irgrid_data_t * | data_str, |
float * | buffer ) |
Read Calculated Temperature buffer.
data_str | Data click object. |
buffer | Output data buf. |
@description Populates provided buffer with calculated temperatures. Buffer must have at least 64 members.
err_t irgrid_init | ( | irgrid_t * | ctx, |
irgrid_cfg_t * | cfg ) |
IR Grid initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See irgrid_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See irgrid_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.uint8_t irgrid_measure | ( | irgrid_t * | ctx, |
irgrid_data_t * | data_str ) |
Measurement.
ctx | Click object. |
data_str | Data click object. |
@description Measures temperature and places it inside internal buffers. This function is needed to be called prior to irgrid_get_ir_raw
or irgrid_get_temperature
.
void irgrid_read_eeprom | ( | irgrid_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Read function using EEPROM slave adress.
ctx | Click object. |
reg | Register address pointer. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void irgrid_read_ram | ( | irgrid_t * | ctx, |
uint8_t * | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Read function using RAM slave adress.
ctx | Click object. |
reg | Register address pointer. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void irgrid_write_eeprom | ( | irgrid_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Write function using EEPROM slave adress.
ctx | Data click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
void irgrid_write_ram | ( | irgrid_t * | ctx, |
uint8_t * | data_buf, | ||
uint8_t | len ) |
Write function using RAM slave adress.
ctx | Data click object. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.