Nathan MONNIER
/
Projet_S3
Projet_S3
serie.h@14:5b7129157c7b, 2022-03-26 (annotated)
- Committer:
- nmonnier
- Date:
- Sat Mar 26 14:58:31 2022 +0000
- Revision:
- 14:5b7129157c7b
- Parent:
- 13:ae981a954016
Last version
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(); |
nmonnier | 14:5b7129157c7b | 8 | switch(arecv){ |
nmonnier | 14:5b7129157c7b | 9 | case 'o': |
nmonnier | 14:5b7129157c7b | 10 | case 'q': |
nmonnier | 14:5b7129157c7b | 11 | selection=arecv; |
nmonnier | 14:5b7129157c7b | 12 | break; |
nmonnier | 14:5b7129157c7b | 13 | case 'a': |
nmonnier | 14:5b7129157c7b | 14 | case 'b': |
nmonnier | 14:5b7129157c7b | 15 | case 'c': |
nmonnier | 14:5b7129157c7b | 16 | case 'z': |
nmonnier | 14:5b7129157c7b | 17 | case 'r': |
nmonnier | 14:5b7129157c7b | 18 | tempo=500; |
nmonnier | 14:5b7129157c7b | 19 | entrer=arecv; |
nmonnier | 14:5b7129157c7b | 20 | break; |
nmonnier | 14:5b7129157c7b | 21 | } |
dujardin | 6:edb27e228558 | 22 | return; |
dujardin | 8:cfcf73c16fab | 23 | } |