I modified the file streamwrite.c to be used such that I can have a textfile to be sent, instead of using 1 Byte at a time (from the sample).
It works really well if my textfile is smaller than 1020 Bytes (which is 255 of 32-bit data), send it to SDRAM and read it again. That is great!
But if I have a textfile which is, for example, 100kB, it doesn't send all the data. I tried to modify the function:
- Code: Select all
void allwrite(int fd, unsigned char *buf, int len)
and change the int of len into long int like this (to make it big enough to cover the length):
- Code: Select all
void allwrite(int fd, unsigned char *buf, long len)
but still I didn't get the result to read all data from the textfile.
Do you have any suggestion or idea to solve this problem? Thanks.
Regards.