int  fs_setvbuf (FS_FILE    *p_file,
                 char       *p_buf,
                 int         mode,
                 fs_size_t   size);

File

Called from

Code enabled by

fs_api.c

Application

FS_CFG_API_EN and FS_CFG_FILE_BUF_EN

Assign buffer to a file.

Arguments

p_file

Pointer to a file.

p_buf

Pointer to buffer.

mode

Buffer mode:

FS__IONBR

Unbuffered.

FS__IOFBF

Fully buffered.

size

Size of buffer, in octets.

Returned Value

-1, if an error occurs.

0, if no error occurs.

Notes/Warnings