dRonin
adbada4
dRonin firmware
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
pios_bmx055.h
Go to the documentation of this file.
1
13
/*
14
* This program is free software; you can redistribute it and/or modify
15
* it under the terms of the GNU General Public License as published by
16
* the Free Software Foundation; either version 3 of the License, or
17
* (at your option) any later version.
18
*
19
* This program is distributed in the hope that it will be useful, but
20
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22
* for more details.
23
*
24
* You should have received a copy of the GNU General Public License along
25
* with this program; if not, see <http://www.gnu.org/licenses/>
26
*/
27
28
#ifndef PIOS_BMX055_H
29
#define PIOS_BMX055_H
30
31
#include "
pios.h
"
32
33
enum
pios_bmx055_orientation
{
// clockwise rotation from board forward
34
PIOS_BMX_TOP_0DEG
= 0x00,
35
PIOS_BMX_TOP_90DEG
= 0x01,
36
PIOS_BMX_TOP_180DEG
= 0x02,
37
PIOS_BMX_TOP_270DEG
= 0x03,
38
PIOS_BMX_BOTTOM_0DEG
= 0x04,
39
PIOS_BMX_BOTTOM_90DEG
= 0x05,
40
PIOS_BMX_BOTTOM_180DEG
= 0x06,
41
PIOS_BMX_BOTTOM_270DEG
= 0x07,
42
};
43
44
struct
pios_bmx055_cfg
{
45
// const struct pios_exti_cfg *exti_cfg; /* Pointer to the EXTI configuration */
46
47
enum
pios_bmx055_orientation
orientation
;
48
bool
skip_startup_irq_check
;
49
};
50
51
typedef
struct
pios_bmx055_dev *
pios_bmx055_dev_t
;
52
57
int32_t
PIOS_BMX055_SPI_Init
(
pios_bmx055_dev_t
*dev,
pios_spi_t
spi_id,
58
uint32_t slave_gyro, uint32_t slave_accel,
59
const
struct
pios_bmx055_cfg
*
cfg
);
60
61
#if 0
62
66
bool
PIOS_BMX055_IRQHandler(
void
);
67
#endif
68
69
#endif
/* PIOS_BMX055_H */
70
pios.h
Main PiOS header to include all the compiled in PiOS options.
PIOS_BMX055_SPI_Init
int32_t PIOS_BMX055_SPI_Init(pios_bmx055_dev_t *dev, pios_spi_t spi_id, uint32_t slave_gyro, uint32_t slave_accel, const struct pios_bmx055_cfg *cfg)
Initialize the BMX-xxxx 6/9-axis sensor on SPI.
pios_spi_dev
Definition:
pios_spi_priv.h:38
PIOS_BMX_BOTTOM_0DEG
Definition:
pios_bmx055.h:38
pios_bmx055_cfg::orientation
enum pios_bmx055_orientation orientation
Definition:
pios_bmx055.h:47
cfg
static struct flyingpicmd_cfg_fa cfg
Definition:
main.c:49
PIOS_BMX_TOP_0DEG
Definition:
pios_bmx055.h:34
pios_bmx055_orientation
pios_bmx055_orientation
Definition:
pios_bmx055.h:33
PIOS_BMX_TOP_270DEG
Definition:
pios_bmx055.h:37
PIOS_BMX_BOTTOM_180DEG
Definition:
pios_bmx055.h:40
PIOS_BMX_TOP_180DEG
Definition:
pios_bmx055.h:36
pios_bmx055_cfg::skip_startup_irq_check
bool skip_startup_irq_check
Definition:
pios_bmx055.h:48
pios_bmx055_dev_t
struct pios_bmx055_dev * pios_bmx055_dev_t
Definition:
pios_bmx055.h:51
PIOS_BMX_BOTTOM_90DEG
Definition:
pios_bmx055.h:39
pios_bmx055_cfg
Definition:
pios_bmx055.h:44
PIOS_BMX_TOP_90DEG
Definition:
pios_bmx055.h:35
PIOS_BMX_BOTTOM_270DEG
Definition:
pios_bmx055.h:41
flight
PiOS
inc
pios_bmx055.h
Generated by
1.8.6