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.
Fork of CRAC-Strat_2017 by
Display/Display.cpp@0:ad97421fb1fb, 2016-04-13 (annotated)
- Committer:
- antbig
- Date:
- Wed Apr 13 22:04:54 2016 +0000
- Revision:
- 0:ad97421fb1fb
Ajout interruption fin de match
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| antbig | 0:ad97421fb1fb | 1 | #include "Display.h" |
| antbig | 0:ad97421fb1fb | 2 | #include <stdarg.h> |
| antbig | 0:ad97421fb1fb | 3 | #include <stdio.h> |
| antbig | 0:ad97421fb1fb | 4 | |
| antbig | 0:ad97421fb1fb | 5 | CANMessage trame_Tx = CANMessage(); |
| antbig | 0:ad97421fb1fb | 6 | unsigned char curseur=0; |
| antbig | 0:ad97421fb1fb | 7 | |
| antbig | 0:ad97421fb1fb | 8 | void tactile_printf(const char* format, ...) |
| antbig | 0:ad97421fb1fb | 9 | { |
| antbig | 0:ad97421fb1fb | 10 | unsigned char i,j; |
| antbig | 0:ad97421fb1fb | 11 | va_list args; |
| antbig | 0:ad97421fb1fb | 12 | va_start(args, format); |
| antbig | 0:ad97421fb1fb | 13 | vsprintf(tableau_ecran+curseur,format, args); |
| antbig | 0:ad97421fb1fb | 14 | va_end(args); |
| antbig | 0:ad97421fb1fb | 15 | // envoi sur le bus can du tableau complet de l'ecran |
| antbig | 0:ad97421fb1fb | 16 | trame_Tx.id=ECRAN_PRINTF_1; |
| antbig | 0:ad97421fb1fb | 17 | for(j=0; j<4; j++) { |
| antbig | 0:ad97421fb1fb | 18 | trame_Tx.type=CANData; |
| antbig | 0:ad97421fb1fb | 19 | trame_Tx.len=8; |
| antbig | 0:ad97421fb1fb | 20 | for(i=0; i<8; i++) |
| antbig | 0:ad97421fb1fb | 21 | trame_Tx.data[i]=tableau_ecran[i+j*8]; |
| antbig | 0:ad97421fb1fb | 22 | can1.write(trame_Tx); |
| antbig | 0:ad97421fb1fb | 23 | wait_us(200); |
| antbig | 0:ad97421fb1fb | 24 | trame_Tx.id += 1; |
| antbig | 0:ad97421fb1fb | 25 | } |
| antbig | 0:ad97421fb1fb | 26 | } |
