Macros

#define _FSYS_DEF
 
#define MAX_USER   10
 
#define MAX_DIR   200
 
#define MAX_NAME_LEN   60
 
#define MAX_USERNAME_LEN   30
 
#define MAX_PASS_LEN   30
 
#define EFS_TERMINATION   (_MAKE_32(0))
 

Access Permission

use with direntry_type.access

#define FTP_READ   1
 
#define FTP_CREATE   2
 
#define FTP_WRITE   4
 
#define FTP_RW   (FTP_READ | FTP_WRITE)
 
#define FTP_RAM   8
 
#define FTP_FAT   16
 
#define HTTP_GZIP   512
 

Flags

Use with fsys_send_all()

#define FSYS_SEND_ALL   0x00000010
 
#define FSYS_WRITE_BOOT_SECTOR   0x00000020
 
#define FSYS_ERASE_SECTOR   0x00000040
 

Return codes

Use with fsys_send_all()

#define FSYS_BIOS_PROTECT_ERROR   -1
 
#define FSYS_CHECKSUM_ERROR   -2
 
#define FSYS_INTEL_HEX_ERROR   -3
 
#define FSYS_SECTOR_ERASE_ERROR   -4
 
#define FSYS_FLASH_PROGRAM_ERROR   -5
 
#define FSYS_BUFFER_UNDERRUN_ERROR   -6
 
#define FSYS_OUT_OF_MEMORY_ERROR   -7
 
#define FSYS_OUT_OF_RANGE_ERROR   -8
 

Detailed Description

Macro Definition Documentation

#define _FSYS_DEF
#define MAX_USER   10

Maximum parallel users

#define MAX_DIR   200

Maximum directories

#define MAX_NAME_LEN   60

Maximum name length

#define MAX_USERNAME_LEN   30

Maximum username length

#define MAX_PASS_LEN   30

Maximum password length

#define EFS_TERMINATION   (_MAKE_32(0))

EFS list termination

Examples:
FTPClient.c, and HTTPsimple.c.
#define FTP_READ   1

Read files

Examples:
Telnet.c.
#define FTP_CREATE   2

Create new files

#define FTP_WRITE   4

Overwrite or delete existing files

Examples:
Telnet.c.
#define FTP_RW   (FTP_READ | FTP_WRITE)

Read and write permission

Examples:
HTTPdynamic.c, and HTTPjava.c.
#define FTP_RAM   8

File located in RAM

Examples:
HTTPdynamic.c, and HTTPjava.c.
#define FTP_FAT   16

Use FAT file system

#define HTTP_GZIP   512

Use this flag to activate HTTP server "Content-Encoding: gzip" for previously gzip compressed files. Use a common compress utility to gzip a file. The compressed file name must be identical to the original uncompressed filename. Also the filetype direntry_type::type must specify the type of the original file (e.g. 'A'[SCII] for HTML files)

direntry_type e400 = {"e400.htm","e400.htm",sizeof(e400_htm),FTP_RW|FTP_RAM|HTTP_GZIP,'A',(uint32_t)e400_htm};
See also
HTTPsimple.c example

activate Content-Encoding: gzip

#define FSYS_SEND_ALL   0x00000010

Perform a blocking call

Examples:
Telnet.c.
#define FSYS_WRITE_BOOT_SECTOR   0x00000020

Allows to write FLASH bootsector

#define FSYS_ERASE_SECTOR   0x00000040

Pre-Erase FLASH sector

#define FSYS_BIOS_PROTECT_ERROR   -1

BIOS protection error (D.Module only)

Examples:
Telnet.c.
#define FSYS_CHECKSUM_ERROR   -2

Checksum error

Examples:
Telnet.c.
#define FSYS_INTEL_HEX_ERROR   -3

Intel Hex Format error

Examples:
Telnet.c.
#define FSYS_SECTOR_ERASE_ERROR   -4

FLASH sector erase error

Examples:
Telnet.c.
#define FSYS_FLASH_PROGRAM_ERROR   -5

FLASH program error

Examples:
Telnet.c.
#define FSYS_BUFFER_UNDERRUN_ERROR   -6

Buffer underrun error

Examples:
Telnet.c.
#define FSYS_OUT_OF_MEMORY_ERROR   -7

Out of memory error

Examples:
Telnet.c.
#define FSYS_OUT_OF_RANGE_ERROR   -8

Out of range error

Examples:
FTPServer.c, and Telnet.c.