diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-07-03 15:34:29 +0200 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-07-03 15:35:28 +0200 |
commit | 0f390b743634ef4cdda03da8cb3f175524d59bd0 (patch) | |
tree | 829dd7907fdf11190cb8b153d76bab0a3e8d1c1a /ak8975.h | |
parent | 1a8771c5d0e23fb91cb926614933405f39049d63 (diff) |
Removed old stuff.
Diffstat (limited to 'ak8975.h')
-rw-r--r-- | ak8975.h | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/ak8975.h b/ak8975.h deleted file mode 100644 index beb9940..0000000 --- a/ak8975.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef AK8975_H -#define AK8975_H - -#include "i2csensor.h" - -class AK8975 : public I2CSensor { - public: - int16_t x, y, z; - - void init() { - i2c_address = 0x0c; - write(0x0a, 0x01); // Start first measurement. - } - - void update() { - read(0x03, 6); - x = (rxdata[0] | rxdata[1] << 8); - y = (rxdata[2] | rxdata[3] << 8); - z = (rxdata[4] | rxdata[5] << 8); - write(0x0a, 0x01); // Start a new measurement. - } -}; - -#endif |