17 #ifndef _ST_M1_DATATYPES_
18 #define _ST_M1_DATATYPES_
27 #define counter_base 3
30 #define magneto_base 17
31 #define temperat_base 23
32 #define quaternion_base 37
40 uint32_t euler_raw[3];
56 #define FRAME_TYPE_MASK OXC0
58 #define LF_MF_MASK OX10
59 #define FRAME_VERSION_MASK OX0C
71 #define iNEMO_Connect 0x00
72 #define iNEMO_Disconnect 0x01
73 #define iNEMO_Reset_Board 0x02
74 #define iNEMO_Enter_DFU_Mode 0x00
75 #define iNEMO_Trace 0x07
76 #define iNEMO_Led_Control 0x08
80 #define NORMAL_PRIORITY 0X00
81 #define MEDIUM_PRIORITY 0X01
82 #define HIGH_PRIORITY 0X02
106 for (
int i = 0; i < len; i++) {
checksum += buff[i]; }
126 printf(
"Accel - Ang rate [0xC2]\n");
127 printf(
"\t%f %f %f\n\t%f %f %f\n",
154 printf(
"Accel - Ang rate - Mag - Orient M [0xCC]\n");
155 printf(
"\t%f %f %f\n",
159 printf(
"\t%f %f %f\n",
163 printf(
"\t[%f %f %f\n\t%f %f %f\n\t%f %f %f]\n",
193 printf(
"Accel - Ang rate - Mag - Orient M [0xCC]\n");
194 printf(
"\t%f %f %f\n",
198 printf(
"\t%f %f %f\n",
202 printf(
"\t%f %f %f\n",
227 printf(
"Accel - Ang rate - Mag - Orient M [0xCC]\n");
228 printf(
"\t%f %f %f\n",
232 printf(
"\t%f %f %f\n",
236 printf(
"\t%f %f %f\n",
240 printf(
"\t[%f %f %f\n\t%f %f %f\n\t%f %f %f]\n",
266 printf(
"Euler ang [0xCE]\n");
267 printf(
"\t%f %f %f\n",
288 printf(
"Euler ang [0xCE]\n");
289 printf(
"\t%f %f %f\n",
293 printf(
"\t%f %f %f\n",
305 quat->timer = bswap_32(
quat->timer);
306 quat->checksum = bswap_16(
quat->checksum);
313 printf(
"Quaternion [0xDF]\n");
314 printf(
"\t%f %f %f %f\n",
void * print_CE(data_3DM_GX3_t &data)
void * print_CC(data_3DM_GX3_t &data)
unsigned short calc_checksum(uint8_t *buff, int len)
void * process_CC(data_3DM_GX3_t &data)
void * process_DF(data_3DM_GX3_t &data)
void * print_DF(data_3DM_GX3_t &data)
void * process_CF(data_3DM_GX3_t &data)
void * process_CB(data_3DM_GX3_t &data)
void * print_C8(data_3DM_GX3_t &data)
void * process_C8(data_3DM_GX3_t &data)
void * process_C2(data_3DM_GX3_t &data)
void * print_C2(data_3DM_GX3_t &data)
void * print_CF(data_3DM_GX3_t &data)
void * print_CB(data_3DM_GX3_t &data)
void * process_CE(data_3DM_GX3_t &data)