MLX90632 Driver Library  a258525c
Universal MCU library for the 90632
MLX90632 Driver Library Externally defined

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...
 

Detailed Description

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.

Function Documentation

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.

Note
Needs to be implemented externally
Parameters
[in]register_addressAddress of the register to be read from
[out]*valuepointer to where read data can be written
Return values
0for success
<0for 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.

Note
Needs to be implemented externally
Parameters
[in]register_addressAddress of the register to be read from
[in]valuevalue to be written to register address of mlx90632
Return values
0for success
<0for 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.

Note
Needs to be implemented externally
Parameters
[in]msecsAmount 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.

Note
Needs to be implemented externally
Parameters
[in]min_rangeMinimum amount of microseconds to sleep
[in]max_rangeMaximum amount of microseconds to sleep