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.cpp@0:51cacd8fe300, 2022-02-23 (annotated)
- Committer:
- itbusch
- Date:
- Wed Feb 23 19:09:05 2022 +0000
- Revision:
- 0:51cacd8fe300
xxx_LED_SOS_UP_Taste_IR
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
itbusch | 0:51cacd8fe300 | 1 | /* mbed BuschA, */ |
itbusch | 0:51cacd8fe300 | 2 | #include "mbed.h" |
itbusch | 0:51cacd8fe300 | 3 | #include "UP_SOS.h" |
itbusch | 0:51cacd8fe300 | 4 | //Initialisiere Ausgangspin und Variable |
itbusch | 0:51cacd8fe300 | 5 | InterruptIn TasteS1(PA_10); //PullUp auf Board; sonst PA_1 |
itbusch | 0:51cacd8fe300 | 6 | |
itbusch | 0:51cacd8fe300 | 7 | |
itbusch | 0:51cacd8fe300 | 8 | void ISR_SOS (void) //ISRotine.. |
itbusch | 0:51cacd8fe300 | 9 | { |
itbusch | 0:51cacd8fe300 | 10 | Blink(); |
itbusch | 0:51cacd8fe300 | 11 | } |
itbusch | 0:51cacd8fe300 | 12 | |
itbusch | 0:51cacd8fe300 | 13 | void IR_init (void) |
itbusch | 0:51cacd8fe300 | 14 | { |
itbusch | 0:51cacd8fe300 | 15 | //TasteS1.mode(PullUp); // Pull-Up auf Hardware (PullDown) |
itbusch | 0:51cacd8fe300 | 16 | TasteS1.fall(&ISR_SOS); //steigende Flanke = rise |
itbusch | 0:51cacd8fe300 | 17 | TasteS1.enable_irq(); //IR aktivieren |
itbusch | 0:51cacd8fe300 | 18 | } |
itbusch | 0:51cacd8fe300 | 19 | |
itbusch | 0:51cacd8fe300 | 20 | int main() |
itbusch | 0:51cacd8fe300 | 21 | { |
itbusch | 0:51cacd8fe300 | 22 | IR_init(); |
itbusch | 0:51cacd8fe300 | 23 | |
itbusch | 0:51cacd8fe300 | 24 | while (true) |
itbusch | 0:51cacd8fe300 | 25 | { |
itbusch | 0:51cacd8fe300 | 26 | } |
itbusch | 0:51cacd8fe300 | 27 | } |
itbusch | 0:51cacd8fe300 | 28 | |
itbusch | 0:51cacd8fe300 | 29 |