clock

Dependencies:   mbed

Committer:
donghuoyinzi
Date:
Sat May 12 03:03:14 2018 +0000
Revision:
1:013b9fdc4e78
Parent:
0:17e9016529cf
Child:
3:b8766d623f01
180512

Who changed what in which revision?

UserRevisionLine numberNew contents of line
donghuoyinzi 0:17e9016529cf 1 #include "mbed.h"
donghuoyinzi 0:17e9016529cf 2 #include "string"
donghuoyinzi 0:17e9016529cf 3
donghuoyinzi 0:17e9016529cf 4 #ifndef know_H
donghuoyinzi 0:17e9016529cf 5 #define know_H
donghuoyinzi 0:17e9016529cf 6
donghuoyinzi 0:17e9016529cf 7 #define UART1_TX PA_9 //MCU TX1
donghuoyinzi 0:17e9016529cf 8 #define UART1_RX PA_10 //MCU RX1
donghuoyinzi 0:17e9016529cf 9 #define UART2_TX PA_2 //MCU TX2
donghuoyinzi 0:17e9016529cf 10 #define UART2_RX PA_3 //MCU RX2
donghuoyinzi 0:17e9016529cf 11 #define UART3_TX PB_10 //BC95 RX
donghuoyinzi 0:17e9016529cf 12 #define UART3_RX PB_11 //BC95 TX
donghuoyinzi 0:17e9016529cf 13
donghuoyinzi 0:17e9016529cf 14 #define SECOND_T0 PB_13 //输出驱动马达-秒针
donghuoyinzi 0:17e9016529cf 15 #define SECOND_T1 PB_12 //输出驱动马达-秒针
donghuoyinzi 0:17e9016529cf 16 #define MINITUE_T0 PB_15 //输出驱动马达-分针
donghuoyinzi 0:17e9016529cf 17 #define MINITUE_T1 PB_14 //输出驱动马达-分针
donghuoyinzi 0:17e9016529cf 18
donghuoyinzi 0:17e9016529cf 19 #define JCVIN PA_4 //马达检测输入
donghuoyinzi 0:17e9016529cf 20 #define JCOUT_SE PA_5 //马达秒针检测输出
donghuoyinzi 0:17e9016529cf 21 #define JCOUT_MI PA_6 //马达分针检测输出
donghuoyinzi 0:17e9016529cf 22
donghuoyinzi 0:17e9016529cf 23 #define BATAD PA_7 //batteryAD 电量采集
donghuoyinzi 0:17e9016529cf 24 #define POW PA_8 //bc95 电源
donghuoyinzi 0:17e9016529cf 25 #define RESET PB_9 //BC95 复位
donghuoyinzi 0:17e9016529cf 26
donghuoyinzi 0:17e9016529cf 27 #define LED1 PB_0 //LED1
donghuoyinzi 0:17e9016529cf 28 #define LED2 PB_1 //LED2
donghuoyinzi 0:17e9016529cf 29
donghuoyinzi 0:17e9016529cf 30 class know
donghuoyinzi 0:17e9016529cf 31 {
donghuoyinzi 0:17e9016529cf 32 public:
donghuoyinzi 0:17e9016529cf 33 static string task[]; //任务编址
donghuoyinzi 0:17e9016529cf 34 static string taskdat[]; //
donghuoyinzi 0:17e9016529cf 35 //static string act[]; //act编址
donghuoyinzi 0:17e9016529cf 36 //static string assgsta[] //数据变量分配编址
donghuoyinzi 0:17e9016529cf 37
donghuoyinzi 1:013b9fdc4e78 38 static string polSta[100]; //状态池
donghuoyinzi 1:013b9fdc4e78 39
donghuoyinzi 1:013b9fdc4e78 40 static string polDat[20]; //数据池
donghuoyinzi 0:17e9016529cf 41
donghuoyinzi 0:17e9016529cf 42 static Serial uart1;
donghuoyinzi 0:17e9016529cf 43 static Serial uart2;
donghuoyinzi 0:17e9016529cf 44 static Serial uart3;
donghuoyinzi 0:17e9016529cf 45
donghuoyinzi 0:17e9016529cf 46 static DigitalOut MotS0;
donghuoyinzi 0:17e9016529cf 47 static DigitalOut MotS1;
donghuoyinzi 0:17e9016529cf 48 static DigitalOut MotM0;
donghuoyinzi 0:17e9016529cf 49 static DigitalOut MotM1;
donghuoyinzi 0:17e9016529cf 50
donghuoyinzi 0:17e9016529cf 51 static DigitalOut TestO_S;
donghuoyinzi 0:17e9016529cf 52 static DigitalOut TestO_M;
donghuoyinzi 0:17e9016529cf 53 static InterruptIn TestIn;
donghuoyinzi 0:17e9016529cf 54
donghuoyinzi 0:17e9016529cf 55 static AnalogIn batAD;
donghuoyinzi 0:17e9016529cf 56 static DigitalOut pow;
donghuoyinzi 0:17e9016529cf 57 static DigitalOut reset;
donghuoyinzi 0:17e9016529cf 58
donghuoyinzi 0:17e9016529cf 59 static DigitalOut led1;
donghuoyinzi 0:17e9016529cf 60 static DigitalOut led2;
donghuoyinzi 0:17e9016529cf 61
donghuoyinzi 0:17e9016529cf 62 static Ticker time1; //定时器1
donghuoyinzi 0:17e9016529cf 63 static Ticker time2; //定时器2
donghuoyinzi 0:17e9016529cf 64 static Ticker time3; //定时器3
donghuoyinzi 0:17e9016529cf 65 };
donghuoyinzi 0:17e9016529cf 66
donghuoyinzi 0:17e9016529cf 67 class knowAct
donghuoyinzi 0:17e9016529cf 68 {
donghuoyinzi 0:17e9016529cf 69 public:
donghuoyinzi 0:17e9016529cf 70 static void buildtsk(void); //
donghuoyinzi 0:17e9016529cf 71 };
donghuoyinzi 0:17e9016529cf 72
donghuoyinzi 0:17e9016529cf 73 #endif