gyo

Committer:
gotto0
Date:
Tue Sep 12 00:00:50 2017 +0000
Revision:
8:f3e2b37e206f
Parent:
7:30e05998769b
Child:
9:8538fc8f6259
add solenoid

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gotto0 1:8810976be033 1 #ifndef INCLDUED_SBDBT_h_
gotto0 1:8810976be033 2 #define INCLDUED_SBDBT_h_
gotto0 0:afe58893bfe7 3 #include "mbed.h"
gotto0 0:afe58893bfe7 4
gotto0 7:30e05998769b 5 //data[1]
gotto0 8:f3e2b37e206f 6 #define SHIKAKU_ 0x01
gotto0 8:f3e2b37e206f 7 #define L1_ 0x02
gotto0 8:f3e2b37e206f 8 #define L2_ 0x04
gotto0 8:f3e2b37e206f 9 #define R1_ 0x08
gotto0 8:f3e2b37e206f 10 #define R2_ 0x16
gotto0 7:30e05998769b 11
gotto0 7:30e05998769b 12 //data[2]
gotto0 8:f3e2b37e206f 13 #define UE_ 0x01
gotto0 8:f3e2b37e206f 14 #define SITA_ 0x02
gotto0 8:f3e2b37e206f 15 #define MIGI_ 0x04
gotto0 8:f3e2b37e206f 16 #define HIDARI_ 0x08
gotto0 8:f3e2b37e206f 17 #define SANKAKU_ 0x10
gotto0 8:f3e2b37e206f 18 #define BATU_ 0x20
gotto0 8:f3e2b37e206f 19 #define MARU_ 0x40
gotto0 8:f3e2b37e206f 20 #define START_ 3
gotto0 8:f3e2b37e206f 21 #define SELECT_ 12
gotto0 6:da71294502ee 22
gotto0 0:afe58893bfe7 23 namespace raven
gotto0 6:da71294502ee 24 {
gotto0 0:afe58893bfe7 25 class SBDBT
gotto0 0:afe58893bfe7 26 {
gotto0 0:afe58893bfe7 27 private:
gotto0 0:afe58893bfe7 28 char i;
gotto0 1:8810976be033 29 char length;
gotto0 1:8810976be033 30 char value;
gotto0 1:8810976be033 31 char position;
gotto0 2:1472e7c5317d 32 char *tmp;
gotto0 2:1472e7c5317d 33 Serial *sr;
gotto0 0:afe58893bfe7 34
gotto0 0:afe58893bfe7 35 public:
gotto0 4:3f384ebf4509 36 char readable;
gotto0 1:8810976be033 37 char *data;
gotto0 6:da71294502ee 38 char *data_p;
gotto0 0:afe58893bfe7 39 SBDBT(PinName, PinName);
gotto0 1:8810976be033 40 SBDBT(PinName, PinName, int);
gotto0 1:8810976be033 41 void getf();
gotto0 6:da71294502ee 42 void print();
gotto0 5:a4a994824c96 43 char maru();
gotto0 5:a4a994824c96 44 char batu();
gotto0 5:a4a994824c96 45 char sikaku();
gotto0 5:a4a994824c96 46 char sankaku();
gotto0 5:a4a994824c96 47 char L1();
gotto0 5:a4a994824c96 48 char L2();
gotto0 5:a4a994824c96 49 char R1();
gotto0 5:a4a994824c96 50 char R2();
gotto0 5:a4a994824c96 51 char ue();
gotto0 5:a4a994824c96 52 char sita();
gotto0 5:a4a994824c96 53 char migi();
gotto0 5:a4a994824c96 54 char hidari();
gotto0 6:da71294502ee 55 signed char rs_x();
gotto0 6:da71294502ee 56 signed char rs_y();
gotto0 6:da71294502ee 57 signed char ls_x();
gotto0 6:da71294502ee 58 signed char ls_y();
gotto0 6:da71294502ee 59 char rs_x_check();
gotto0 6:da71294502ee 60 char rs_y_check();
gotto0 6:da71294502ee 61 char ls_x_check();
gotto0 6:da71294502ee 62 char ls_y_check();
gotto0 0:afe58893bfe7 63 ~SBDBT();
gotto0 0:afe58893bfe7 64 };
gotto0 0:afe58893bfe7 65
gotto0 0:afe58893bfe7 66 }//namespace
gotto0 0:afe58893bfe7 67 #endif