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.
Dependencies: mbed
main.cpp@9:7bc670023361, 2018-11-21 (annotated)
- Committer:
- pinofal
- Date:
- Wed Nov 21 17:31:54 2018 +0000
- Revision:
- 9:7bc670023361
- Parent:
- 8:baedd289a8cc
Test LED
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nucleosam | 0:36aa6787d4f9 | 1 | |
nucleosam | 0:36aa6787d4f9 | 2 | /* mbed specific header files. */ |
nucleosam | 0:36aa6787d4f9 | 3 | #include "mbed.h" |
nucleosam | 0:36aa6787d4f9 | 4 | |
pinofal | 9:7bc670023361 | 5 | DigitalOut LedWAD (PC_2); |
pinofal | 9:7bc670023361 | 6 | DigitalOut LedWAS (PC_3); |
pinofal | 9:7bc670023361 | 7 | DigitalOut LedWPD (PC_10); |
pinofal | 9:7bc670023361 | 8 | DigitalOut LedWPS (PA_0) ; |
pinofal | 9:7bc670023361 | 9 | DigitalOut LedYAD (PC_13); |
pinofal | 9:7bc670023361 | 10 | DigitalOut LedYAS (PC_14); |
pinofal | 9:7bc670023361 | 11 | DigitalOut LedRPD (PC_12); |
pinofal | 9:7bc670023361 | 12 | DigitalOut LedRPS (PA_1) ; |
pinofal | 9:7bc670023361 | 13 | DigitalIn myButton(USER_BUTTON); |
nucleosam | 0:36aa6787d4f9 | 14 | |
nucleosam | 0:36aa6787d4f9 | 15 | int main() |
nucleosam | 0:36aa6787d4f9 | 16 | { |
pinofal | 9:7bc670023361 | 17 | LedWAD=0; |
pinofal | 9:7bc670023361 | 18 | LedWAS=0; |
pinofal | 9:7bc670023361 | 19 | LedWPD=0; |
pinofal | 9:7bc670023361 | 20 | LedWPS=0; |
pinofal | 9:7bc670023361 | 21 | LedYAD=0; |
pinofal | 9:7bc670023361 | 22 | LedYAS=0; |
pinofal | 9:7bc670023361 | 23 | LedRPD=0; |
pinofal | 9:7bc670023361 | 24 | LedRPS=0; |
pinofal | 9:7bc670023361 | 25 | while(true) |
pinofal | 9:7bc670023361 | 26 | { |
pinofal | 9:7bc670023361 | 27 | if(myButton==1) |
pinofal | 9:7bc670023361 | 28 | { |
pinofal | 9:7bc670023361 | 29 | LedWAD = 1; |
pinofal | 9:7bc670023361 | 30 | } |
pinofal | 9:7bc670023361 | 31 | else |
pinofal | 9:7bc670023361 | 32 | { |
pinofal | 9:7bc670023361 | 33 | LedWAD = 0; |
pinofal | 9:7bc670023361 | 34 | } |
pinofal | 9:7bc670023361 | 35 | } |
nucleosam | 0:36aa6787d4f9 | 36 | |
nucleosam | 0:36aa6787d4f9 | 37 | |
nucleosam | 0:36aa6787d4f9 | 38 | } |
davide.aliprandi@st.com | 5:bc710d77d801 | 39 | |
nucleosam | 0:36aa6787d4f9 | 40 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |