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@3:a19488e21195, 2020-09-30 (annotated)
- Committer:
- marques_rascol
- Date:
- Wed Sep 30 13:25:59 2020 +0000
- Revision:
- 3:a19488e21195
- Parent:
- 2:de8cec36a564
- Child:
- 4:fb4dff674d64
SW2 & SW3 rise et fall fonctions
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| marques_rascol | 0:618c97ce1b93 | 1 | #include "mbed.h" |
| marques_rascol | 1:bd98c63b7cf5 | 2 | InterruptIn KBI_SW2(SW2); |
| marques_rascol | 3:a19488e21195 | 3 | InterruptIn KBI_SW3(SW3); |
| marques_rascol | 0:618c97ce1b93 | 4 | Serial pc(USBTX, USBRX, 9600); |
| marques_rascol | 0:618c97ce1b93 | 5 | |
| marques_rascol | 1:bd98c63b7cf5 | 6 | void IT_SW2() |
| marques_rascol | 0:618c97ce1b93 | 7 | { |
| marques_rascol | 1:bd98c63b7cf5 | 8 | pc.printf("appui sur SW2\n"); |
| marques_rascol | 1:bd98c63b7cf5 | 9 | } |
| marques_rascol | 0:618c97ce1b93 | 10 | |
| marques_rascol | 3:a19488e21195 | 11 | void RT_SW2() |
| marques_rascol | 3:a19488e21195 | 12 | { |
| marques_rascol | 3:a19488e21195 | 13 | pc.printf("relachement sur SW2\n"); |
| marques_rascol | 3:a19488e21195 | 14 | } |
| marques_rascol | 3:a19488e21195 | 15 | |
| marques_rascol | 3:a19488e21195 | 16 | void IT_SW3() |
| marques_rascol | 3:a19488e21195 | 17 | { |
| marques_rascol | 3:a19488e21195 | 18 | pc.printf("appui sur SW3\n"); |
| marques_rascol | 3:a19488e21195 | 19 | } |
| marques_rascol | 3:a19488e21195 | 20 | |
| marques_rascol | 3:a19488e21195 | 21 | void RT_SW3() |
| marques_rascol | 3:a19488e21195 | 22 | { |
| marques_rascol | 3:a19488e21195 | 23 | pc.printf("relachement sur SW3\n"); |
| marques_rascol | 3:a19488e21195 | 24 | } |
| marques_rascol | 3:a19488e21195 | 25 | |
| marques_rascol | 1:bd98c63b7cf5 | 26 | main() |
| marques_rascol | 1:bd98c63b7cf5 | 27 | { |
| marques_rascol | 2:de8cec36a564 | 28 | KBI_SW2.fall(&IT_SW2); |
| marques_rascol | 3:a19488e21195 | 29 | KBI_SW2.rise(&RT_SW2); |
| marques_rascol | 3:a19488e21195 | 30 | KBI_SW3.fall(&IT_SW3); |
| marques_rascol | 3:a19488e21195 | 31 | KBI_SW3.rise(&RT_SW3); |
| marques_rascol | 3:a19488e21195 | 32 | |
| marques_rascol | 1:bd98c63b7cf5 | 33 | while (1) |
| marques_rascol | 1:bd98c63b7cf5 | 34 | { |
| marques_rascol | 1:bd98c63b7cf5 | 35 | |
| marques_rascol | 0:618c97ce1b93 | 36 | } |
| marques_rascol | 0:618c97ce1b93 | 37 | } |