AvrIO  1.4.5
Bibliothèque C modulaire pour ATMEL AVR
l3g.h
1 
22 #ifndef _AVRIO_L3G_H_
23 #define _AVRIO_L3G_H_
24 
25 #include <avrio/defs.h>
26 
27 __BEGIN_C_DECLS
28 /* ========================================================================== */
29 
30 #if ! defined(__DOXYGEN__)
31 
32 /* constants ================================================================ */
33 #define L3G_WHO_AM_I 0x0F
34 
35 #define L3G_CTRL_REG1 0x20
36 #define L3G_CTRL_REG2 0x21
37 #define L3G_CTRL_REG3 0x22
38 #define L3G_CTRL_REG4 0x23
39 #define L3G_CTRL_REG5 0x24
40 
41 #define L3G_REFERENCE 0x25
42 #define L3G_OUT_TEMP 0x26
43 
44 #define L3G_STATUS_REG 0x27
45 #define L3G_ZYXOR 7
46 #define L3G_ZOR 6
47 #define L3G_YOR 5
48 #define L3G_XOR 4
49 #define L3G_ZYXDA 3
50 #define L3G_ZDA 2
51 #define L3G_YDA 1
52 #define L3G_XDA 0
53 
54 #define L3G_OUT_X_L 0x28
55 #define L3G_OUT_X_H 0x29
56 #define L3G_OUT_Y_L 0x2A
57 #define L3G_OUT_Y_H 0x2B
58 #define L3G_OUT_Z_L 0x2C
59 #define L3G_OUT_Z_H 0x2D
60 #define L3G_AUTOINC 7
61 
62 #define L3G_FIFO_CTRL_REG 0x2E
63 #define L3G_FIFO_SRC_REG 0x2F
64 
65 #define L3G_INT1_CFG 0x30
66 #define L3G_AOI 7
67 #define L3G_LIR 6
68 #define L3G_ZHIE 5
69 #define L3G_ZLIE 4
70 #define L3G_YHIE 3
71 #define L3G_YLIE 2
72 #define L3G_XHIE 1
73 #define L3G_XLIE 0
74 
75 #define L3G_INT1_SRC 0x31
76 #define L3G_IA 6
77 #define L3G_ZH 5
78 #define L3G_ZL 4
79 #define L3G_YH 3
80 #define L3G_YL 2
81 #define L3G_XH 1
82 #define L3G_XL 0
83 
84 #define L3G_INT1_THS_XH 0x32
85 #define L3G_INT1_THS_XL 0x33
86 #define L3G_INT1_THS_YH 0x34
87 #define L3G_INT1_THS_YL 0x35
88 #define L3G_INT1_THS_ZH 0x36
89 #define L3G_INT1_THS_ZL 0x37
90 
91 #define L3G_INT1_DURATION 0x38
92 
93 #endif /* __DOXYGEN__ not defined */
94 
95 __END_C_DECLS
96 /* ========================================================================== */
97 #endif /* _AVRIO_L3G_H_ not defined */
98