LibDriver MLX90614
Loading...
Searching...
No Matches
driver_mlx90614.h File Reference

driver mlx90614 header file More...

#include <stdio.h>
#include <stdint.h>
#include <string.h>
Include dependency graph for driver_mlx90614.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mlx90614_handle_s
 mlx90614 handle structure definition More...
struct  mlx90614_info_s
 mlx90614 information structure definition More...

Macros

#define DRIVER_MLX90614_LINK_INIT(HANDLE, STRUCTURE)
 initialize mlx90614_handle_t structure
#define DRIVER_MLX90614_LINK_IIC_INIT(HANDLE, FUC)
 link iic_init function
#define DRIVER_MLX90614_LINK_IIC_DEINIT(HANDLE, FUC)
 link iic_deinit function
#define DRIVER_MLX90614_LINK_IIC_READ(HANDLE, FUC)
 link iic_read function
#define DRIVER_MLX90614_LINK_IIC_WRITE(HANDLE, FUC)
 link iic_write function
#define DRIVER_MLX90614_LINK_SCL_WRITE(HANDLE, FUC)
 link scl_write function
#define DRIVER_MLX90614_LINK_SDA_WRITE(HANDLE, FUC)
 link sda_write function
#define DRIVER_MLX90614_LINK_DELAY_MS(HANDLE, FUC)
 link delay_ms function
#define DRIVER_MLX90614_LINK_DEBUG_PRINT(HANDLE, FUC)
 link debug_print function

Typedefs

typedef struct mlx90614_handle_s mlx90614_handle_t
 mlx90614 handle structure definition
typedef struct mlx90614_info_s mlx90614_info_t
 mlx90614 information structure definition

Enumerations

enum  mlx90614_address_t { MLX90614_ADDRESS_DEFAULT = 0xB4 }
 mlx90614 address enumeration definition More...
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_info (mlx90614_info_t *info)
 get chip information
uint8_t mlx90614_set_addr (mlx90614_handle_t *handle, uint8_t addr)
 set the address
uint8_t mlx90614_get_addr (mlx90614_handle_t *handle, uint8_t *addr)
 get the address
uint8_t mlx90614_init (mlx90614_handle_t *handle)
 initialize the chip
uint8_t mlx90614_deinit (mlx90614_handle_t *handle)
 close the chip
uint8_t mlx90614_read_object1 (mlx90614_handle_t *handle, uint16_t *raw, float *celsius)
 read the object1
uint8_t mlx90614_read_object2 (mlx90614_handle_t *handle, uint16_t *raw, float *celsius)
 read the object2
uint8_t mlx90614_read_raw_ir_channel (mlx90614_handle_t *handle, uint16_t *channel_1, uint16_t *channel_2)
 read the ir channel raw data
uint8_t mlx90614_read_ambient (mlx90614_handle_t *handle, uint16_t *raw, float *celsius)
 read the ambient
uint8_t mlx90614_write_addr (mlx90614_handle_t *handle, uint8_t addr)
 write the address
uint8_t mlx90614_read_addr (mlx90614_handle_t *handle, uint8_t *addr)
 read the address
uint8_t mlx90614_set_fir_length (mlx90614_handle_t *handle, mlx90614_fir_length_t len)
 set the ir sensor fir length
uint8_t mlx90614_get_fir_length (mlx90614_handle_t *handle, mlx90614_fir_length_t *len)
 get the ir sensor fir length
uint8_t mlx90614_set_iir (mlx90614_handle_t *handle, mlx90614_iir_t iir)
 set the iir param
uint8_t mlx90614_get_iir (mlx90614_handle_t *handle, mlx90614_iir_t *iir)
 get the iir param
uint8_t mlx90614_set_mode (mlx90614_handle_t *handle, mlx90614_mode_t mode)
 set the mode
uint8_t mlx90614_get_mode (mlx90614_handle_t *handle, mlx90614_mode_t *mode)
 get the mode
uint8_t mlx90614_set_ir_sensor (mlx90614_handle_t *handle, mlx90614_ir_sensor_t sensor)
 set the ir sensor mode
uint8_t mlx90614_get_ir_sensor (mlx90614_handle_t *handle, mlx90614_ir_sensor_t *sensor)
 get the ir sensor mode
uint8_t mlx90614_set_ks (mlx90614_handle_t *handle, mlx90614_ks_t ks)
 set the ks param
uint8_t mlx90614_get_ks (mlx90614_handle_t *handle, mlx90614_ks_t *ks)
 get the ks param
uint8_t mlx90614_set_kt2 (mlx90614_handle_t *handle, mlx90614_kt2_t kt2)
 set the kt2 param
uint8_t mlx90614_get_kt2 (mlx90614_handle_t *handle, mlx90614_kt2_t *kt2)
 get the kt2 param
uint8_t mlx90614_set_gain (mlx90614_handle_t *handle, mlx90614_gain_t gain)
 set the gain param
uint8_t mlx90614_get_gain (mlx90614_handle_t *handle, mlx90614_gain_t *gain)
 get the gain param
uint8_t mlx90614_set_sensor_test (mlx90614_handle_t *handle, mlx90614_bool_t enable)
 enable or disable the sensor test
uint8_t mlx90614_get_sensor_test (mlx90614_handle_t *handle, mlx90614_bool_t *enable)
 get the sensor test status
uint8_t mlx90614_set_repeat_sensor_test (mlx90614_handle_t *handle, mlx90614_bool_t enable)
 enable or disable the repeat sensor test
uint8_t mlx90614_get_repeat_sensor_test (mlx90614_handle_t *handle, mlx90614_bool_t *enable)
 get the repeat sensor test status
uint8_t mlx90614_set_emissivity_correction_coefficient (mlx90614_handle_t *handle, uint16_t value)
 set the emissivity correction coefficient
uint8_t mlx90614_get_emissivity_correction_coefficient (mlx90614_handle_t *handle, uint16_t *value)
 get the emissivity correction coefficient
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
uint8_t mlx90614_emissivity_correction_coefficient_convert_to_data (mlx90614_handle_t *handle, uint16_t reg, double *s)
 emissivity correction coefficient convert to data
uint8_t mlx90614_get_id (mlx90614_handle_t *handle, uint16_t id[4])
 get the chip id
uint8_t mlx90614_enter_sleep_mode (mlx90614_handle_t *handle)
 enter to sleep mode
uint8_t mlx90614_exit_sleep_mode (mlx90614_handle_t *handle)
 exit from sleep mode
uint8_t mlx90614_get_flag (mlx90614_handle_t *handle, uint16_t *flag)
 get the flag
uint8_t mlx90614_pwm_to_smbus (mlx90614_handle_t *handle)
 change pwm mode to smbus mode
uint8_t mlx90614_set_reg (mlx90614_handle_t *handle, uint8_t reg, uint16_t data)
 set the chip register
uint8_t mlx90614_get_reg (mlx90614_handle_t *handle, uint8_t reg, uint16_t *data)
 get the chip register

Detailed Description

driver mlx90614 header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Version
1.0.0
Author
Shifeng Li
Date
2021-10-03

history

Date Version Author Description
2021/10/03 1.0 Shifeng Li first upload

Definition in file driver_mlx90614.h.