Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of MotionSensor by
MotionSensor.h
00001 00002 #ifndef MOTIONSENSOR_H 00003 #define MOTIONSENSOR_H 00004 00005 #include <stdint.h> 00006 00007 typedef struct MotionSensorDataCounts 00008 { 00009 int16_t x, y, z; 00010 } MotionSensorDataCounts; 00011 00012 typedef struct MotionSensorDataUnits 00013 { 00014 float x, y, z; 00015 } MotionSensorDataUnits; 00016 00017 class MotionSensor 00018 { 00019 public: 00020 //virtual MotionSensor(); 00021 virtual void enable(void) = 0; 00022 virtual void disable(void) = 0; 00023 virtual uint32_t sampleRate(uint32_t frequency) = 0; 00024 virtual uint32_t whoAmI(void) = 0; 00025 virtual uint32_t dataReady(void) = 0; 00026 virtual void getX(int16_t * x) = 0; 00027 virtual void getY(int16_t * y) = 0; 00028 virtual void getZ(int16_t * z) = 0; 00029 virtual void getX(float * x) = 0; 00030 virtual void getY(float * y) = 0; 00031 virtual void getZ(float * z) = 0; 00032 virtual void getAxis(MotionSensorDataCounts * data) = 0; 00033 virtual void getAxis(MotionSensorDataUnits * data) = 0; 00034 }; 00035 00036 #endif
Generated on Fri Jul 15 2022 02:04:13 by
1.7.2
