DMCP interface
03.15_020
|
Disk functions. More...
Functions | |
int | sys_disk_ok () |
Returns current disk status. More... | |
int | sys_disk_write_enable (int val) |
(En/Dis)able disk write mode More... | |
int | sys_is_disk_write_enable () |
Returns current disk write state. More... | |
void | sys_disk_check_valid () |
Update disk state based on low level disk state. More... | |
void | set_fat_label (const char *label) |
Sets disk label. More... | |
Disk functions.
Current calculator hardware (hwid=0 and hwid=1) provides FAT formatted disk using 6MB of external QSPI flash (bottom 2MB are reserved for use by programs).
void set_fat_label | ( | const char * | label | ) |
Sets disk label.
label | New disk label |
void sys_disk_check_valid | ( | ) |
Update disk state based on low level disk state.
Deactivates disk if any low level error occurs.
Current disk state can be seen in 'Disk info' screen. Disk can be still attached to PC through MSC interface (usually File->Activate USB Disk) and files from disk possibly recovered.
Note that even if the filesystem is potentially corrected on PC. When the calculator system assigns disk as invalid because of write error. Disk has to be re-validated using (System -> FAT Disk Media Test). It performs check for bad sectors and makes filesystem format afterwards.
int sys_disk_ok | ( | ) |
Returns current disk status.
int sys_disk_write_enable | ( | int | val | ) |
(En/Dis)able disk write mode
By default the FAT disk is in read-only mode. This function allows to put the disk into write mode and back.
int sys_is_disk_write_enable | ( | ) |
Returns current disk write state.