Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
l3gd20.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 Felix Ruess <felix.ruess@gmail.com>
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 
28 #ifndef L3GD20_H
29 #define L3GD20_H
30 
31 /* Include address and register definition */
33 
41 };
42 
43 struct L3gd20Config {
44  bool spi_3_wire;
45 
48 };
49 
50 static inline void l3gd20_set_default_config(struct L3gd20Config *c)
51 {
52  c->spi_3_wire = false;
53 
54  c->drbw = L3GD20_DRBW_760Hz_100BW;
55  c->full_scale = L3GD20_FS_2000dps2;
56 }
57 
58 #endif /* L3GD20_H */
L3G_CONF_DONE
@ L3G_CONF_DONE
Definition: l3gd20.h:40
c
VIC slots used for the LPC2148 define name e g gps UART1_VIC_SLOT e g modem SPI1_VIC_SLOT SPI1 in mcu_periph spi_arch c or spi_slave_hs_arch c(and some others not using the SPI peripheral yet..) I2C0_VIC_SLOT 8 mcu_periph/i2c_arch.c I2C1_VIC_SLOT 9 mcu_periph/i2c_arch.c USB_VIC_SLOT 10 usb
L3gd20Config::full_scale
enum L3gd20FullScale full_scale
gyro full scale
Definition: l3gd20.h:46
L3gd20ConfStatus
L3gd20ConfStatus
Definition: l3gd20.h:34
L3G_CONF_UNINIT
@ L3G_CONF_UNINIT
Definition: l3gd20.h:35
L3G_CONF_REG4
@ L3G_CONF_REG4
Definition: l3gd20.h:38
L3GD20_FS_2000dps2
@ L3GD20_FS_2000dps2
Definition: l3gd20_regs.h:83
L3gd20Config::drbw
enum L3gd20DRBW drbw
Data rate and bandwidth.
Definition: l3gd20.h:47
L3G_CONF_WHO_AM_I_OK
@ L3G_CONF_WHO_AM_I_OK
Definition: l3gd20.h:37
l3gd20_regs.h
L3gd20DRBW
L3gd20DRBW
Definition: l3gd20_regs.h:60
L3GD20_DRBW_760Hz_100BW
@ L3GD20_DRBW_760Hz_100BW
Definition: l3gd20_regs.h:76
l3gd20_set_default_config
static void l3gd20_set_default_config(struct L3gd20Config *c)
Definition: l3gd20.h:50
L3gd20Config::spi_3_wire
bool spi_3_wire
Set 3-wire SPI mode, if FALSE: 4-wire SPI mode.
Definition: l3gd20.h:44
L3G_CONF_ENABLE
@ L3G_CONF_ENABLE
Definition: l3gd20.h:39
L3G_CONF_WHO_AM_I
@ L3G_CONF_WHO_AM_I
Definition: l3gd20.h:36
L3gd20Config
Definition: l3gd20.h:43
L3gd20FullScale
L3gd20FullScale
Definition: l3gd20_regs.h:79