Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Melexis MLX90614 I2C. More...
#include "modules/meteo/ir_mlx.h"
#include "mcu_periph/sys_time.h"
#include "mcu_periph/i2c.h"
#include "led.h"
#include "mcu_periph/uart.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
Go to the source code of this file.
Macros | |
#define | MLX_I2C_DEV i2c0 |
#define | MLX90614_ADDR 0x06 |
#define | MLX90614_GENERAL_ADDR 0 |
Functions | |
void | ir_mlx_crc (unsigned char addr, volatile unsigned char *data) |
void | ir_mlx_init (void) |
void | ir_mlx_periodic (void) |
void | ir_mlx_event (void) |
Variables | |
struct i2c_transaction | mlx_trans |
uint8_t | ir_mlx_status |
uint16_t | ir_mlx_itemp_case |
float | ir_mlx_temp_case |
uint16_t | ir_mlx_itemp_obj |
float | ir_mlx_temp_obj |
uint32_t | ir_mlx_id_01 |
uint32_t | ir_mlx_id_23 |
Melexis MLX90614 I2C.
This reads the values for temperatures from the Melexis MLX90614 IR sensor through I2C.
Definition in file ir_mlx.c.
void ir_mlx_crc | ( | unsigned char | addr, |
volatile unsigned char * | data | ||
) |
Definition at line 63 of file ir_mlx.c.
References crc.
Referenced by ir_mlx_periodic().
void ir_mlx_event | ( | void | ) |
Definition at line 138 of file ir_mlx.c.
References i2c_transaction::buf, DefaultChannel, DefaultDevice, i2c_transceive(), I2CTransDone, I2CTransSuccess, ir_mlx_id_01, ir_mlx_id_23, IR_MLX_IDLE, ir_mlx_itemp_case, ir_mlx_itemp_obj, IR_MLX_RD_CASE_TEMP, IR_MLX_RD_ID_0, IR_MLX_RD_ID_1, IR_MLX_RD_ID_2, IR_MLX_RD_ID_3, IR_MLX_RD_OBJ_TEMP, ir_mlx_status, ir_mlx_temp_case, ir_mlx_temp_obj, MLX90614_ADDR, MLX90614_ID_1, MLX90614_ID_2, MLX90614_ID_3, MLX90614_TOBJ, MLX_I2C_DEV, mlx_trans, and i2c_transaction::status.
void ir_mlx_init | ( | void | ) |
Definition at line 83 of file ir_mlx.c.
References IR_MLX_ADDR_CHANGE, ir_mlx_status, and IR_MLX_UNINIT.
void ir_mlx_periodic | ( | void | ) |
Definition at line 94 of file ir_mlx.c.
References i2c_transaction::buf, DefaultChannel, DefaultDevice, i2c_transceive(), i2c_transmit(), IR_MLX_ADDR_CHANGE, IR_MLX_ADDR_ERASE, IR_MLX_ADDR_SET, ir_mlx_crc(), ir_mlx_id_01, ir_mlx_id_23, IR_MLX_IDLE, IR_MLX_RD_CASE_TEMP, IR_MLX_RD_ID_0, ir_mlx_status, IR_MLX_UNINIT, MLX90614_ADDR, MLX90614_GENERAL_ADDR, MLX90614_ID_0, MLX90614_SADR, MLX90614_TA, MLX_I2C_DEV, mlx_trans, and sys_time::nb_sec.
uint32_t ir_mlx_id_01 |
Definition at line 51 of file ir_mlx.c.
Referenced by ir_mlx_event(), and ir_mlx_periodic().
uint32_t ir_mlx_id_23 |
Definition at line 52 of file ir_mlx.c.
Referenced by ir_mlx_event(), and ir_mlx_periodic().
uint16_t ir_mlx_itemp_case |
Definition at line 47 of file ir_mlx.c.
Referenced by ir_mlx_event().
uint16_t ir_mlx_itemp_obj |
Definition at line 49 of file ir_mlx.c.
Referenced by ir_mlx_event().
uint8_t ir_mlx_status |
Definition at line 46 of file ir_mlx.c.
Referenced by ir_mlx_event(), ir_mlx_init(), and ir_mlx_periodic().
float ir_mlx_temp_case |
Definition at line 48 of file ir_mlx.c.
Referenced by ir_mlx_event().
float ir_mlx_temp_obj |
Definition at line 50 of file ir_mlx.c.
Referenced by ir_mlx_event().
struct i2c_transaction mlx_trans |
Definition at line 44 of file ir_mlx.c.
Referenced by ir_mlx_event(), and ir_mlx_periodic().