summaryrefslogtreecommitdiff
path: root/bma150.h
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2011-07-03 15:34:29 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2011-07-03 15:35:28 +0200
commit0f390b743634ef4cdda03da8cb3f175524d59bd0 (patch)
tree829dd7907fdf11190cb8b153d76bab0a3e8d1c1a /bma150.h
parent1a8771c5d0e23fb91cb926614933405f39049d63 (diff)
Removed old stuff.
Diffstat (limited to 'bma150.h')
-rw-r--r--bma150.h24
1 files changed, 0 insertions, 24 deletions
diff --git a/bma150.h b/bma150.h
deleted file mode 100644
index 0cd6b27..0000000
--- a/bma150.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef BMA150_H
-#define BMA150_H
-
-#include "i2csensor.h"
-
-class BMA150 : public I2CSensor {
- public:
- int16_t x, y, z;
-
- void init() {
- i2c_address = 0x38;
- read(0x14, 1);
- write(0x14, (rxdata[0] & 0xe0) | 0x00 | 0x00); // 2g range, 25 Hz bandwidth
- }
-
- void update() {
- read(0x02, 6);
- x = ((rxdata[0] & 0xc0) | rxdata[1] << 8);
- y = ((rxdata[2] & 0xc0) | rxdata[3] << 8);
- z = ((rxdata[4] & 0xc0) | rxdata[5] << 8);
- }
-};
-
-#endif