LibDriver MLX90614  1.0.0
MLX90614 full-featured driver
mlx90614 advance driver function

mlx90614 advance driver modules More...

Enumerations

enum  mlx90614_flag_t { MLX90614_FLAG_EE_BUSY = (1 << 7) , MLX90614_FLAG_EE_DEAD = (1 << 5) , MLX90614_FLAG_INIT = (1 << 4) }
 mlx90614 flag enumeration definition More...
 
enum  mlx90614_mode_t { MLX90614_MODE_TA_TOBJ1 = 0x00 , MLX90614_MODE_TA_TOBJ2 = 0x01 , MLX90614_MODE_TOBJ2 = 0x02 , MLX90614_MODE_TOBJ1_TOBJ2 = 0x03 }
 mlx90614 mode enumeration definition More...
 
enum  mlx90614_gain_t {
  MLX90614_GAIN_1 = 0x00 , MLX90614_GAIN_3 = 0x01 , MLX90614_GAIN_6 = 0x02 , MLX90614_GAIN_12P5 = 0x03 ,
  MLX90614_GAIN_25 = 0x04 , MLX90614_GAIN_50 = 0x05 , MLX90614_GAIN_100 = 0x06
}
 mlx90614 gain enumeration definition More...
 
enum  mlx90614_bool_t { MLX90614_BOOL_FALSE = 0x00 , MLX90614_BOOL_TRUE = 0x01 }
 mlx90614 bool enumeration definition More...
 
enum  mlx90614_kt2_t { MLX90614_KT2_POSITIVE = 0x00 , MLX90614_KT2_NEGATIVE = 0x01 }
 mlx90614 kt2 enumeration definition More...
 
enum  mlx90614_ks_t { MLX90614_KS_POSITIVE = 0x00 , MLX90614_KS_NEGATIVE = 0x01 }
 mlx90614 ks enumeration definition More...
 
enum  mlx90614_ir_sensor_t { MLX90614_IR_SENSOR_SINGLE = 0x00 , MLX90614_IR_SENSOR_DUAL = 0x01 }
 mlx90614 ir sensor enumeration definition More...
 
enum  mlx90614_fir_length_t {
  MLX90614_FIR_LENGTH_8 = 0x00 , MLX90614_FIR_LENGTH_16 = 0x01 , MLX90614_FIR_LENGTH_32 = 0x02 , MLX90614_FIR_LENGTH_64 = 0x03 ,
  MLX90614_FIR_LENGTH_128 = 0x04 , MLX90614_FIR_LENGTH_256 = 0x05 , MLX90614_FIR_LENGTH_512 = 0x06 , MLX90614_FIR_LENGTH_1024 = 0x07
}
 mlx90614 fir length enumeration definition More...
 
enum  mlx90614_iir_t {
  MLX90614_IIR_A1_0P5_B1_0P5 = 0x00 , MLX90614_IIR_A1_0P25_B1_0P75 = 0x01 , MLX90614_IIR_A1_0P166_B1_0P83 = 0x02 , MLX90614_IIR_A1_0P125_B1_0P875 = 0x03 ,
  MLX90614_IIR_A1_1_B1_0 = 0x04 , MLX90614_IIR_A1_0P8_B1_0P2 = 0x05 , MLX90614_IIR_A1_0P666_B1_0P333 = 0x06 , MLX90614_IIR_A1_0P571_B1_0P428 = 0x07
}
 mlx90614 iir enumeration definition More...
 

Functions

uint8_t mlx90614_set_fir_length (mlx90614_handle_t *handle, mlx90614_fir_length_t len)
 set the ir sensor fir length More...
 
uint8_t mlx90614_get_fir_length (mlx90614_handle_t *handle, mlx90614_fir_length_t *len)
 get the ir sensor fir length More...
 
uint8_t mlx90614_set_iir (mlx90614_handle_t *handle, mlx90614_iir_t iir)
 set the iir param More...
 
uint8_t mlx90614_get_iir (mlx90614_handle_t *handle, mlx90614_iir_t *iir)
 get the iir param More...
 
uint8_t mlx90614_set_mode (mlx90614_handle_t *handle, mlx90614_mode_t mode)
 set the mode More...
 
uint8_t mlx90614_get_mode (mlx90614_handle_t *handle, mlx90614_mode_t *mode)
 get the mode More...
 
uint8_t mlx90614_set_ir_sensor (mlx90614_handle_t *handle, mlx90614_ir_sensor_t sensor)
 set the ir sensor mode More...
 
