clock

Dependencies:   mbed

Revision:
0:17e9016529cf
Child:
1:013b9fdc4e78
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/myKnow/myknow.h	Tue May 08 02:13:50 2018 +0000
@@ -0,0 +1,72 @@
+#include "mbed.h" 
+#include "string"
+    
+#ifndef know_H
+#define know_H
+
+    #define  UART1_TX   PA_9                                    //MCU TX1
+    #define  UART1_RX   PA_10                                   //MCU RX1
+    #define  UART2_TX   PA_2                                    //MCU TX2
+    #define  UART2_RX   PA_3                                    //MCU RX2
+    #define  UART3_TX   PB_10                                   //BC95 RX
+    #define  UART3_RX   PB_11                                   //BC95 TX
+    
+    #define  SECOND_T0  PB_13                                   //输出驱动马达-秒针
+    #define  SECOND_T1  PB_12                                   //输出驱动马达-秒针
+    #define  MINITUE_T0 PB_15                                   //输出驱动马达-分针
+    #define  MINITUE_T1 PB_14                                   //输出驱动马达-分针
+    
+    #define  JCVIN      PA_4                                    //马达检测输入
+    #define  JCOUT_SE   PA_5                                    //马达秒针检测输出
+    #define  JCOUT_MI   PA_6                                    //马达分针检测输出
+
+    #define  BATAD      PA_7                                    //batteryAD 电量采集
+    #define  POW        PA_8                                    //bc95 电源
+    #define  RESET      PB_9                                    //BC95 复位
+    
+    #define  LED1       PB_0                                    //LED1
+    #define  LED2       PB_1                                    //LED2
+    
+    class know
+    {
+        public:
+            static string task[];                       //任务编址
+            static string taskdat[];                    //
+            //static string act[];                      //act编址
+            //static string assgsta[]                   //数据变量分配编址
+
+            static string polSta[];                     //状态池
+            static string polDat[];                     //数据池
+          
+            static Serial uart1;
+            static Serial uart2;
+            static Serial uart3;
+           
+            static DigitalOut MotS0;                      
+            static DigitalOut MotS1; 
+            static DigitalOut MotM0;
+            static DigitalOut MotM1;
+            
+            static DigitalOut TestO_S; 
+            static DigitalOut TestO_M; 
+            static InterruptIn TestIn;                     
+            
+            static AnalogIn batAD;
+            static DigitalOut pow;                           
+            static DigitalOut reset;
+
+            static DigitalOut led1; 
+            static DigitalOut led2; 
+
+            static Ticker time1;                        //定时器1 
+            static Ticker time2;                        //定时器2
+            static Ticker time3;                        //定时器3
+    };
+
+    class knowAct
+    {
+        public:
+            static void buildtsk(void);                 //
+    };
+
+#endif