Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
humid_dpicco.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2005-2012 The Paparazzi Team
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
32
33#include "mcu_periph/i2c.h"
34#include "led.h"
35#include "mcu_periph/uart.h"
36#include "pprzlink/messages.h"
38
39
40#ifndef DPICCO_I2C_DEV
41#define DPICCO_I2C_DEV i2c0
42#endif
43
44#define DPICCO_SLAVE_ADDR 0xF0
45
47
50
52
53
58
60{
61 /* init read */
63}
64
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
Definition i2c.h:122
enum I2CTransactionStatus status
Transaction status.
Definition i2c.h:126
bool i2c_receive(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint16_t len)
Submit a read only transaction.
Definition i2c.c:212
@ I2CTransSuccess
transaction successfully finished by I2C driver
Definition i2c.h:57
@ I2CTransDone
transaction set to done by user level
Definition i2c.h:59
I2C transaction structure.
Definition i2c.h:93
void dpicco_event(void)
float dpicco_temp
#define DPICCO_I2C_DEV
#define DPICCO_SLAVE_ADDR
struct i2c_transaction dpicco_trans
uint16_t dpicco_val[2]
void dpicco_init(void)
float dpicco_humid
void dpicco_periodic(void)
DigiPicco I2C sensor interface.
#define DPICCO_TEMP_MAX
#define DPICCO_TEMP_RANGE
#define DPICCO_TEMP_OFFS
#define DPICCO_HUMID_MAX
#define DPICCO_HUMID_RANGE
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
arch independent LED (Light Emitting Diodes) API
uint16_t foo
Definition main_demo5.c:58
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.