uint8_t mlx90614_get_ir_sensor (mlx90614_handle_t *handle, mlx90614_ir_sensor_t *sensor)
 get the ir sensor mode More...
 
uint8_t mlx90614_set_ks (mlx90614_handle_t *handle, mlx90614_ks_t ks)
 set the ks param More...
 
uint8_t mlx90614_get_ks (mlx90614_handle_t *handle, mlx90614_ks_t *ks)
 get the ks param More...
 
uint8_t mlx90614_set_kt2 (mlx90614_handle_t *handle, mlx90614_kt2_t kt2)
 set the kt2 param More...
 
uint8_t mlx90614_get_kt2 (mlx90614_handle_t *handle, mlx90614_kt2_t *kt2)
 get the kt2 param More...
 
uint8_t mlx90614_set_gain (mlx90614_handle_t *handle, mlx90614_gain_t gain)
 set the gain param More...
 
uint8_t mlx90614_get_gain (mlx90614_handle_t *handle, mlx90614_gain_t *gain)
 get the gain param More...
 
uint8_t mlx90614_set_sensor_test (mlx90614_handle_t *handle, mlx90614_bool_t enable)
 enable or disable the sensor test More...
 
uint8_t mlx90614_get_sensor_test (mlx90614_handle_t *handle, mlx90614_bool_t *enable)
 get the sensor test status More...
 
uint8_t mlx90614_set_repeat_sensor_test (mlx90614_handle_t *handle, mlx90614_bool_t enable)
 enable or disable the repeat sensor test More...
 
uint8_t mlx90614_get_repeat_sensor_test (mlx90614_handle_t *handle, mlx90614_bool_t *enable)
 get the repeat sensor test status More...
 
uint8_t mlx90614_set_emissivity_correction_coefficient (mlx90614_handle_t *handle, uint16_t value)
 set the emissivity correction coefficient More...
 
uint8_t mlx90614_get_emissivity_correction_coefficient (mlx90614_handle_t *handle, uint16_t *value)
 get the emissivity correction coefficient More...
 
uint8_t mlx90614_emissivity_correction_coefficient_convert_to_register (mlx90614_handle_t *handle, double s, uint16_t *reg)
 convert the emissivity correction coefficient to the register raw data More...
 
uint8_t mlx90614_emissivity_correction_coefficient_convert_to_data (mlx90614_handle_t *handle, uint16_t reg, double *s)
 emissivity correction coefficient convert to data More...
 
uint8_t mlx90614_get_id (mlx90614_handle_t *handle, uint16_t id[4])
 get the chip id More...
 
uint8_t mlx90614_enter_sleep_mode (mlx90614_handle_t *handle)
 enter to sleep mode More...
 
uint8_t mlx90614_exit_sleep_mode (mlx90614_handle_t *handle)
 exit from sleep mode More...
 
uint8_t mlx90614_get_flag (mlx90614_handle_t *handle, uint16_t *flag)
 get the flag More...
 
uint8_t mlx90614_pwm_to_smbus (mlx90614_handle_t *handle)
 change pwm mode to smbus mode More...
 

Detailed Description

mlx90614 advance driver modules

Enumeration Type Documentation

◆ mlx90614_bool_t

mlx90614 bool enumeration definition

Enumerator
MLX90614_BOOL_FALSE 

false

MLX90614_BOOL_TRUE 

true

Definition at line 114 of file driver_mlx90614.h.

◆ mlx90614_fir_length_t

mlx90614 fir length enumeration definition

Enumerator
MLX90614_FIR_LENGTH_8 

length 8

MLX90614_FIR_LENGTH_16 

length 16

MLX90614_FIR_LENGTH_32 

length 32

MLX90614_FIR_LENGTH_64 

length 64

MLX90614_FIR_LENGTH_128 

length 128

MLX90614_FIR_LENGTH_256 

length 256

MLX90614_FIR_LENGTH_512 

length 512

MLX90614_FIR_LENGTH_1024 

length 1024

Definition at line 150 of file driver_mlx90614.h.

◆ mlx90614_flag_t

mlx90614 flag enumeration definition

Enumerator
MLX90614_FLAG_EE_BUSY 

the previous write/erase eeprom access is still in progress, high active

MLX90614_FLAG_EE_DEAD 

eeprom double error has occurred, high active

MLX90614_FLAG_INIT 

por initialization routine is still ongoing, low active

Definition at line 79 of file driver_mlx90614.h.

◆ mlx90614_gain_t

