Functions

int32_t fsys_init_dir (user_type *user_list, mmc_function_type *mmc_func)
 Initialize all directories specified in user_list. More...
 
int32_t fsys_init_file (direntry_type *fp, uint32_t offset, int32_t size)
 This function initializes all necessary internal parameters for a specific user file. More...
 
int32_t fsys_get_file_size (direntry_type *fp)
 Determine file size of specified file. More...
 
direntry_typefsys_send_all (direntry_type *fp, int32_t size, int32_t send_all)
 File transmission function. More...
 
void fsys_init_flash (void)
 Initialize FLASH-sectors. More...
 

Detailed Description

Function Documentation

int32_t fsys_init_dir ( user_type user_list,
mmc_function_type *  mmc_func 
)
Parameters
user_list- directory list
mmc_func- multi media card support function
Returns
  • TRUE success
  • FALSE error
Library:
net.lib
Prototype:
net.h
int32_t fsys_init_file ( direntry_type fp,
uint32_t  offset,
int32_t  size 
)

When file position or size has been changed, use this function to correct internal file parameters. Otherwise for no changes set offset or size to zero.

Parameters
fp- file pointer
offset- new offset
size- new size
Returns
  • TRUE success
  • FALSE error
Library:
net.lib
Prototype:
net.h
Examples:
Telnet.c.
int32_t fsys_get_file_size ( direntry_type fp)
Note
Reading size is only possible for ASCII type; for binary file type size the maximum value specified in user_list is taken.
Parameters
*fp- pointer to directory entry
Returns
file size
Library:
net.lib
Prototype:
net.h
Examples:
Telnet.c.
direntry_type * fsys_send_all ( direntry_type fp,
int32_t  size,
int32_t  send_all 
)

This multi-purpose file transmission function allows to send or receive data (ASCII, binary or Intel-Hex) from or to FLASH/RAM space via connected TCP socket.

Parameters
fp- file to send
size- some bytes left to send from previous packet
send_all- if TRUE all data will be sent immediately (blocking mode)
Returns
  • pointer to file = sending not finished
  • NULL = all bytes transmitted
Library:
net.lib
Prototype:
net.h
See also
FSYS_SEND_ALL, FSYS_WRITE_BOOT_SECTOR, FSYS_ERASE_SECTOR
Examples:
Telnet.c.
void fsys_init_flash ( void  )

Tag all FLASH-sectors as not empty for correct sector erase. Must be called before data is written into FLASH memory via fsys_send_all().

Parameters
-
Returns
nothing
Library:
net.lib
Prototype:
net.h
Examples:
Telnet.c.