clock

Dependencies:   mbed

myScope/mybc95.h

Committer:
donghuoyinzi
Date:
2018-05-22
Revision:
3:b8766d623f01
Parent:
2:e54d9d87c6cb

File content as of revision 3:b8766d623f01:

#include "mbed.h"
    
#include "myf401.h"
#include "myknow.h"

#ifndef mybc95_H
#define mybc95_H

    #define buf_bc95TxSize 1024
    #define buf_bc95RxSize 1024
    
    class bc95Act
    {
        public:
            static void init(void);                    // initialization of bc95
            static void start(void);                        // initialization of start
            static void data(void);                         // initialization of data
            static void ready(void);
            static void revok(void);
            static char *get_tim(void); 
            static void get_knw(void);
            static void put(void);
            static void setrtc(void);  

        private:
            static void jump_Judg(int Chekstep,int Nexnexstep);
            static void CheckOK(int Nexstp,int Lastp,int maxstp);            //check 'ok' 
            static void getISR(void);                                    //get interrupt buffer

            static void changdate(void);
            static uint32_t changsec(void);
            static uint8_t Is_Leap_Year(uint16_t year);

            static int stpSe;
            static int cnt;
            static int cntche;
            static int cntlink;
            
            static int year;
            static int mon;
            static int day;
            static int hour;
            static int min;
            static int sec;

            static char buf[50];                                                    // receive buffer
            static char buf_bc95Tx[buf_bc95TxSize];                                           // receive buffer
            static char buf_bc95Rx[buf_bc95RxSize];                                           // receive buffer
   };
   
#endif