![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
pissa pepper
Fork of Nucleo by
myf401.h@0:a9ea0137c16b, 2018-04-20 (annotated)
- Committer:
- donghuoyinzi
- Date:
- Fri Apr 20 02:49:37 2018 +0000
- Revision:
- 0:a9ea0137c16b
pissa pepper
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
donghuoyinzi | 0:a9ea0137c16b | 1 | #ifndef myf401_H |
donghuoyinzi | 0:a9ea0137c16b | 2 | #define myf401_H |
donghuoyinzi | 0:a9ea0137c16b | 3 | #include "string" |
donghuoyinzi | 0:a9ea0137c16b | 4 | /****引脚重定义*****/ |
donghuoyinzi | 0:a9ea0137c16b | 5 | |
donghuoyinzi | 0:a9ea0137c16b | 6 | #define LED2 PC_8 //user LED test pin LED2 |
donghuoyinzi | 0:a9ea0137c16b | 7 | #define LED3 PC_9 //user LED test pin LED3 |
donghuoyinzi | 0:a9ea0137c16b | 8 | #define RESET PC_13 //BC95 reset pin(CPU) |
donghuoyinzi | 0:a9ea0137c16b | 9 | #define DEBUG_TX PA_9 //PC debug |
donghuoyinzi | 0:a9ea0137c16b | 10 | #define DEBUG_RX PA_10 //PC debug |
donghuoyinzi | 0:a9ea0137c16b | 11 | #define BC95_TX PA_2 //BC95 TX(CPU) |
donghuoyinzi | 0:a9ea0137c16b | 12 | #define BC95_RX PA_3 //BC95 RX(CPU) |
donghuoyinzi | 0:a9ea0137c16b | 13 | |
donghuoyinzi | 0:a9ea0137c16b | 14 | class F401script |
donghuoyinzi | 0:a9ea0137c16b | 15 | { |
donghuoyinzi | 0:a9ea0137c16b | 16 | public: |
donghuoyinzi | 0:a9ea0137c16b | 17 | static int poL; |
donghuoyinzi | 0:a9ea0137c16b | 18 | static int poC_initF; static int poC_initS; |
donghuoyinzi | 0:a9ea0137c16b | 19 | static int poC_revokF; static int poC_revokS; static int poC_rdyF; static int poC_rdyS; |
donghuoyinzi | 0:a9ea0137c16b | 20 | static int poC_getF; static int poC_getS; static int poC_putF; static int poC_putS; |
donghuoyinzi | 0:a9ea0137c16b | 21 | static int poC_putcallF; static int poC_putcallS; |
donghuoyinzi | 0:a9ea0137c16b | 22 | static int poC_ticisrF; static int poC_ticisrS; static int poC_ticisr1F; static int poC_ticisr1S; |
donghuoyinzi | 0:a9ea0137c16b | 23 | static int poC_isrF; static int poC_isrS; |
donghuoyinzi | 0:a9ea0137c16b | 24 | static int poC_step; |
donghuoyinzi | 0:a9ea0137c16b | 25 | }; |
donghuoyinzi | 0:a9ea0137c16b | 26 | extern F401script f401scpt; |
donghuoyinzi | 0:a9ea0137c16b | 27 | |
donghuoyinzi | 0:a9ea0137c16b | 28 | class f401Act |
donghuoyinzi | 0:a9ea0137c16b | 29 | { |
donghuoyinzi | 0:a9ea0137c16b | 30 | public: |
donghuoyinzi | 0:a9ea0137c16b | 31 | /*******public method***********/ |
donghuoyinzi | 0:a9ea0137c16b | 32 | static void init(void); //f401 cpu initialization; |
donghuoyinzi | 0:a9ea0137c16b | 33 | static void ready(void); |
donghuoyinzi | 0:a9ea0137c16b | 34 | static void get(void); |
donghuoyinzi | 0:a9ea0137c16b | 35 | static void put(void); |
donghuoyinzi | 0:a9ea0137c16b | 36 | static void put_call(void); |
donghuoyinzi | 0:a9ea0137c16b | 37 | //static void reiwdg(void); |
donghuoyinzi | 0:a9ea0137c16b | 38 | |
donghuoyinzi | 0:a9ea0137c16b | 39 | static Serial uart; |
donghuoyinzi | 0:a9ea0137c16b | 40 | |
donghuoyinzi | 0:a9ea0137c16b | 41 | static DigitalOut led2; |
donghuoyinzi | 0:a9ea0137c16b | 42 | static DigitalOut led3; |
donghuoyinzi | 0:a9ea0137c16b | 43 | |
donghuoyinzi | 0:a9ea0137c16b | 44 | static Ticker time1; //定时器1 |
donghuoyinzi | 0:a9ea0137c16b | 45 | static Ticker timerone; //定时器1 |
donghuoyinzi | 0:a9ea0137c16b | 46 | /*******public middle variable***********/ |
donghuoyinzi | 0:a9ea0137c16b | 47 | static int datacnt; //接受数据计数 |
donghuoyinzi | 0:a9ea0137c16b | 48 | private: |
donghuoyinzi | 0:a9ea0137c16b | 49 | /******* private method***********/ |
donghuoyinzi | 0:a9ea0137c16b | 50 | //static IWDG_HandleTypeDef hiwdg; //?????????? |
donghuoyinzi | 0:a9ea0137c16b | 51 | //static AnalogIn powAD; |
donghuoyinzi | 0:a9ea0137c16b | 52 | static Timer outtime; // |
donghuoyinzi | 0:a9ea0137c16b | 53 | static void isr_tick(void); |
donghuoyinzi | 0:a9ea0137c16b | 54 | static void isr_tick1(void); |
donghuoyinzi | 0:a9ea0137c16b | 55 | static void isr_pc(void); //get interrupt buffer |
donghuoyinzi | 0:a9ea0137c16b | 56 | /******* private middle variable***********/ |
donghuoyinzi | 0:a9ea0137c16b | 57 | static int f401cnt; |
donghuoyinzi | 0:a9ea0137c16b | 58 | static char buf[512]; |
donghuoyinzi | 0:a9ea0137c16b | 59 | }; |
donghuoyinzi | 0:a9ea0137c16b | 60 | |
donghuoyinzi | 0:a9ea0137c16b | 61 | #endif |