clock

Dependencies:   mbed

Committer:
donghuoyinzi
Date:
Tue May 22 09:10:05 2018 +0000
Revision:
3:b8766d623f01
Parent:
2:e54d9d87c6cb
0522

Who changed what in which revision?

UserRevisionLine numberNew contents of line
donghuoyinzi 0:17e9016529cf 1 #include "mbed.h"
donghuoyinzi 0:17e9016529cf 2
donghuoyinzi 0:17e9016529cf 3 #include "myf401.h"
donghuoyinzi 0:17e9016529cf 4 #include "myknow.h"
donghuoyinzi 0:17e9016529cf 5
donghuoyinzi 0:17e9016529cf 6 #ifndef mybc95_H
donghuoyinzi 0:17e9016529cf 7 #define mybc95_H
donghuoyinzi 0:17e9016529cf 8
donghuoyinzi 1:013b9fdc4e78 9 #define buf_bc95TxSize 1024
donghuoyinzi 1:013b9fdc4e78 10 #define buf_bc95RxSize 1024
donghuoyinzi 1:013b9fdc4e78 11
donghuoyinzi 0:17e9016529cf 12 class bc95Act
donghuoyinzi 0:17e9016529cf 13 {
donghuoyinzi 0:17e9016529cf 14 public:
donghuoyinzi 0:17e9016529cf 15 static void init(void); // initialization of bc95
donghuoyinzi 0:17e9016529cf 16 static void start(void); // initialization of start
donghuoyinzi 0:17e9016529cf 17 static void data(void); // initialization of data
donghuoyinzi 0:17e9016529cf 18 static void ready(void);
donghuoyinzi 0:17e9016529cf 19 static void revok(void);
donghuoyinzi 2:e54d9d87c6cb 20 static char *get_tim(void);
donghuoyinzi 0:17e9016529cf 21 static void get_knw(void);
donghuoyinzi 2:e54d9d87c6cb 22 static void put(void);
donghuoyinzi 2:e54d9d87c6cb 23 static void setrtc(void);
donghuoyinzi 0:17e9016529cf 24
donghuoyinzi 0:17e9016529cf 25 private:
donghuoyinzi 0:17e9016529cf 26 static void jump_Judg(int Chekstep,int Nexnexstep);
donghuoyinzi 0:17e9016529cf 27 static void CheckOK(int Nexstp,int Lastp,int maxstp); //check 'ok'
donghuoyinzi 0:17e9016529cf 28 static void getISR(void); //get interrupt buffer
donghuoyinzi 0:17e9016529cf 29
donghuoyinzi 0:17e9016529cf 30 static void changdate(void);
donghuoyinzi 0:17e9016529cf 31 static uint32_t changsec(void);
donghuoyinzi 0:17e9016529cf 32 static uint8_t Is_Leap_Year(uint16_t year);
donghuoyinzi 0:17e9016529cf 33
donghuoyinzi 0:17e9016529cf 34 static int stpSe;
donghuoyinzi 0:17e9016529cf 35 static int cnt;
donghuoyinzi 0:17e9016529cf 36 static int cntche;
donghuoyinzi 0:17e9016529cf 37 static int cntlink;
donghuoyinzi 0:17e9016529cf 38
donghuoyinzi 0:17e9016529cf 39 static int year;
donghuoyinzi 0:17e9016529cf 40 static int mon;
donghuoyinzi 0:17e9016529cf 41 static int day;
donghuoyinzi 0:17e9016529cf 42 static int hour;
donghuoyinzi 0:17e9016529cf 43 static int min;
donghuoyinzi 0:17e9016529cf 44 static int sec;
donghuoyinzi 0:17e9016529cf 45
donghuoyinzi 1:013b9fdc4e78 46 static char buf[50]; // receive buffer
donghuoyinzi 1:013b9fdc4e78 47 static char buf_bc95Tx[buf_bc95TxSize]; // receive buffer
donghuoyinzi 1:013b9fdc4e78 48 static char buf_bc95Rx[buf_bc95RxSize]; // receive buffer
donghuoyinzi 0:17e9016529cf 49 };
donghuoyinzi 0:17e9016529cf 50
donghuoyinzi 0:17e9016529cf 51 #endif