Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ms2100.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * Copyright (C) 2008-2009 Antoine Drouin <poinix@gmail.com>
5  *
6  * This file is part of paparazzi.
7  *
8  * paparazzi is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2, or (at your option)
11  * any later version.
12  *
13  * paparazzi is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with paparazzi; see the file COPYING. If not, write to
20  * the Free Software Foundation, 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
24 #ifndef MS2100_H
25 #define MS2100_H
26 
27 
28 #include "std.h"
29 #define MS2100_NB_AXIS 3
30 
31 extern void ms2100_init( void );
32 extern void ms2100_read( void );
33 extern void ms2100_reset( void);
34 
35 #define MS2100_IDLE 0
36 #define MS2100_BUSY 1
37 #define MS2100_SENDING_REQ 2
38 #define MS2100_WAITING_EOC 3
39 #define MS2100_GOT_EOC 4
40 #define MS2100_READING_RES 5
41 #define MS2100_DATA_AVAILABLE 6
42 
43 extern volatile uint8_t ms2100_status;
44 extern volatile int16_t ms2100_values[MS2100_NB_AXIS];
45 
46 /* underlying architecture */
47 #include "peripherals/ms2100_arch.h"
48 /* must be implemented by underlying architecture */
49 extern void ms2100_arch_init( void );
50 
51 #define MS2100_DIVISOR_128 2
52 #define MS2100_DIVISOR_256 3
53 #define MS2100_DIVISOR_512 4
54 #define MS2100_DIVISOR_1024 5
55 
56 #define MS2100_DIVISOR MS2100_DIVISOR_1024
57 
58 
59 #endif /* MS2100_H */
volatile int16_t ms2100_values[MS2100_NB_AXIS]
Definition: ms2100.c:27
void ms2100_read(void)
void ms2100_arch_init(void)
Definition: ms2100_arch.c:39
void ms2100_init(void)
Definition: ms2100.c:29
signed short int16_t
Definition: types.h:17
void ms2100_reset(void)
Definition: ms2100.c:39
unsigned char uint8_t
Definition: types.h:14
#define MS2100_NB_AXIS
Definition: ms2100.h:29
volatile uint8_t ms2100_status
Definition: ms2100.c:26