MLX90632 Driver Library
a258525c
Universal MCU library for the 90632
|
Functions to be defined externally as they are uC or OS dependent. More...
Functions | |
int32_t | mlx90632_i2c_read (int16_t register_address, uint16_t *value) |
Read the register_address value from the mlx90632. More... | |
int32_t | mlx90632_i2c_write (int16_t register_address, uint16_t value) |
Write value to register_address of the mlx90632. More... | |
void | usleep (int min_range, int max_range) |
Blocking function for sleeping in microseconds. More... | |
void | msleep (int msecs) |
Blocking function for sleeping in milliseconds. More... | |
Functions to be defined externally as they are uC or OS dependent.
Some functions need to be declared externally as they are different for each uC or OS. Depends on platform implementation SMBus functions read 8 bytes, but MLX90632 has 16bit address registers (some are also 32bit). So reading at least 16bits at time is recommended.
int32_t mlx90632_i2c_read | ( | int16_t | register_address, |
uint16_t * | value | ||
) |
Read the register_address value from the mlx90632.
i2c read is processor specific and this function expects to have address of mlx90632 known, as it operates purely on register addresses.
[in] | register_address | Address of the register to be read from |
[out] | *value | pointer to where read data can be written |
0 | for success |
<0 | for failure |
int32_t mlx90632_i2c_write | ( | int16_t | register_address, |
uint16_t | value | ||
) |
Write value to register_address of the mlx90632.
i2c write is processor specific and this function expects to have address of mlx90632 known, as it operates purely on register address and value to be written to.
[in] | register_address | Address of the register to be read from |
[in] | value | value to be written to register address of mlx90632 |
0 | for success |
<0 | for failure |
void msleep | ( | int | msecs | ) |
Blocking function for sleeping in milliseconds.
milliseconds which are allowed for the thread to sleep. This is to avoid constant pinging of sensor while the measurement is ongoing in sleeping step mode.
[in] | msecs | Amount of milliseconds to sleep |
void usleep | ( | int | min_range, |
int | max_range | ||
) |
Blocking function for sleeping in microseconds.
Range of microseconds which are allowed for the thread to sleep. This is to avoid constant pinging of sensor if the data is ready.
[in] | min_range | Minimum amount of microseconds to sleep |
[in] | max_range | Maximum amount of microseconds to sleep |