mlx90614 gain enumeration definition

Enumerator
MLX90614_GAIN_1 

gain 1

MLX90614_GAIN_3 

gain 3

MLX90614_GAIN_6 

gain 6

MLX90614_GAIN_12P5 

gain 12.5

MLX90614_GAIN_25 

gain 25

MLX90614_GAIN_50 

gain 50

MLX90614_GAIN_100 

gain 100

Definition at line 100 of file driver_mlx90614.h.

◆ mlx90614_iir_t

mlx90614 iir enumeration definition

Enumerator
MLX90614_IIR_A1_0P5_B1_0P5 

a1 = 0.5 b1 = 0.5

MLX90614_IIR_A1_0P25_B1_0P75 

a1 = 0.25 b1 = 0.75

MLX90614_IIR_A1_0P166_B1_0P83 

a1 = 0.166 b1 = 0.83

MLX90614_IIR_A1_0P125_B1_0P875 

a1 = 0.125 b1 = 0.875

MLX90614_IIR_A1_1_B1_0 

a1 = 1 b1 = 0

MLX90614_IIR_A1_0P8_B1_0P2 

a1 = 0.8 b1 = 0.2

MLX90614_IIR_A1_0P666_B1_0P333 

a1 = 0.666 b1 = 0.333

MLX90614_IIR_A1_0P571_B1_0P428 

a1 = 0.571 b1 = 0.428

Definition at line 165 of file driver_mlx90614.h.

◆ mlx90614_ir_sensor_t

mlx90614 ir sensor enumeration definition

Enumerator
MLX90614_IR_SENSOR_SINGLE 

single ir sensor

MLX90614_IR_SENSOR_DUAL 

dual ir sensor

Definition at line 141 of file driver_mlx90614.h.

◆ mlx90614_ks_t

mlx90614 ks enumeration definition

Enumerator
MLX90614_KS_POSITIVE 
MLX90614_KS_NEGATIVE 

Definition at line 132 of file driver_mlx90614.h.

◆ mlx90614_kt2_t

mlx90614 kt2 enumeration definition

Enumerator
MLX90614_KT2_POSITIVE 

positive

MLX90614_KT2_NEGATIVE 

negative

Definition at line 123 of file driver_mlx90614.h.

◆ mlx90614_mode_t

mlx90614 mode enumeration definition

Enumerator
MLX90614_MODE_TA_TOBJ1 

ta and tobj1 mode

MLX90614_MODE_TA_TOBJ2 

ta and tobj2 mode

MLX90614_MODE_TOBJ2 

tobj2 mode

MLX90614_MODE_TOBJ1_TOBJ2 

tobj1 and tobj2 mode

Definition at line 89 of file driver_mlx90614.h.

Function Documentation

◆ mlx90614_emissivity_correction_coefficient_convert_to_data()

uint8_t mlx90614_emissivity_correction_coefficient_convert_to_data ( mlx90614_handle_t handle,
uint16_t  reg,
double *  s 
)

emissivity correction coefficient convert to data

Parameters
[in]*handlepointer to an mlx90614 handle structure
[in]regraw data
[out]*spointer to a converted data buffer
Returns
status code
  • 0 success
  • 1 emissivity correction coefficient convert to data failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1144 of file driver_mlx90614.c.

◆ mlx90614_emissivity_correction_coefficient_convert_to_register()

uint8_t mlx90614_emissivity_correction_coefficient_convert_to_register ( mlx90614_handle_t handle,
double  s,
uint16_t *  reg 
)

convert the emissivity correction coefficient to the register raw data

Parameters
[in]*handlepointer to an mlx90614 handle structure
[in]semissivity correction coefficient
[out]*regpointer to a register raw data buffer
Returns
status code
  • 0 success
  • 1 emissivity correction coefficient convert to register failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 s is over 1.0
Note
none

Definition at line 1110 of file driver_mlx90614.c.

◆ mlx90614_enter_sleep_mode()

uint8_t mlx90614_enter_sleep_mode ( mlx90614_handle_t handle)

enter to sleep mode

Parameters
[in]*handlepointer to an mlx90614 handle structure
Returns
status code
  • 0 success
  • 1 enter sleep mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1426 of file driver_mlx90614.c.

◆ mlx90614_exit_sleep_mode()

uint8_t mlx90614_exit_sleep_mode ( mlx90614_handle_t handle)

exit from sleep mode

Parameters
[in]*handlepointer to an mlx90614 handle structure
Returns
status code
  • 0 success
  • 1 exit sleep mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1506 of file driver_mlx90614.c.

