File_DiskSizeKB(), Dword
Result Dword = The result is a Dword (32-bit unsigned integer) representing the SD card size in kilobytes (KB).
Get SD Card Drive Size in KB
The SD_Card_Size() command retrieves the size of the SD card in kilobytes (KB). This is useful for checking the total storage capacity of the SD card.
Example:
File_DiskSizeKB()
TftSetUp(0) 'Set screen TftResetScreen(BLACK) 'Reset screen TftSetSndFont(0,0) 'Set Font0 While File_Init() <> cErrOK : Wend 'Initialize SD Card TftPrintSndString("Sd Init OK",1,0,0,1,GREEN,BLACK,0) 'Confirm Initialize SD Card TftPrintSndString("Disk size = " + Str$(Dec File_DiskSizeKB()),1,0,1,1,GREEN,BLACK,0) 'Display SD Card size TftPrintSndString("Disk space = " + Str$(Dec File_FreeSpaceKB()),1,0,2,1,GREEN,BLACK,0) 'Display SD Card free space |
|
Created with the Personal Edition of HelpNDoc: Simplify Your Help Documentation Process with a Help Authoring Tool