J&W / Mbed 2 deprecated Rejestrator

Dependencies:   mbed Rejestrator

Dependents:   Rejestrator

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Rejestrator.h Source File

Rejestrator.h

00001 #include <mbed.h>
00002 #include <MemoryPool.h>
00003 #include <RtosTimer.h>
00004 #include <Thread.h>
00005 #include <Queue.h>
00006 #include "WaitForSwitch.h"
00007 
00008 #ifndef _REJESTRATOR_H
00009 #define _REJESTRATOR_H
00010 
00011 #if defined (TARGET_KL25Z) || defined (TARGET_KL46Z)
00012   #define SWITCH1 PTC3
00013   #define SWITCH2 PTC12
00014 #else
00015   #error TARGET NOT DEFINED
00016 #endif
00017 
00018 enum operating_mode_type
00019 {
00020     Starting=0,
00021     USB_Connecting,
00022     File_opening,
00023     Collecting,
00024     Waiting,
00025     Error,
00026     Exiting
00027 };
00028 
00029 struct row_type 
00030 { 
00031     long int time;
00032     int mag_x, mag_y, mag_z;
00033     int16_t acc_x, acc_y, acc_z;
00034     int16_t giro_x, giro_y, giro_z;
00035     float light;
00036     float Ain0;
00037     float tsi;
00038     int8_t temperature;
00039     bool was_overflow;
00040 } ;
00041 
00042 extern enum operating_mode_type operating_mode;
00043 
00044 extern float global_tsi;
00045 extern long int global_time;
00046 
00047 #endif