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_bmm150.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_BMM150_H
29
#define PIOS_BMM150_H
30
31
#include "
pios.h
"
32
33
enum
pios_bmm150_orientation
{
// clockwise rotation from board forward
34
PIOS_BMM_TOP_0DEG
= 0x00,
35
PIOS_BMM_TOP_90DEG
= 0x01,
36
PIOS_BMM_TOP_180DEG
= 0x02,
37
PIOS_BMM_TOP_270DEG
= 0x03,
38
PIOS_BMM_BOTTOM_0DEG
= 0x04,
39
PIOS_BMM_BOTTOM_90DEG
= 0x05,
40
PIOS_BMM_BOTTOM_180DEG
= 0x06,
41
PIOS_BMM_BOTTOM_270DEG
= 0x07,
42
};
43
44
struct
pios_bmm150_cfg
{
45
enum
pios_bmm150_orientation
orientation
;
46
};
47
48
typedef
struct
pios_bmm150_dev *
pios_bmm150_dev_t
;
49
54
int32_t
PIOS_BMM150_SPI_Init
(
pios_bmm150_dev_t
*dev,
pios_spi_t
spi_id,
55
uint32_t slave_mag,
const
struct
pios_bmm150_cfg
*
cfg
);
56
57
#endif
/* PIOS_BMM150_H */
58
pios.h
Main PiOS header to include all the compiled in PiOS options.
pios_spi_dev
Definition:
pios_spi_priv.h:38
PIOS_BMM_BOTTOM_90DEG
Definition:
pios_bmm150.h:39
PIOS_BMM150_SPI_Init
int32_t PIOS_BMM150_SPI_Init(pios_bmm150_dev_t *dev, pios_spi_t spi_id, uint32_t slave_mag, const struct pios_bmm150_cfg *cfg)
Initialize the BMM-xxxx 6/9-axis sensor on SPI.
PIOS_BMM_TOP_270DEG
Definition:
pios_bmm150.h:37
PIOS_BMM_TOP_180DEG
Definition:
pios_bmm150.h:36
PIOS_BMM_TOP_90DEG
Definition:
pios_bmm150.h:35
cfg
static struct flyingpicmd_cfg_fa cfg
Definition:
main.c:49
PIOS_BMM_BOTTOM_180DEG
Definition:
pios_bmm150.h:40
PIOS_BMM_BOTTOM_0DEG
Definition:
pios_bmm150.h:38
PIOS_BMM_BOTTOM_270DEG
Definition:
pios_bmm150.h:41
pios_bmm150_orientation
pios_bmm150_orientation
Definition:
pios_bmm150.h:33
pios_bmm150_dev_t
struct pios_bmm150_dev * pios_bmm150_dev_t
Definition:
pios_bmm150.h:48
PIOS_BMM_TOP_0DEG
Definition:
pios_bmm150.h:34
pios_bmm150_cfg
Definition:
pios_bmm150.h:44
pios_bmm150_cfg::orientation
enum pios_bmm150_orientation orientation
Definition:
pios_bmm150.h:45
flight
PiOS
inc
pios_bmm150.h
Generated by
1.8.6