Thomas Hamilton
/
3DM-GX2
interface class for an inertial measurement unit that uses a serial protocol.
Diff: 3DM-GX2.h
- Revision:
- 1:555c2c2bf9d3
- Parent:
- 0:fd1fce2347d9
--- a/3DM-GX2.h Tue Aug 31 04:38:14 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -#ifndef MS3DMGX2Library -#define MS3DMGX2Library - -#include "stdint.h" -#include "mbed.h" - -class MS3DMGX2 -{ - private: - Serial DataLines; - - unsigned char ModeCommand; - unsigned char ModeLength; - unsigned char ModeSync; - unsigned char Workspace[72]; - float* InterruptBuffer; - - void Interrupt(); - void CheckSum(unsigned char Header, unsigned char Length, - unsigned char* Data, unsigned char* Timer, unsigned char* Result); - - public: - MS3DMGX2(PinName tx, PinName rx); - unsigned char Mode(unsigned char Selection); - void AttachInterruptBuffer(float* Buffer); - void RequestSyncRead(); - void DiscardSerialBuffer(); - unsigned char Read(float* Data); -}; - -#endif \ No newline at end of file