SmartGPU2-LCD480X320Touch-CommandSet

SMART GPU 2 3.5” TOUCH
Command Set
Vizic Technologies ©2014 107
2.9.10 Sync File 53hex ‘S’ ascii
Commands (host)
3 bytes
1.- 0x46 (hex), F (ascii). *FAT command.
2.- 0x53 (hex), S (ascii). (Sync File)
3.- Workspace Block# 0x00(hex) 0x03(hex)
Responses (device)
1 byte File ACK + 1 byte Command ACK
1.- 0xXX (hex) - Refer to “File ACK List”.
2.- 0x4F (hex), O (ascii) success ACK.
0x46 (hex), F (ascii) fail NAK.
Description
The Sync File command is similar to a give a
click on a classic save changes button in a
PC software, this command save any changes
in the Workspace block file object without
closing the file, it is left opened and user can
continue Read/Write operations to the
Workspace block file object. This command is
suitable for applications that require open files
for a long time in write mode, such as data
logger, and this avoids data corruption.
Performing Sync File or data save of
periodic or immediately after file write can
minimize the risk of data loss due to a sudden
blackout or an unintentional disk removal.
However a call to Sync File command
immediately before Close File command has
no advantage because Close File performs
Sync File in it. In other words, the difference
between those functions is that the Workspace
block file object is invalidated/closed or not.
If no File is allocated in the Workspace
block# received parameter during a “Sync File”
command, this command will fail with INVALID
OBJECT, as an attempt to sync data to an
empty Workspace block was done.
Example (sent commands)
Example 1:
<46,53,01> Sync/Save changes to Workspace
block 0x01 file object.
All data is in hex.