Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
baro_mpl3115.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2012 Gautier Hattenberger (ENAC)
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
30#include "peripherals/mpl3115.h"
31#include "modules/core/abi.h"
32
33//Messages
34#include "mcu_periph/uart.h"
35#include "pprzlink/messages.h"
37
38
39#ifndef BARO_MPL3115_I2C_DEV
40#define BARO_MPL3115_I2C_DEV i2c0
41#endif
42
43#ifndef BARO_MPL3115_I2C_SLAVE_ADDR
44#define BARO_MPL3115_I2C_SLAVE_ADDR MPL3115_I2C_ADDR
45#endif
46
47
49
54
55
60
61
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Main include for ABI (AirBorneInterface).
#define BARO_MPL3115_SENDER_ID
struct Mpl3115 baro_mpl
void baro_mpl3115_read_periodic(void)
#define BARO_MPL3115_I2C_DEV
void baro_mpl3115_init(void)
void baro_mpl3115_read_event(void)
#define BARO_MPL3115_I2C_SLAVE_ADDR
Module for the baro MPL3115A2 from Freescale (i2c)
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
uint16_t foo
Definition main_demo5.c:58
void mpl3115_periodic(struct Mpl3115 *mpl)
Definition mpl3115.c:153
void mpl3115_init(struct Mpl3115 *mpl, struct i2c_periph *i2c_p, uint8_t addr)
Definition mpl3115.c:31
void mpl3115_event(struct Mpl3115 *mpl)
Definition mpl3115.c:107
Driver for the baro MPL3115A2 from Freescale (i2c)
uint32_t pressure
pressure in 1/4 Pascal
Definition mpl3115.h:80
int16_t temperature
temperature in 1/16 degrees Celcius
Definition mpl3115.h:79
volatile bool data_available
data ready flag
Definition mpl3115.h:76
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.