SmartGPU2-LCD480X320Touch-CommandSet

SMART GPU 2 3.5” TOUCH
Command Set
Vizic Technologies ©2014 116
2.9.17 Get Dir/File Info 49hex ‘I’ ascii
*This command is divided in 2 sub-commands, each one is explained next:
Commands (host)
3 bytes + Dir or File name with “.ext” +
1byte(NULL).
1.- 0x46 (hex), F (ascii). *FAT command.
2.- 0x49 (hex), I (ascii). (Dir/File Info)
3.- 0x53 (hex), S (ascii). Size or
0x46 (hex), F (ascii). FAT Attribute
4 up to N (Dir/File name including extension).
N+1.- 0x00 (hex) NULL ascii.
Responses (device)
X bytes
Get Dir/File Size:
1.- Size high byte.
2.- Size medium high byte.
3.- Size medium low byte.
4.- Size low byte.
5.- 0xXX (hex) - Refer to “File ACK List”.
6.- 0x4F (hex), O (ascii) success ACK.
0x46 (hex), F (ascii) fail NAK.
*The size of a Directory is always Zero 0x00000000.
Get Dir/File Attribute:
1.- 0xXX(hex) - FAT Attribute.
2.- 0xXX (hex) - Refer to “File ACK List”.
3.- 0x4F (hex), O (ascii) success ACK.
0x46 (hex), F (ascii) fail NAK.
Description
The Get Dir/File Info command simply asks for
Information about the received Directory or File, this
Information can be the Size in bytes or FAT
Attribute.
The possible FAT Attributes can be one or a
logical “OR” combination of the next bytes:
0x01 Read Only
0x02 Hidden file
0x04 System
0x08 Volume label
0x10 Directory
0x20 Archive.
Example (sent and received
commands)
Example 1:
<46,49,53,31,32,33,2E,74,78,74,00>
00,00,15,DA,00,4F - Get Size of File “123.txt”,
obtained file size is 5594(dec) bytes ~ 5Kb.