code de la carte IHM avant les bugs et avant le travail effectué avec Melchior
Dependencies: mbed SerialHalfDuplex SDFileSystem liaison_Bluetooth ident_crac DISCO-F469NI_portrait
Diff: Instruction/lecture_repertoire.cpp
- Revision:
- 1:7e925468f9d9
- Child:
- 22:c7763a7ec6c7
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Instruction/lecture_repertoire.cpp Thu Jan 30 16:48:59 2020 +0000 @@ -0,0 +1,38 @@ +#include "global.h" + + +struct dirent* files_name[10]; +char *rest; + + +void lecture_fichier(void){ + short i,j; + + DIR* rep = NULL; + + mkdir("/sd", 0777); + strcpy(cheminFileStart,"/sd"); + rep=opendir("/sd"); + + for(i=0;i<20;i++){ + files_name[i]= readdir(rep); + + if(files_name[i]->d_name==""){ + i=20; + } + else{ + strcpy(strat_sd[i-j],files_name[i]->d_name); + rest=strstr(strat_sd[i-j],".txt"); + + if(rest==NULL){ + strcpy(strat_sd[i-j],""); + j++; + } + else{ + strcpy(strat_sd[i-j],strtok(strat_sd[i-j],".")); + } + + } + } +} +