26-Aug-10 USB-FileSys / USB-Config HW149-8 www.hexwax.com Files can only be created after using the Get File " />
參數(shù)資料
型號: TPFLXIC017
廠商: Microchip Technology
文件頁數(shù): 9/10頁
文件大?。?/td> 0K
描述: IC MICROCONTROLLER
標準包裝: 1
系列: *
p8 of 10
26-Aug-10
USB-FileSys / USB-Config
HW149-8
www.hexwax.com
Files can only be created after using the Get File Entry
By Short Name command.
Example 1 (open existing file):
Command: What is the 5
th directory entry in the
current directory?
03 04 00
Response:
Success, file is a read-only file called
“FRED.TXT”
00 46 52 45 44 20 20 20 20 54 58 54 01…
Command: Open the file using handle 01
0A 01
Response:
Success, file is open on handle 01
00
Example 2 (create file):
Command: Find file “FRED.TXT” (note the read-only
attribute is set, although this is ignored
while searching for the file)
04 44 41 54 41 20 20 20 20 20 20 20 01
Response:
Fail, file does not exist.
02
Command: Create the file as read-only using handle
03
0A 03
Response:
Success, file is open on handle 01
00
Example 3 (create subdirectory):
Command: Find subdirectory “DATA”.
04 44 41 54 41 20 20 20 20 20 20 20 10
Response:
Fail, file does not exist.
02
Command: Create subdirectory (file handle ignored)
0A 00
Response:
Success. (No file is opened)
00
Close File
This command closes the file associated with a file
handle. The first byte of the command is the value 0x0B.
The second is the “file handle” of the open file. The next
four bytes (LSB first) are the desired length of the file, or
0xFFFFFFFF if the length is to be the ‘expected length’.
The expected length is greater of the length recorded in
the directory entry and the highest position written to
while open.
The main effect of this command is to update the length
argument in the directory entry and, if it was shortened,
to free any unused clusters at the end of the file.
If external memory is used, the creation, modify and
access date/time are all fully updated as required. If
internal memory is used, these fields will only be
updated by USB-FileSys if the directory entry would
have been modified anyway.
(i.e. When the file is
created and when it is closed with a different length than
when it was opened.)
Example 1:
Command: Close file handle 02 with expected length
0B 02 FF FF FF FF
Response:
Success
00
Read File
This command reads data from a file starting from the
file pointer position. The first byte of the command is
the value 0x0D. The second is the “file handle” of the
open file. The next four bytes are the position in the file
to read from, or 0xFFFFFFFF to continue on
sequentially from the last read or write command. (If
there have been no previous read or write command,
the start of the file will be assumed.)
With the 28-pin device, the next two bytes are the
number of bytes to read, up to a maximum of 512. The
read must not cross the 512-byte sector boundary.
With the 20-pin device, the next two bytes are the
number of bytes to read, up to a maximum of 64. The
read must not cross the 64-byte page boundary.
Note:
The file length information in the directory is
ignored. The data may be read up to the last cluster
itemized in the file allocation table.
The response will be the status byte followed by the
data bytes read.
Example:
Command: Read 4 bytes at position 0123 from file
handle 02
0D 02 23 01 00 00 04 00
Response:
Success, data is 12 34 56 78.
00 12 34 56 78
Write File
This command writes data to a file starting from the file
pointer position. The first byte of the command is the
value 0x0E. The second is the “file handle” of the open
file. The next four bytes are the position in the file to
write to, 0xFFFFFFFE to append onto the end of the file,
or 0xFFFFFFFF to continue on sequentially from the last
read or write command. (If there have been no previous
read or write commands, the start of the file will be
assumed.)
With the 28-pin device, the next two bytes are the
number of bytes to write, up to a maximum of 512. The
write must not cross the 512-byte sector boundary.
相關PDF資料
PDF描述
TPS2371D IC PWR INTRFCE SW FOR POE 8-SOIC
PIC16LF721-I/ML MCU PIC 4K FLASH 20-QFN
PIC16LF1507-E/SO IC MCU 8BIT 3.5KB FLASH 20SOIC
PIC16F1507-E/SO IC MCU 8BIT 3.5KB FLASH 20SOIC
PIC16LF1902-I/MV MCU 3.5KB FLASH LCD DVR 28-UQFN
相關代理商/技術參數(shù)
參數(shù)描述
TPFLXIC018 功能描述:插座和適配器 Access-Touch-SS FlexiPanel RoHS:否 制造商:Silicon Labs 產(chǎn)品:Adapter 用于:EM35x
TP-FUEL-0.250 功能描述:LABEL IDENTIFICATION TAPE RoHS:否 類別:計算機,辦公室 - 元件,配件 >> 標簽,標記 系列:TP-帶 標準包裝:1 系列:PANACEA™ 類型:標簽 標簽類型:熱敏式 標簽尺寸:0.75" x 26.2'(19.1mm x 8.0m) 材質(zhì):聚酯 顏色:透明 適用于相關產(chǎn)品:熱敏打印機 包裝:卷 其它名稱:298-1346
TP-FUEL-0.375 功能描述:LABEL IDENTIFICATION TAPE RoHS:是 類別:計算機,辦公室 - 元件,配件 >> 標簽,標記 系列:TP-帶 標準包裝:1 系列:PANACEA™ 類型:標簽 標簽類型:熱敏式 標簽尺寸:0.75" x 26.2'(19.1mm x 8.0m) 材質(zhì):聚酯 顏色:透明 適用于相關產(chǎn)品:熱敏打印機 包裝:卷 其它名稱:298-1346
TP-FUEL-0.500 功能描述:LABEL IDENTIFICATION TAPE RoHS:否 類別:計算機,辦公室 - 元件,配件 >> 標簽,標記 系列:TP-帶 標準包裝:1 系列:PANACEA™ 類型:標簽 標簽類型:熱敏式 標簽尺寸:0.75" x 26.2'(19.1mm x 8.0m) 材質(zhì):聚酯 顏色:透明 適用于相關產(chǎn)品:熱敏打印機 包裝:卷 其它名稱:298-1346
TP-FUEL-0.625 制造商:TE Connectivity 功能描述:Connector Accessories Label Identification Tape