Problem saving data from SD Card

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Problem saving data from SD Card

835件の閲覧回数
diegopuntin
Contributor I

Hi, I have the next code.

void file_directory (void)  {

  FINFO info;

    struct {char *name;} mensaje[255];

    int i = 0;

    char *aux;

  info.fileID = 0;                             /* info.fileID must be set to 0 */

  while (ffind ("M:*.bmp", &info) == 0) 

    {       /* find whatever is in drive "R0:" */

        printf ("\n%-32s %5d bytes, ID: %04d", info.name, info.size, info.fileID);

        aux = (char*)info.name;

        mensaje[i].name = aux;

        i++;

  }

  if (info.fileID == 0)  {

    printf ("\nNo files...");

  }

}

When I tried to save the all the files .BMP in the array mensaje[], I get the next:

NXP.png

All the positions of mensaje[] were filled with the last image reading. Who I can solve it.

タグ(3)
0 件の賞賛
返信
0 返答(返信)