SystemACE, xilfatfs and feof()

Aug 09, 2007 0 Replies

Hi all,



I'm doing a project with a Xilinx University Project Virtex-II Pro board. For this I'm using the compact flash card-reader interfaced with a microblaze instantiated on the FPGA.



I'm using EDK 9.1.02i and I'm using the xilfatfs library to interface with the flash reader. This library provides a header sysace_stdio.h which replicates much of the standard C file-handling functionality using functions like sysace_fopen(), sysace_fread() and so on.



However I was looking for a way to check for end-of-file (similar to the standard C feof() function) and could not find any, beyond the vague assertion that sysace_fread() returns 0 on error; however, this error is not necessarily end-of-file. The documentation[1] mentions nothing of setting errno or otherwise reporting the nature of the error.



Is there any way to check definitively whether you have reached the end of a file using xilfatfs? Is there another way of interfacing my C program with the compact flash reader than xilfatfs?



Many thanks,



Phil



[1] Documentation here:
formatting link

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required