principal

Dependencies:   mbed fastlib vga640x400

Committer:
yokoland95
Date:
Thu Jun 13 15:56:16 2019 +0000
Revision:
2:05fe3543a781
Parent:
1:8229db8e7d08
blabla

Who changed what in which revision?

UserRevisionLine numberNew contents of line
clementlignie 1:8229db8e7d08 1 #include "mbed.h"
Ivop 0:043bbfc55ea1 2 #include "vga640x400/vga640x400.h"
yokoland95 2:05fe3543a781 3 #include <string.h>
yokoland95 2:05fe3543a781 4 #include <fichier.h>
Ivop 0:043bbfc55ea1 5
yokoland95 2:05fe3543a781 6
yokoland95 2:05fe3543a781 7
yokoland95 2:05fe3543a781 8 // P8 et P25 pour horloge, P5 data
yokoland95 2:05fe3543a781 9 //Serial pc(USBTX, USBRX); // tx, rx
yokoland95 2:05fe3543a781 10 // This must be an SPI MOSI pin.
yokoland95 2:05fe3543a781 11 #define DATA_PIN p11
yokoland95 2:05fe3543a781 12
clementlignie 1:8229db8e7d08 13
Ivop 0:043bbfc55ea1 14 extern unsigned char font_lin[256*16];
yokoland95 2:05fe3543a781 15 Ticker timer1;
Ivop 0:043bbfc55ea1 16
yokoland95 2:05fe3543a781 17 InterruptIn CAPT(p15 );
yokoland95 2:05fe3543a781 18
yokoland95 2:05fe3543a781 19 DigitalIn BPA(p17);
yokoland95 2:05fe3543a781 20 DigitalIn BPB(p18);
yokoland95 2:05fe3543a781 21 DigitalIn BPC(p19);
yokoland95 2:05fe3543a781 22 DigitalIn BPD(p20);
yokoland95 2:05fe3543a781 23
yokoland95 2:05fe3543a781 24 DigitalOut led1(LED1);
yokoland95 2:05fe3543a781 25 DigitalOut led2(LED2);
yokoland95 2:05fe3543a781 26 DigitalOut led3(LED3);
yokoland95 2:05fe3543a781 27 DigitalOut led4(LED4);
yokoland95 2:05fe3543a781 28
yokoland95 2:05fe3543a781 29 void int_timer(void);
yokoland95 2:05fe3543a781 30 void int_capt(void);
yokoland95 2:05fe3543a781 31 void int_capt2(void);
yokoland95 2:05fe3543a781 32 void vide(void);
yokoland95 2:05fe3543a781 33 void tourne_roue(void);
yokoland95 2:05fe3543a781 34
yokoland95 2:05fe3543a781 35 int passage;
yokoland95 2:05fe3543a781 36
yokoland95 2:05fe3543a781 37
yokoland95 2:05fe3543a781 38 void lancer_action(void){
Ivop 0:043bbfc55ea1 39
yokoland95 2:05fe3543a781 40 FILE *fp = fopen("/local/act.csv", "r");
yokoland95 2:05fe3543a781 41 if(!fp) {
yokoland95 2:05fe3543a781 42 error("Could not open file!\n\r");
yokoland95 2:05fe3543a781 43 }
yokoland95 2:05fe3543a781 44
yokoland95 2:05fe3543a781 45 //
yokoland95 2:05fe3543a781 46
yokoland95 2:05fe3543a781 47 char ligne[500];
yokoland95 2:05fe3543a781 48 char stock[500];
yokoland95 2:05fe3543a781 49 char* morceau;
yokoland95 2:05fe3543a781 50 bool passe = false;
yokoland95 2:05fe3543a781 51
yokoland95 2:05fe3543a781 52 int a = 1;
yokoland95 2:05fe3543a781 53 while( a == 1)
yokoland95 2:05fe3543a781 54 a = (rand() % nombre_ligne_fichier(fp)) +1;
yokoland95 2:05fe3543a781 55
yokoland95 2:05fe3543a781 56 printf("rand = %d\n\r",a);
yokoland95 2:05fe3543a781 57 int b;
yokoland95 2:05fe3543a781 58
yokoland95 2:05fe3543a781 59
yokoland95 2:05fe3543a781 60 //
yokoland95 2:05fe3543a781 61 clear_buffer();
yokoland95 2:05fe3543a781 62 /*-----------------------------------*/
yokoland95 2:05fe3543a781 63 /* RETOURNE LE CONTENU DE LA LIGNE X */
yokoland95 2:05fe3543a781 64 /*-----------------------------------*/
yokoland95 2:05fe3543a781 65 retourne_ligne(a,ligne,fp);
yokoland95 2:05fe3543a781 66
yokoland95 2:05fe3543a781 67 printf("LIGNE CHOISI: %s\n\r", ligne);
yokoland95 2:05fe3543a781 68
yokoland95 2:05fe3543a781 69 /*--------------------------------*/
yokoland95 2:05fe3543a781 70 /* AFFICHE L'ACTION A LECRAN */
yokoland95 2:05fe3543a781 71 /*--------------------------------*/
yokoland95 2:05fe3543a781 72 morceau = retourne_element_ligne(1, ligne);
yokoland95 2:05fe3543a781 73 strcpy(stock, morceau);
yokoland95 2:05fe3543a781 74 printf("l'action est: %s \n\r", text_buffer);
yokoland95 2:05fe3543a781 75 for (int i=0 ; i<strlen(stock)+1; i ++)
yokoland95 2:05fe3543a781 76 text_buffer[(320+i)^1] = stock[i];
yokoland95 2:05fe3543a781 77
yokoland95 2:05fe3543a781 78
yokoland95 2:05fe3543a781 79 a =0;
yokoland95 2:05fe3543a781 80 while (text_buffer[a] != '\0'){
yokoland95 2:05fe3543a781 81 a++;
yokoland95 2:05fe3543a781 82 }
yokoland95 2:05fe3543a781 83 printf("a comptage : %d\n\r", a);
clementlignie 1:8229db8e7d08 84
yokoland95 2:05fe3543a781 85 /*-----------------------------------*/
yokoland95 2:05fe3543a781 86 /* AFFICHE LE TEMPS A LECRAN */
yokoland95 2:05fe3543a781 87 /*-----------------------------------*/
yokoland95 2:05fe3543a781 88 strcpy(stock, "RESTER APPUYER SUR UN BOUTON POUR PASSER ->");
yokoland95 2:05fe3543a781 89 for (int j=0 ; j<strlen(stock)+1; j++)
yokoland95 2:05fe3543a781 90 text_buffer[(880+j)^1] = stock[j];
yokoland95 2:05fe3543a781 91
yokoland95 2:05fe3543a781 92 morceau = retourne_element_ligne(2, ligne);
yokoland95 2:05fe3543a781 93 b = atoi(morceau);
yokoland95 2:05fe3543a781 94
yokoland95 2:05fe3543a781 95 while(b >= 0 ){
yokoland95 2:05fe3543a781 96 wait(0.9);
yokoland95 2:05fe3543a781 97 sprintf(stock, "%3d", b);
yokoland95 2:05fe3543a781 98 printf("COMPTEUR: %s\n\r", stock);
yokoland95 2:05fe3543a781 99 for (int i=0 ; i<strlen(stock)+1; i ++)
yokoland95 2:05fe3543a781 100 text_buffer[((a/80+1)*80+i)^1] = stock[i];
yokoland95 2:05fe3543a781 101 b--;
yokoland95 2:05fe3543a781 102 if(! (BPA == 1 && BPB == 1 && BPC == 1 && BPD == 1) ){
yokoland95 2:05fe3543a781 103 passe = true;
yokoland95 2:05fe3543a781 104 clear_buffer();
yokoland95 2:05fe3543a781 105 while(!(BPA == 1 && BPB == 1 && BPC == 1 && BPD == 1) ){
yokoland95 2:05fe3543a781 106 }
yokoland95 2:05fe3543a781 107 b=-1;
yokoland95 2:05fe3543a781 108 }
yokoland95 2:05fe3543a781 109
yokoland95 2:05fe3543a781 110 }
clementlignie 1:8229db8e7d08 111
yokoland95 2:05fe3543a781 112 /*
yokoland95 2:05fe3543a781 113 if (!passe){
yokoland95 2:05fe3543a781 114 printf("dans le pas passe\n\r");
yokoland95 2:05fe3543a781 115 clear_buffer();
yokoland95 2:05fe3543a781 116 strcpy(stock, "APPUYER SUR UN BOUTON POUR CONTINUER -> ");
yokoland95 2:05fe3543a781 117 for (int j=0 ; j<strlen(stock)+1; j++)
yokoland95 2:05fe3543a781 118 text_buffer[(880+j)^1] = stock[j];
yokoland95 2:05fe3543a781 119 while(BPA == 1 && BPB == 1 && BPC == 1 && BPD == 1){
yokoland95 2:05fe3543a781 120 }
yokoland95 2:05fe3543a781 121 while(! (BPA == 1 && BPB == 1 && BPC == 1 && BPD == 1) ){
yokoland95 2:05fe3543a781 122 }
yokoland95 2:05fe3543a781 123 clear_buffer();
yokoland95 2:05fe3543a781 124 passe = false;
yokoland95 2:05fe3543a781 125 }
yokoland95 2:05fe3543a781 126 */
yokoland95 2:05fe3543a781 127 /*--------------------------------*/
yokoland95 2:05fe3543a781 128 /* AFFICHE LA RAISON A LECRAN */
yokoland95 2:05fe3543a781 129 /*--------------------------------*/
yokoland95 2:05fe3543a781 130
clementlignie 1:8229db8e7d08 131
clementlignie 1:8229db8e7d08 132
yokoland95 2:05fe3543a781 133 morceau = retourne_element_ligne(3, ligne);
yokoland95 2:05fe3543a781 134 strcpy(stock, morceau);
yokoland95 2:05fe3543a781 135 for (int j=0 ; j<strlen(stock); j++)
yokoland95 2:05fe3543a781 136 text_buffer[(400+j)^1] = stock[j];
yokoland95 2:05fe3543a781 137
yokoland95 2:05fe3543a781 138 wait(0.5);
yokoland95 2:05fe3543a781 139 strcpy(stock, "LANCER LA ROUE POUR REJOUER");
yokoland95 2:05fe3543a781 140 for (int j=0 ; j<strlen(stock)+1; j++)
yokoland95 2:05fe3543a781 141 text_buffer[(1120+j)^1] = stock[j];
clementlignie 1:8229db8e7d08 142
yokoland95 2:05fe3543a781 143 tourne_roue();
yokoland95 2:05fe3543a781 144 /*
yokoland95 2:05fe3543a781 145 while(BPA == 1){
yokoland95 2:05fe3543a781 146 }
yokoland95 2:05fe3543a781 147
yokoland95 2:05fe3543a781 148 while(BPA == 0){
yokoland95 2:05fe3543a781 149 }
yokoland95 2:05fe3543a781 150 */
yokoland95 2:05fe3543a781 151 fclose(fp);
yokoland95 2:05fe3543a781 152 printf("FIN\n\r");
yokoland95 2:05fe3543a781 153
yokoland95 2:05fe3543a781 154 }
yokoland95 2:05fe3543a781 155
yokoland95 2:05fe3543a781 156 void lancer_question(void){
yokoland95 2:05fe3543a781 157
yokoland95 2:05fe3543a781 158 FILE *fp = fopen("/local/form.csv", "r");
yokoland95 2:05fe3543a781 159 if(!fp) {
yokoland95 2:05fe3543a781 160 error("Could not open file!\n\r");
yokoland95 2:05fe3543a781 161 }
yokoland95 2:05fe3543a781 162
yokoland95 2:05fe3543a781 163 //
yokoland95 2:05fe3543a781 164
yokoland95 2:05fe3543a781 165 char ligne[500];
yokoland95 2:05fe3543a781 166 char stock[500];
yokoland95 2:05fe3543a781 167 char* morceau;
yokoland95 2:05fe3543a781 168 int a = (rand() % nombre_ligne_fichier(fp)) +1;
yokoland95 2:05fe3543a781 169 printf("rand = %d\n\r",a);
yokoland95 2:05fe3543a781 170 int b;
yokoland95 2:05fe3543a781 171
yokoland95 2:05fe3543a781 172
yokoland95 2:05fe3543a781 173 //
yokoland95 2:05fe3543a781 174 clear_buffer();
yokoland95 2:05fe3543a781 175 /*-----------------------------------*/
yokoland95 2:05fe3543a781 176 /* RETOURNE LE CONTENU DE LA LIGNE X */
yokoland95 2:05fe3543a781 177 /*-----------------------------------*/
yokoland95 2:05fe3543a781 178 retourne_ligne(a,ligne,fp);
yokoland95 2:05fe3543a781 179
yokoland95 2:05fe3543a781 180 /*
yokoland95 2:05fe3543a781 181 for (int i=0 ; i<strlen(ligne)+1; i ++)
yokoland95 2:05fe3543a781 182 text_buffer[(400+i)^1] = ligne[i]; //80 caractères par lignes
yokoland95 2:05fe3543a781 183
yokoland95 2:05fe3543a781 184 printf("ligne est %s\n\r",ligne);
yokoland95 2:05fe3543a781 185 wait(5);
yokoland95 2:05fe3543a781 186 clear_buffer();
yokoland95 2:05fe3543a781 187 */
yokoland95 2:05fe3543a781 188
yokoland95 2:05fe3543a781 189 /*-----------------------------------*/
yokoland95 2:05fe3543a781 190 /* AFFICHE LA QUESTION A LECRAN */
yokoland95 2:05fe3543a781 191 /*-----------------------------------*/
yokoland95 2:05fe3543a781 192 morceau = retourne_element_ligne(1, ligne);
yokoland95 2:05fe3543a781 193 strcpy(stock, morceau);
yokoland95 2:05fe3543a781 194 for (int i=0 ; i<strlen(stock)+1; i ++)
yokoland95 2:05fe3543a781 195 text_buffer[(400+i)^1] = stock[i];
yokoland95 2:05fe3543a781 196 printf("la question est: %s \n\r", text_buffer);
yokoland95 2:05fe3543a781 197
yokoland95 2:05fe3543a781 198
yokoland95 2:05fe3543a781 199 a =0;
yokoland95 2:05fe3543a781 200 while (text_buffer[a] != '\0'){
yokoland95 2:05fe3543a781 201 a++;
yokoland95 2:05fe3543a781 202 }
yokoland95 2:05fe3543a781 203 printf("a comptage : %d\n\r", a);
yokoland95 2:05fe3543a781 204 /*-----------------------------------*/
yokoland95 2:05fe3543a781 205 /* AFFICHE LES REPONSES A LECRAN */
yokoland95 2:05fe3543a781 206 /*-----------------------------------*/
yokoland95 2:05fe3543a781 207
yokoland95 2:05fe3543a781 208 for(int i = 1; i < 5; i++){
yokoland95 2:05fe3543a781 209 morceau = retourne_element_ligne(i+1, ligne);
yokoland95 2:05fe3543a781 210 printf("Reponse %d: %s \n\r",i, morceau);
yokoland95 2:05fe3543a781 211 strcpy(stock, morceau);
yokoland95 2:05fe3543a781 212 for (int j=0 ; j<strlen(stock)+1; j++)
yokoland95 2:05fe3543a781 213 text_buffer[((a/80+1)*80+j+i*160)^1] = stock[j];
yokoland95 2:05fe3543a781 214 }
yokoland95 2:05fe3543a781 215
clementlignie 1:8229db8e7d08 216
yokoland95 2:05fe3543a781 217 while(BPA == 1 && BPB == 1 && BPC == 1 && BPD == 1){
yokoland95 2:05fe3543a781 218 }
yokoland95 2:05fe3543a781 219
yokoland95 2:05fe3543a781 220
yokoland95 2:05fe3543a781 221 unsigned int ba, bb, bc, bd;
yokoland95 2:05fe3543a781 222
yokoland95 2:05fe3543a781 223 ba = BPA;
yokoland95 2:05fe3543a781 224 bb = BPB;
yokoland95 2:05fe3543a781 225 bc = BPC;
yokoland95 2:05fe3543a781 226 bd = BPD;
yokoland95 2:05fe3543a781 227
yokoland95 2:05fe3543a781 228 while(! (BPA == 1 && BPB == 1 && BPC == 1 && BPD == 1) ){
yokoland95 2:05fe3543a781 229 }
yokoland95 2:05fe3543a781 230
yokoland95 2:05fe3543a781 231
yokoland95 2:05fe3543a781 232 printf("a: %d \n\r", ba);
yokoland95 2:05fe3543a781 233 printf("a: %d \n\r", bb);
yokoland95 2:05fe3543a781 234 printf("a: %d \n\r", bc);
yokoland95 2:05fe3543a781 235 printf("a: %d \n\r", bd);
yokoland95 2:05fe3543a781 236 if(!ba)
yokoland95 2:05fe3543a781 237 b = 1;
yokoland95 2:05fe3543a781 238 else if(!bb)
yokoland95 2:05fe3543a781 239 b = 2;
yokoland95 2:05fe3543a781 240 else if(!bc)
yokoland95 2:05fe3543a781 241 b = 3;
yokoland95 2:05fe3543a781 242 else if(!bd)
yokoland95 2:05fe3543a781 243 b = 4;
yokoland95 2:05fe3543a781 244
yokoland95 2:05fe3543a781 245 clear_buffer();
yokoland95 2:05fe3543a781 246
yokoland95 2:05fe3543a781 247
yokoland95 2:05fe3543a781 248 /*----------------------------------------*/
yokoland95 2:05fe3543a781 249 /* AFFICHE LA BONNE REPONSES A LECRAN */
yokoland95 2:05fe3543a781 250 /*----------------------------------------*/
Ivop 0:043bbfc55ea1 251
yokoland95 2:05fe3543a781 252 a = num_bonne_reponse(ligne);
yokoland95 2:05fe3543a781 253
yokoland95 2:05fe3543a781 254
yokoland95 2:05fe3543a781 255 if(a == b){
yokoland95 2:05fe3543a781 256 strcpy(stock, "BONNE REPONSE =)");
yokoland95 2:05fe3543a781 257 for (int j=0 ; j<strlen(stock)+1; j++)
yokoland95 2:05fe3543a781 258 text_buffer[(1+j)^1] = stock[j];
yokoland95 2:05fe3543a781 259 }
yokoland95 2:05fe3543a781 260 else{
yokoland95 2:05fe3543a781 261 strcpy(stock, "MAUVAISE REPONSE =(");
yokoland95 2:05fe3543a781 262 for (int j=0 ; j<strlen(stock)+1; j++)
yokoland95 2:05fe3543a781 263 text_buffer[(1+j)^1] = stock[j];
yokoland95 2:05fe3543a781 264 }
yokoland95 2:05fe3543a781 265 morceau = retourne_element_ligne(a+1, ligne);
yokoland95 2:05fe3543a781 266 strcpy(stock, morceau);
yokoland95 2:05fe3543a781 267 for (int j=0 ; j<strlen(stock)+1; j++)
yokoland95 2:05fe3543a781 268 text_buffer[(400+j)^1] = stock[j];
yokoland95 2:05fe3543a781 269
yokoland95 2:05fe3543a781 270
yokoland95 2:05fe3543a781 271 strcpy(stock, " PARCE QUE ->");
yokoland95 2:05fe3543a781 272 for (int j=0 ; j<strlen(stock)+1; j++)
yokoland95 2:05fe3543a781 273 text_buffer[(560+j)^1] = stock[j];
yokoland95 2:05fe3543a781 274
yokoland95 2:05fe3543a781 275
yokoland95 2:05fe3543a781 276 morceau = retourne_element_ligne(7, ligne);
yokoland95 2:05fe3543a781 277 strcpy(stock, morceau);
yokoland95 2:05fe3543a781 278 for (int j=0 ; j<strlen(stock); j++)
yokoland95 2:05fe3543a781 279 text_buffer[(640+j)^1] = stock[j];
yokoland95 2:05fe3543a781 280
yokoland95 2:05fe3543a781 281 wait(0.5);
yokoland95 2:05fe3543a781 282 strcpy(stock, "LANCER LA ROUE POUR REJOUER");
yokoland95 2:05fe3543a781 283 for (int j=0 ; j<strlen(stock)+1; j++)
yokoland95 2:05fe3543a781 284 text_buffer[(1120+j)^1] = stock[j];
yokoland95 2:05fe3543a781 285
yokoland95 2:05fe3543a781 286
yokoland95 2:05fe3543a781 287 tourne_roue();
yokoland95 2:05fe3543a781 288 /*while(BPA == 1){
yokoland95 2:05fe3543a781 289 }
yokoland95 2:05fe3543a781 290
yokoland95 2:05fe3543a781 291 while(BPA == 0){
yokoland95 2:05fe3543a781 292 }
yokoland95 2:05fe3543a781 293
yokoland95 2:05fe3543a781 294
yokoland95 2:05fe3543a781 295 while(BPA == 1 && BPB == 1 && BPC == 1 && BPD == 1){
yokoland95 2:05fe3543a781 296 }
yokoland95 2:05fe3543a781 297
yokoland95 2:05fe3543a781 298 while(! (BPA == 1 && BPB == 1 && BPC == 1 && BPD == 1) ){
yokoland95 2:05fe3543a781 299 }
yokoland95 2:05fe3543a781 300 */
yokoland95 2:05fe3543a781 301 fclose(fp);
yokoland95 2:05fe3543a781 302 printf("FIN\n\r");
yokoland95 2:05fe3543a781 303
yokoland95 2:05fe3543a781 304 }
yokoland95 2:05fe3543a781 305
yokoland95 2:05fe3543a781 306 void acceuil(void){
yokoland95 2:05fe3543a781 307
yokoland95 2:05fe3543a781 308 clear_buffer();
yokoland95 2:05fe3543a781 309 char stock[500];
yokoland95 2:05fe3543a781 310
yokoland95 2:05fe3543a781 311 strcpy(stock, "BIENVENUE A ROU[E]COLO");
yokoland95 2:05fe3543a781 312 for (int j=0 ; j<strlen(stock)+1; j++)
yokoland95 2:05fe3543a781 313 text_buffer[(400+j)^1] = stock[j];
yokoland95 2:05fe3543a781 314
yokoland95 2:05fe3543a781 315 strcpy(stock, "LANCER LA ROUE POUR JOUER");
yokoland95 2:05fe3543a781 316 for (int j=0 ; j<strlen(stock)+1; j++)
yokoland95 2:05fe3543a781 317 text_buffer[(1120+j)^1] = stock[j];
yokoland95 2:05fe3543a781 318
yokoland95 2:05fe3543a781 319 tourne_roue();
yokoland95 2:05fe3543a781 320 /*
yokoland95 2:05fe3543a781 321 while(BPA == 1){
yokoland95 2:05fe3543a781 322 }
yokoland95 2:05fe3543a781 323
yokoland95 2:05fe3543a781 324 while(BPA == 0){
yokoland95 2:05fe3543a781 325 }
yokoland95 2:05fe3543a781 326 */
yokoland95 2:05fe3543a781 327
yokoland95 2:05fe3543a781 328 return;
yokoland95 2:05fe3543a781 329 }
yokoland95 2:05fe3543a781 330
yokoland95 2:05fe3543a781 331 void vide(void){
yokoland95 2:05fe3543a781 332 }
yokoland95 2:05fe3543a781 333
yokoland95 2:05fe3543a781 334 void int_timer(void){
yokoland95 2:05fe3543a781 335 passage = 2;
yokoland95 2:05fe3543a781 336 }
yokoland95 2:05fe3543a781 337
yokoland95 2:05fe3543a781 338 void int_capt(){
yokoland95 2:05fe3543a781 339 passage = 1;
yokoland95 2:05fe3543a781 340 }
yokoland95 2:05fe3543a781 341
yokoland95 2:05fe3543a781 342 void int_capt2(){
yokoland95 2:05fe3543a781 343 timer1.attach(&int_timer, 3);
yokoland95 2:05fe3543a781 344 }
yokoland95 2:05fe3543a781 345
yokoland95 2:05fe3543a781 346 void tourne_roue(void){
yokoland95 2:05fe3543a781 347 CAPT.rise(&int_capt);
yokoland95 2:05fe3543a781 348 CAPT.fall(&int_capt);
yokoland95 2:05fe3543a781 349
yokoland95 2:05fe3543a781 350 passage=0;
yokoland95 2:05fe3543a781 351 while(passage == 0){
yokoland95 2:05fe3543a781 352 printf("passage 0 \n\r");
yokoland95 2:05fe3543a781 353 }
yokoland95 2:05fe3543a781 354
yokoland95 2:05fe3543a781 355 timer1.attach(&int_timer, 3);
yokoland95 2:05fe3543a781 356 CAPT.rise(&int_capt2);
yokoland95 2:05fe3543a781 357 CAPT.fall(&int_capt2);
yokoland95 2:05fe3543a781 358
yokoland95 2:05fe3543a781 359 while(passage == 1){
yokoland95 2:05fe3543a781 360 printf("passage 1 \n\r");
yokoland95 2:05fe3543a781 361 }
yokoland95 2:05fe3543a781 362 printf("passage 2\n\r");
yokoland95 2:05fe3543a781 363 timer1.detach();
yokoland95 2:05fe3543a781 364 CAPT.rise(&vide);
yokoland95 2:05fe3543a781 365 CAPT.fall(&vide);
yokoland95 2:05fe3543a781 366 }
yokoland95 2:05fe3543a781 367
yokoland95 2:05fe3543a781 368 int main() {
yokoland95 2:05fe3543a781 369 LocalFileSystem local("local");
yokoland95 2:05fe3543a781 370
yokoland95 2:05fe3543a781 371
yokoland95 2:05fe3543a781 372 font = font_lin;
Ivop 0:043bbfc55ea1 373 init_vga();
Ivop 0:043bbfc55ea1 374
yokoland95 2:05fe3543a781 375
yokoland95 2:05fe3543a781 376 acceuil();
yokoland95 2:05fe3543a781 377
yokoland95 2:05fe3543a781 378
yokoland95 2:05fe3543a781 379 //
yokoland95 2:05fe3543a781 380 while(1){
yokoland95 2:05fe3543a781 381
yokoland95 2:05fe3543a781 382 if(CAPT.read() == 1)
yokoland95 2:05fe3543a781 383 lancer_action();
yokoland95 2:05fe3543a781 384 else
yokoland95 2:05fe3543a781 385 lancer_question();
yokoland95 2:05fe3543a781 386
yokoland95 2:05fe3543a781 387 }
Ivop 0:043bbfc55ea1 388 }