Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main_init.h@0:be95bfb06686, 2022-01-17 (annotated)
- Committer:
- wuliqunyy
- Date:
- Mon Jan 17 13:20:09 2022 +0000
- Revision:
- 0:be95bfb06686
a working non_flat + adc_didt for ehp regulation version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wuliqunyy | 0:be95bfb06686 | 1 | #ifndef MAIN_INIT_H |
wuliqunyy | 0:be95bfb06686 | 2 | #define MAIN_INIT_H |
wuliqunyy | 0:be95bfb06686 | 3 | |
wuliqunyy | 0:be95bfb06686 | 4 | #include "mbed.h" |
wuliqunyy | 0:be95bfb06686 | 5 | |
wuliqunyy | 0:be95bfb06686 | 6 | /*Digital outputs*/ |
wuliqunyy | 0:be95bfb06686 | 7 | extern DigitalOut led1; |
wuliqunyy | 0:be95bfb06686 | 8 | extern DigitalOut led2; |
wuliqunyy | 0:be95bfb06686 | 9 | extern DigitalOut led3; |
wuliqunyy | 0:be95bfb06686 | 10 | extern DigitalOut led4; |
wuliqunyy | 0:be95bfb06686 | 11 | extern DigitalOut fpga_rstb; //p27 of MBED is connectted to p22 of the FPGA CMOD for 90415FPGA_EVB2 |
wuliqunyy | 0:be95bfb06686 | 12 | //extern DigitalIn TimerIn; |
wuliqunyy | 0:be95bfb06686 | 13 | |
wuliqunyy | 0:be95bfb06686 | 14 | inline void reset_fpga(){ |
wuliqunyy | 0:be95bfb06686 | 15 | fpga_rstb = 0; |
wuliqunyy | 0:be95bfb06686 | 16 | } |
wuliqunyy | 0:be95bfb06686 | 17 | |
wuliqunyy | 0:be95bfb06686 | 18 | inline void enable_fpga(){ |
wuliqunyy | 0:be95bfb06686 | 19 | fpga_rstb = 1; |
wuliqunyy | 0:be95bfb06686 | 20 | } |
wuliqunyy | 0:be95bfb06686 | 21 | |
wuliqunyy | 0:be95bfb06686 | 22 | inline void main_init(){ |
wuliqunyy | 0:be95bfb06686 | 23 | led1 = 0; |
wuliqunyy | 0:be95bfb06686 | 24 | led2 = 0; |
wuliqunyy | 0:be95bfb06686 | 25 | led3 = 0; |
wuliqunyy | 0:be95bfb06686 | 26 | led4 = 0; |
wuliqunyy | 0:be95bfb06686 | 27 | reset_fpga(); |
wuliqunyy | 0:be95bfb06686 | 28 | } |
wuliqunyy | 0:be95bfb06686 | 29 | |
wuliqunyy | 0:be95bfb06686 | 30 | #endif |