Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
enose.c File Reference
#include <string.h>
#include "modules/enose/enose.h"
#include "mcu_periph/i2c.h"
#include "mcu_periph/adc.h"
#include <BOARD_CONFIG>
#include "mcu_periph/uart.h"
#include "messages.h"
#include "subsystems/datalink/downlink.h"
+ Include dependency graph for enose.c:

Go to the source code of this file.

Macros

#define ENOSE_SLAVE_ADDR   0xAE
 
#define ENOSE_PWM_ADDR   0x06
 
#define ENOSE_DATA_ADDR   0x00
 
#define ENOSE_HEAT_INIT   237
 
#define DOWNLINK_DEVICE   DOWNLINK_AP_DEVICE
 

Functions

void enose_init (void)
 
void enose_set_heat (uint8_t no_sensor, uint8_t value)
 
void enose_periodic (void)
 

Variables

uint8_t enose_status
 
uint8_t enose_heat [ENOSE_NB_SENSOR]
 
uint16_t enose_val [ENOSE_NB_SENSOR]
 
uint16_t enose_PID_val
 
static uint8_t enose_conf_requested
 
static volatile bool_t enose_i2c_done
 
static struct adc_buf buf_PID
 

Macro Definition Documentation

#define DOWNLINK_DEVICE   DOWNLINK_AP_DEVICE

Definition at line 48 of file enose.c.

#define ENOSE_DATA_ADDR   0x00

Definition at line 17 of file enose.c.

Referenced by enose_periodic().

#define ENOSE_HEAT_INIT   237

Definition at line 18 of file enose.c.

Referenced by enose_init().

#define ENOSE_PWM_ADDR   0x06

Definition at line 16 of file enose.c.

Referenced by enose_periodic().

#define ENOSE_SLAVE_ADDR   0xAE

Definition at line 15 of file enose.c.

Referenced by enose_periodic().

Function Documentation

void enose_init ( void  )

Definition at line 25 of file enose.c.

References adc_buf_channel(), buf_PID, enose_conf_requested, enose_heat, ENOSE_HEAT_INIT, enose_i2c_done, ENOSE_IDLE, ENOSE_NB_SENSOR, enose_status, enose_val, nominal_val, and TRUE.

+ Here is the call graph for this function:

void enose_set_heat ( uint8_t  no_sensor,
uint8_t  value 
)

Definition at line 41 of file enose.c.

References enose_conf_requested, enose_heat, TRUE, and value.

Variable Documentation

struct adc_buf buf_PID
static

Definition at line 22 of file enose.c.

Referenced by enose_init(), and enose_periodic().

uint8_t enose_conf_requested
static

Definition at line 20 of file enose.c.

Referenced by enose_init(), enose_periodic(), and enose_set_heat().

uint8_t enose_heat[ENOSE_NB_SENSOR]

Definition at line 11 of file enose.c.

Referenced by enose_init(), enose_periodic(), and enose_set_heat().

volatile bool_t enose_i2c_done
static

Definition at line 21 of file enose.c.

Referenced by enose_init(), and enose_periodic().

uint16_t enose_PID_val

Definition at line 13 of file enose.c.

Referenced by enose_periodic().

uint8_t enose_status

Definition at line 10 of file enose.c.

Referenced by enose_init(), and enose_periodic().

Definition at line 12 of file enose.c.

Referenced by enose_init(), and enose_periodic().