Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
ir_mlx.c File Reference

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 "modules/datalink/downlink.h"
+ Include dependency graph for ir_mlx.c:

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
 

Detailed Description

Melexis MLX90614 I2C.

This reads the values for temperatures from the Melexis MLX90614 IR sensor through I2C.

Definition in file ir_mlx.c.

Macro Definition Documentation

◆ MLX90614_ADDR

#define MLX90614_ADDR   0x06

Definition at line 56 of file ir_mlx.c.

◆ MLX90614_GENERAL_ADDR

#define MLX90614_GENERAL_ADDR   0

Definition at line 59 of file ir_mlx.c.

◆ MLX_I2C_DEV

#define MLX_I2C_DEV   i2c0

Definition at line 41 of file ir_mlx.c.

Function Documentation

◆ ir_mlx_crc()

void ir_mlx_crc ( unsigned char  addr,
volatile unsigned char *  data 
)

Definition at line 63 of file ir_mlx.c.

References logger_uart_parse::crc.

Referenced by ir_mlx_periodic().

+ Here is the caller graph for this function:

◆ ir_mlx_event()

◆ ir_mlx_init()

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.

◆ ir_mlx_periodic()

Variable Documentation

◆ ir_mlx_id_01

uint32_t ir_mlx_id_01

Definition at line 51 of file ir_mlx.c.

Referenced by ir_mlx_event(), and ir_mlx_periodic().

◆ ir_mlx_id_23

uint32_t ir_mlx_id_23

Definition at line 52 of file ir_mlx.c.

Referenced by ir_mlx_event(), and ir_mlx_periodic().

◆ ir_mlx_itemp_case

uint16_t ir_mlx_itemp_case

Definition at line 47 of file ir_mlx.c.

Referenced by ir_mlx_event().

◆ ir_mlx_itemp_obj

uint16_t ir_mlx_itemp_obj

Definition at line 49 of file ir_mlx.c.

Referenced by ir_mlx_event().

◆ ir_mlx_status

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

◆ ir_mlx_temp_case

float ir_mlx_temp_case

Definition at line 48 of file ir_mlx.c.

Referenced by ir_mlx_event().

◆ ir_mlx_temp_obj

float ir_mlx_temp_obj

Definition at line 50 of file ir_mlx.c.

Referenced by ir_mlx_event().

◆ mlx_trans

struct i2c_transaction mlx_trans

Definition at line 1 of file ir_mlx.c.

Referenced by ir_mlx_event(), and ir_mlx_periodic().