\i S O byte::handle byte::mode string::filename
Parameter | Type | Range | Description |
---|---|---|---|
handle | byte | 0 ... 3 | unique identifier for the opened file |
mode | byte | ASCII: 'R', 'W', 'A' | mode to open the file |
filename | file | DOS filename (8.3 format) | name and path of the file |
Opens a file specified with filename from the SD card and assigns handle, according to the following values for mode:
ASCII | Hex | Description |
---|---|---|
R | 0x52 | Open file in read only mode. |
W | 0x57 | Create file and set file pointer to 0. If the file already exists, it will be deleted and created anew. |
A | 0x41 | The file will be opened or created for modifying or appending. The file pointer will be set after the last byte of the file by default. |
Note
Response: | [ACK] |
Example
\iSO\0R/DIR1/DIR2/BACKGR~1.RII\0
This will open the file "BACKGROUND.RII" in directory "DIR2" which in turn is located in the directory "DIR1", which is located in the root of the SD-Card. The file will be opened via the first handle (0) and be in read-only mode.
Not supported by: DPC3050, DPC3020, DPC2060, DPC10xx
See also:
MicroSD Card Related Commands
Delete File
Close File
Write File
Make Directory
Copyright © demmel products gmbh. All rights reserved.