#include <net_config.h>
U16 tftpc_fread (
FILE* file, /* Pointer to the file to read from. */
U8* buf, /* Pointer to buffer, to store the data. */
U16 len ); /* Number of bytes to read. */
Description
The tftpc_fread reads len bytes from the local file
identified by the file stream pointer in the function
argument. The argument buf is a pointer to the buffer where
the function stores the read data.
The tftpc_fread function is in the TFTPC_uif.c module. The
prototype is defined in net_config.h.
note
The tftpc_fread function must read len bytes. The
TFTP Client stops reading and closes the TFTP session, if the
return value is less than len bytes.
This is an interface function of TFTP Client.
Return Value
The tftpc_fread function returns the number of bytes read
from the file.
U16 tftpc_fread (void *file, U8 *buf, U16 len) {
/* Read 'len' bytes from file to buffer 'buf'. Return number of bytes */
/* copied. The file will be closed, when the return value is < 'len' */
return (fread (buf, 1, len, file));
}
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.