comparison bma180_internal.h @ 111:cdb26addf4f2 tilt

Add bma180 code, untested
author Matt Johnston <matt@ucc.asn.au>
date Wed, 19 Sep 2012 22:40:49 +0800
parents
children 5234ccc416e8
comparison
equal deleted inserted replaced
106:5c8404549cc0 111:cdb26addf4f2
1 /*
2 * Copied from Sparkfun example code:
3 *
4 * bma180.h
5 * Created on: Mar 19, 2010
6 */
7
8 #ifndef BMA180_INTERNAL_H_
9 #define BMA180_INTERNAL_H_
10
11 //Address defines for BMA180//
12 //====================//
13 //ID and Version Registers
14 #define ID 0x00
15 #define Version 0x01
16 #define ACCXLSB 0x02
17 #define ACCXMSB 0x03
18 #define ACCYLSB 0x04
19 #define ACCYMSB 0x05
20 #define ACCZLSB 0x06
21 #define ACCZMSB 0x07
22 #define TEMPERATURE 0x08
23 #define STATREG1 0x09
24 #define STATREG2 0x0A
25 #define STATREG3 0x0B
26 #define STATREG4 0x0C
27 #define CTRLREG0 0x0D
28 #define CTRLREG1 0x0E
29 #define CTRLREG2 0x0F
30
31 #define BWTCS 0x20
32 #define CTRLREG3 0x21
33
34 #define HILOWNFO 0x25
35 #define LOWDUR 0x26
36
37 #define LOWTH 0x29
38
39 #define tco_y 0x2F
40 #define tco_z 0x30
41
42 #define OLSB1 0x35
43
44 //====================//
45 //Range setting
46 #define RANGESHIFT 1
47 #define RANGEMASK 0x0E
48 #define BWMASK 0xF0
49 #define BWSHIFT 4
50
51 #endif /* BMA180_INTERNAL_H_ */