skm project
Fork of MotionSensor by
MotionSensor.h
- Committer:
- JimCarver
- Date:
- 2014-04-23
- Revision:
- 1:821b100de6e1
- Parent:
- 0:dbc8909af0eb
- Child:
- 2:efad17aa7c8e
File content as of revision 1:821b100de6e1:
#ifndef MOTIONSENSOR_H #define MOTIONSENSOR_H #include <stdint.h> typedef struct MotionSensorDataCounts { int16_t x, y, z; } MotionSensorDataCounts; typedef struct MotionSensorDataUnits { float x, y, z; } MotionSensorDataUnits; class MotionSensor { public: virtual MotionSensor(); virtual void enable(void) = 0; virtual void disable(void) = 0; virtual uint32_t sampleRate(uint32_t frequency) = 0; virtual uint32_t whoAmI(void) = 0; virtual int32_t dataReady(void) = 0; virtual uint16_t getX(void) = 0; virtual uint16_t getY(void) = 0; virtual uint16_t getZ(void) = 0; virtual float getX(void) = 0; virtual float getY(void) = 0; virtual float getZ(void) = 0; virtual void getAxis(MotionSensorDataCounts * data) = 0; virtual void getAxis(MotionSensorDataUnits * data) = 0; }; #endif