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.
serie.h@8:cfcf73c16fab, 2021-08-25 (annotated)
- Committer:
- dujardin
- Date:
- Wed Aug 25 09:54:24 2021 +0000
- Revision:
- 8:cfcf73c16fab
- Parent:
- 6:edb27e228558
- Child:
- 10:6f9340af7926
projets de S3 S4; version de base
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| dujardin | 6:edb27e228558 | 1 | // variables globales liées à la reception serie |
| dujardin | 8:cfcf73c16fab | 2 | int arecv = 0 ; // stockage intermediaire du char arrivé |
| dujardin | 8:cfcf73c16fab | 3 | |
| dujardin | 8:cfcf73c16fab | 4 | void interrupt() // reception sur liaison serie |
| dujardin | 8:cfcf73c16fab | 5 | { // ici on decode un exemple simple |
| dujardin | 8:cfcf73c16fab | 6 | // un 'a' met posx = 10 un 'b' met posx = 20 |
| dujardin | 8:cfcf73c16fab | 7 | arecv = serie.getc(); |
| dujardin | 8:cfcf73c16fab | 8 | if (arecv == 'a') // c'est un 'a' |
| dujardin | 8:cfcf73c16fab | 9 | { posx = 10 ; |
| dujardin | 6:edb27e228558 | 10 | } |
| dujardin | 8:cfcf73c16fab | 11 | if (arecv == 'b')// c'est B |
| dujardin | 8:cfcf73c16fab | 12 | { posx = 20 ; |
| dujardin | 8:cfcf73c16fab | 13 | } |
| dujardin | 6:edb27e228558 | 14 | return; |
| dujardin | 8:cfcf73c16fab | 15 | } |