◆ mlx90614_get_emissivity_correction_coefficient()

uint8_t mlx90614_get_emissivity_correction_coefficient ( mlx90614_handle_t handle,
uint16_t *  value 
)

get the emissivity correction coefficient

Parameters
[in]*handlepointer to an mlx90614 handle structure
[out]*valuepointer to a value buffer
Returns
status code
  • 0 success
  • 1 get emissivity correction coefficient failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1083 of file driver_mlx90614.c.

◆ mlx90614_get_fir_length()

uint8_t mlx90614_get_fir_length ( mlx90614_handle_t handle,
mlx90614_fir_length_t len 
)

get the ir sensor fir length

Parameters
[in]*handlepointer to an mlx90614 handle structure
[out]*lenpointer to an fir length buffer
Returns
status code
  • 0 success
  • 1 get fir length failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 412 of file driver_mlx90614.c.

◆ mlx90614_get_flag()

uint8_t mlx90614_get_flag ( mlx90614_handle_t handle,
uint16_t *  flag 
)

get the flag

Parameters
[in]*handlepointer to an mlx90614 handle structure
[out]*flagpointer to a flag buffer
Returns
status code
  • 0 success
  • 1 get flag failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1395 of file driver_mlx90614.c.

◆ mlx90614_get_gain()

uint8_t mlx90614_get_gain ( mlx90614_handle_t handle,
mlx90614_gain_t gain 
)

get the gain param

Parameters
[in]*handlepointer to an mlx90614 handle structure
[out]*gainpointer to a gain param buffer
Returns
status code
  • 0 success
  • 1 get gain failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 868 of file driver_mlx90614.c.

◆ mlx90614_get_id()

uint8_t mlx90614_get_id ( mlx90614_handle_t handle,
uint16_t  id[4] 
)

get the chip id

Parameters
[in]*handlepointer to an mlx90614 handle structure
[out]*idpointer to an id buffer
Returns
status code
  • 0 success
  • 1 get id failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1339 of file driver_mlx90614.c.

◆ mlx90614_get_iir()

uint8_t mlx90614_get_iir ( mlx90614_handle_t handle,
mlx90614_iir_t iir 
)

get the iir param

Parameters
[in]*handlepointer to an mlx90614 handle structure
[out]*iirpointer to an iir param buffer
Returns
status code
  • 0 success
  • 1 get fir failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 488 of file driver_mlx90614.c.

◆ mlx90614_get_ir_sensor()

uint8_t mlx90614_get_ir_sensor ( mlx90614_handle_t handle,
mlx90614_ir_sensor_t sensor 
)

get the ir sensor mode

Parameters
[in]*handlepointer to an mlx90614 handle structure
[out]*sensorpointer to an ir sensor mode buffer
Returns
status code
  • 0 success
  • 1 get ir sensor failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 640 of file driver_mlx90614.c.

◆ mlx90614_get_ks()

uint8_t mlx90614_get_ks ( mlx90614_handle_t handle,
mlx90614_ks_t ks 
)

get the ks param

Parameters
[in]*handlepointer to an mlx90614 handle structure
[out]*kspointer to a ks param buffer
Returns
status code
  • 0 success
  • 1 get ks failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 716 of file driver_mlx90614.c.

◆ mlx90614_get_kt2()

uint8_t mlx90614_get_kt2 ( mlx90614_handle_t handle,
mlx90614_kt2_t kt2 
)

get the kt2 param

Parameters
[in]*handlepointer to an mlx90614 handle structure
[out]*kt2pointer to a kt2 param buffer
Returns
status code
  • 0 success
  • 1 get kt2 failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 792 of file driver_mlx90614.c.

◆ mlx90614_get_mode()

uint8_t mlx90614_get_mode ( mlx90614_handle_t handle,
mlx90614_mode_t mode 
)

get the mode

Parameters
[in]*handlepointer to an mlx90614 handle structure
[out]*modepointer to a chip mode buffer
Returns
status code
  • 0 success
  • 1 get mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 564 of file driver_mlx90614.c.

◆ mlx90614_get_repeat_sensor_test()

uint8_t mlx90614_get_repeat_sensor_test ( mlx90614_handle_t handle,
mlx90614_bool_t enable 
)

get the repeat sensor test status

Parameters
[in]*handlepointer to an mlx90614 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get repeat sensor test failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1020 of file driver_mlx90614.c.

