Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
meteo_france_DAQ.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Gautier Hattenberger
3  *
4  * This file is part of paparazzi
5 
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  *
21  */
22 
34 #ifndef METEO_FRANCE_DAQ_H
35 #define METEO_FRANCE_DAQ_H
36 
37 #include "std.h"
38 #include "mcu_periph/gpio.h"
39 #include "generated/airframe.h"
40 
41 #define MF_DAQ_SIZE 32
42 
43 struct MF_DAQ {
47 };
48 
49 extern struct MF_DAQ mf_daq;
50 
51 extern void init_mf_daq(void);
52 extern void mf_daq_send_state(void);
53 extern void mf_daq_send_report(void);
54 extern void parse_mf_daq_msg(uint8_t *buf);
55 
56 #if (defined MF_DAQ_POWER_PORT) && (defined MF_DAQ_POWER_PIN)
57 #define meteo_france_DAQ_SetPower(_x) { \
58  mf_daq.power = _x; \
59  if (mf_daq.power) { gpio_set(MF_DAQ_POWER_PORT, MF_DAQ_POWER_PIN); } \
60  else { gpio_clear(MF_DAQ_POWER_PORT, MF_DAQ_POWER_PIN); } \
61  }
62 #else // POWER PORT and PIN undefined
63 #define meteo_france_DAQ_SetPower(_x) {}
64 #endif
65 
66 #endif
67 
Some architecture independent helper functions for GPIOs.
uint8_t power
void mf_daq_send_state(void)
#define MF_DAQ_SIZE
void parse_mf_daq_msg(uint8_t *buf)
float values[MF_DAQ_SIZE]
void mf_daq_send_report(void)
void init_mf_daq(void)
struct MF_DAQ mf_daq
uint8_t nb
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98