Any error message?
I can't claim to have experience with the Vinculum API, but if you post the relevant code (working and non-working), maybe someone will see something.
Jan
no error message occur but it's only cannot happen when i want to read/write data in the folder directory on USB pendrive
what i means in this part? cannot read/write file "03-001-001.txt" in "03" folder
fsAttach(hFAT_FILE_SYSTEM);
fileRead = fopen("03\\03-001-001.txt", "r");
file = fopen("03\\03-001--001.txt","w");
if (file == NULL)
{
leds = led3;
vos_dev_write(hGPIO_PORT_A, &leds, 1, NULL);
vos_delay_msecs(1000);
break;
}
fseek (fileRead , 0 , SEEK_END);
lSize = ftell (fileRead);
rewind (fileRead);
buffer = (char*) malloc (sizeof(char)*lSize);
result = fread (buffer,1,50,fileRead);
if (fwrite((buffer), strlen(buffer), sizeof(char), file) == -1)
{
leds = led3;
vos_dev_write(hGPIO_PORT_A, &leds, 1, NULL);
vos_delay_msecs(1000);
}
if (fclose(file) == -1)
{
leds = led3;
vos_dev_write(hGPIO_PORT_A, &leds, 1, NULL);
vos_delay_msecs(1000);
}
if (fclose(fileRead) == -1)
{
leds = led3;
vos_dev_write(hGPIO_PORT_A, &leds, 1, NULL);
vos_delay_msecs(1000);
}