◆ mlx90614_get_sensor_test()

uint8_t mlx90614_get_sensor_test ( mlx90614_handle_t handle,
mlx90614_bool_t enable 
)

get the sensor test status

Parameters
[in]*handlepointer to an mlx90614 handle structure
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get sensor test failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 944 of file driver_mlx90614.c.

◆ mlx90614_pwm_to_smbus()

uint8_t mlx90614_pwm_to_smbus ( mlx90614_handle_t handle)

change pwm mode to smbus mode

Parameters
[in]*handlepointer to an mlx90614 handle structure
Returns
status code
  • 0 success
  • 1 pwm to smbus failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1464 of file driver_mlx90614.c.

◆ mlx90614_set_emissivity_correction_coefficient()

uint8_t mlx90614_set_emissivity_correction_coefficient ( mlx90614_handle_t handle,
uint16_t  value 
)

set the emissivity correction coefficient

Parameters
[in]*handlepointer to an mlx90614 handle structure
[in]valueset value
Returns
status code
  • 0 success
  • 1 set emissivity correction coefficient failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1058 of file driver_mlx90614.c.

◆ mlx90614_set_fir_length()

uint8_t mlx90614_set_fir_length ( mlx90614_handle_t handle,
mlx90614_fir_length_t  len 
)

set the ir sensor fir length

Parameters
[in]*handlepointer to an mlx90614 handle structure
[in]lenfir length
Returns
status code
  • 0 success
  • 1 set fir length failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 374 of file driver_mlx90614.c.

◆ mlx90614_set_gain()

uint8_t mlx90614_set_gain ( mlx90614_handle_t handle,
mlx90614_gain_t  gain 
)

set the gain param

Parameters
[in]*handlepointer to an mlx90614 handle structure
[in]gaingain param
Returns
status code
  • 0 success
  • 1 set gain failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 830 of file driver_mlx90614.c.

◆ mlx90614_set_iir()

uint8_t mlx90614_set_iir ( mlx90614_handle_t handle,
mlx90614_iir_t  iir 
)

set the iir param

Parameters
[in]*handlepointer to an mlx90614 handle structure
[in]iiriir param
Returns
status code
  • 0 success
  • 1 set fir failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 450 of file driver_mlx90614.c.

◆ mlx90614_set_ir_sensor()

uint8_t mlx90614_set_ir_sensor ( mlx90614_handle_t handle,
mlx90614_ir_sensor_t  sensor 
)

set the ir sensor mode

Parameters
[in]*handlepointer to an mlx90614 handle structure
[in]sensorir sensor mode
Returns
status code
  • 0 success
  • 1 set ir sensor failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 602 of file driver_mlx90614.c.

◆ mlx90614_set_ks()

uint8_t mlx90614_set_ks ( mlx90614_handle_t handle,
mlx90614_ks_t  ks 
)

set the ks param

Parameters
[in]*handlepointer to an mlx90614 handle structure
[in]ksks param
Returns
status code
  • 0 success
  • 1 set ks failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 678 of file driver_mlx90614.c.

◆ mlx90614_set_kt2()

uint8_t mlx90614_set_kt2 ( mlx90614_handle_t handle,
mlx90614_kt2_t  kt2 
)

set the kt2 param

Parameters
[in]*handlepointer to an mlx90614 handle structure
[in]kt2kt2 param
Returns
status code
  • 0 success
  • 1 set kt2 failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 754 of file driver_mlx90614.c.

◆ mlx90614_set_mode()

uint8_t mlx90614_set_mode ( mlx90614_handle_t handle,
mlx90614_mode_t  mode 
)

set the mode

Parameters
[in]*handlepointer to an mlx90614 handle structure
[in]modechip mode
Returns
status code
  • 0 success
  • 1 set mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 526 of file driver_mlx90614.c.

◆ mlx90614_set_repeat_sensor_test()

uint8_t mlx90614_set_repeat_sensor_test ( mlx90614_handle_t handle,
mlx90614_bool_t  enable 
)

enable or disable the repeat sensor test

Parameters
[in]*handlepointer to an mlx90614 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set repeat sensor test failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 982 of file driver_mlx90614.c.

◆ mlx90614_set_sensor_test()

uint8_t mlx90614_set_sensor_test ( mlx90614_handle_t handle,
mlx90614_bool_t  enable 
)

enable or disable the sensor test

Parameters
[in]*handlepointer to an mlx90614 handle structure
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set sensor test failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 906 of file driver_mlx90614.c.