Forum Discussion
Altera_Forum
Honored Contributor
13 years agothis is my code:
char * myfile = "004.txt"; short int handler; handler = alt_up_sd_card_fopen(myfile, false); if (handler == -1)////file not exist { //creat file handler = alt_up_sd_card_fopen(myfile, true); } if (handler < 0) { printf("file open failed!!"); } int i=0; for(;i<65530;i++) { alt_up_sd_card_write(handler,(char) 0x38); } alt_up_sd_card_fclose(handler);