Please enable JavaScript to view this site.

This function is used to write a string to a file that has been opened in write-type text mode.

Syntax

i32 f_puts (string buff, stru_filehnd stru)

buff

String to be placed in the file

stru

Variable of type stru_filehnd that contains the handle obtained via the f_open() function

Result

Returns:

Value

Description

0

File does not exist

EOF (code 0x1a)

Negative result

> 0

Positive result.

The value returned is that of the last byte entered

Validity

Task

Note

If I use a non-empty file, the contents of the file prior to using the function are erased.

If using functions regarding compact flash management, it is recommended that bit 14 of the sys_cfg variable (0x00004000) be imposed to 1, to enable the use of safety routines for writing/reading flash

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC