The MGC3130 is the world’s first electrical-field (E-field) based three-dimensional (3D) tracking and gesture controller
Dependents: NucleoMGC3130 i2c_master
Diff: RuntimeParameter/Parameter.h
- Revision:
- 1:621c4e9238ef
diff -r 92f17b057d6b -r 621c4e9238ef RuntimeParameter/Parameter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/RuntimeParameter/Parameter.h Wed Oct 07 20:43:39 2015 +0000 @@ -0,0 +1,38 @@ +#ifndef UK_AC_HERTS_SMARTLAB_MGC3130_Parameter +#define UK_AC_HERTS_SMARTLAB_MGC3130_Parameter + +#include "mbed.h" + +class Parameter +{ +protected: + char value[12]; + +public: + static const int Length = 12; + + char * gets() { + return value; + } + + void setRuntimeParameterID(int id) { + value[0] = id; + value[1] = id >> 8; + } + + void setArgument0(long arg0) { + value[4] = arg0; + value[5] = arg0 >> 8; + value[6] = arg0 >> 16; + value[7] = arg0 >> 24; + } + + void setArgument1(long arg1) { + value[8] = arg1; + value[9] = arg1 >> 8; + value[10] = arg1 >> 16; + value[11] = arg1 >> 24; + } +}; + +#endif \ No newline at end of file