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