J&W / Mbed 2 deprecated Rejestrator

Dependencies:   mbed Rejestrator

Dependents:   Rejestrator

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers H_IO.h Source File

H_IO.h

00001 #include "Rejestrator.h"
00002 #include "tsi_sensor.h"
00003 #include "SLCD.h"
00004 #include "convert.h"
00005 
00006 #ifndef _H_IO_H
00007 #define _H_IO_H
00008 
00009 #if defined (TARGET_KL25Z) || defined (TARGET_KL46Z)
00010   #define ELEC0 9
00011   #define ELEC1 10
00012 #elif defined (TARGET_KL05Z)
00013   #define ELEC0 9
00014   #define ELEC1 8
00015 #else
00016   #error TARGET NOT DEFINED
00017 #endif
00018 
00019 extern Serial pc;
00020 
00021 extern DigitalIn Switch1;
00022 extern DigitalIn Switch2;
00023 extern Convert slcd;
00024 extern TSIAnalogSlider tsi;
00025 extern PwmOut led_green;
00026 extern PwmOut led_red;
00027 
00028 extern int record_counter;
00029 extern int filenumber;
00030 extern osStatus ErrorValue;
00031 
00032 bool Switch_1_Pressed(void);
00033 bool Switch_2_Pressed(void);
00034 bool StopPressed(void);
00035 
00036 void ThreadIO(const void *param);
00037 
00038 class led_live
00039 {
00040  public:
00041     led_live(const float increment_=0.1, const float minimum_=0., const float maximum_=1.);
00042     ~led_live();
00043     void live(PwmOut led);
00044     void speed(const float increment);
00045  private:
00046     float increment;
00047     const float minimum;
00048     const float maximum;
00049     float value;
00050 };
00051 
00052 #endif