CF2 API Reference (PDF) - Persistor Instruments Inc
CF2 API Reference (PDF) - Persistor Instruments Inc CF2 API Reference (PDF) - Persistor Instruments Inc
CF2 API ReferenceDOS Directory FunctionsDIRFindFirst -- Find first directory entry starting at pathDescription:Prototype:Inputs:Returns:This is called first when trying to get directory information.short DIRFindFirst(char *path, struct dirent *dp);path is a pointer to the path from which to start the searchdp is a pointer to a directory entry structureAn error code which could be dirErrorStart = DIR_ERRORS or dsdEndOfDir (end of directoryreached)DIRFreeSpace -- Return free space on specified driveDescription:Prototype:Inputs:Returns:Return free space on specified drivelong DIRFreeSpace(char *drive);drive is, for example, “c:\\”The number of free bytes as a longDIRFindEnd -- Conclude directory searchDescription:Prototype:Inputs:Returns:Conclude directory searchshort DIRFindEnd(struct dirent *dp);dp is a pointer to a directory entry structureAn error code which could be dirErrorStart = DIR_ERRORS or dsdEndOfDir (end of directoryreached)DIRFindNext -- Find next directory entryDescription:Prototype:Inputs:Returns:Notes:Called after an initial call to DIRFindFirst using the same pointer to directory entry. dp is filledwith the information from the next directory entry.short DIRFindNext(struct dirent *dp);dp is a pointer to a directory entry structureAn error code which could be dirErrorStart = DIR_ERRORS or dsdEndOfDir (end of directoryreached)Called after an initial call to DIRFindFirst using the same pointer to directory entry. dp is filledwith the information from the next directory entry.PERSISTORInstruments Inc.20 of 84CF2 API Reference7/19/2005
CF2 API ReferenceDIRMatchName -- Return true if filename matches ambiguous patternDescription:Prototype:Inputs:Returns:Return TRUE if filename matches ambiguous patternbool DIRMatchName(char *filename, char *pattern);filename the filename to comparepattern is a pattern like “*.txt” or “*.*” or an exact filename match. This is usually used inconjunction with DIRFindFirst and DIRFindNext comparing a pattern against the returned namefrom the DIRENT structure (d_name).TRUE is the pattern matches the filename and FALSE otherwiseDIRTotalSpace -- Return total space on specified driveDescription:Prototype:Inputs:Returns:Return total space on specified drivelong DIRTotalSpace(char *drive);drive is, for example, “c:\\”The total number of bytes as a longPERSISTORInstruments Inc.21 of 84CF2 API Reference7/19/2005
- Page 1 and 2: PERSISTOR ® CF2API ReferenceCopyri
- Page 3 and 4: CF2 API ReferenceATA Device Drivers
- Page 5 and 6: CF2 API ReferenceBigIDEA IDE Driver
- Page 7 and 8: CF2 API ReferenceBIOSVersionCheck -
- Page 9 and 10: CF2 API ReferenceCheckSum32 -- Upda
- Page 11 and 12: CF2 API ReferenceChip Select Wrappe
- Page 13 and 14: CF2 API ReferenceCompactFlash Low L
- Page 15 and 16: CF2 API ReferenceBelow are macros d
- Page 17 and 18: CF2 API ReferenceCIOprintf - Simple
- Page 19: CF2 API Referenceuprintf -- A clone
- Page 23 and 24: CF2 API ReferenceLED Signal Functio
- Page 25 and 26: CF2 API ReferencePeriodic Interrupt
- Page 27 and 28: CF2 API ReferencePicoDOS Initializa
- Page 29 and 30: CF2 API ReferencePin I/O Drivers, F
- Page 31 and 32: CF2 API ReferencePinIO -- Make an I
- Page 33 and 34: CF2 API ReferencePIOClear -- Config
- Page 35 and 36: CF2 API ReferencePing-Pong Buffer F
- Page 37 and 38: CF2 API ReferencePPBPutWord -- Writ
- Page 39 and 40: CF2 API ReferenceQSMRun - Start the
- Page 41 and 42: CF2 API ReferenceQuery/Reply Functi
- Page 43 and 44: CF2 API ReferenceQRdouble -- Query/
- Page 45 and 46: CF2 API ReferenceQueued PicoBUS (QS
- Page 47 and 48: CF2 API ReferenceQPBSetup -- Set up
- Page 49 and 50: CF2 API ReferenceReal Time Clock Dr
- Page 51 and 52: CF2 API ReferenceRTCtime -- ANSI st
- Page 53 and 54: CF2 API ReferenceSTDIO WarningThe A
- Page 55 and 56: CF2 API ReferenceSCIRxFlush -- Dele
- Page 57 and 58: CF2 API ReferenceSCIRxTxIdle -- Ret
- Page 59 and 60: CF2 API ReferenceSCITxWaitCompletio
- Page 61 and 62: CF2 API ReferenceTable Driven Comma
- Page 63 and 64: CF2 API ReferenceCmdIsNumber- Is Co
- Page 65 and 66: CF2 API ReferenceTime Processing Un
- Page 67 and 68: CF2 API ReferencePrototype:Inputs:N
- Page 69 and 70: CF2 API ReferenceTPU UartSummary of
<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>DIRMatchName -- Return true if filename matches ambiguous patternDescription:Prototype:Inputs:Returns:Return TRUE if filename matches ambiguous patternbool DIRMatchName(char *filename, char *pattern);filename the filename to comparepattern is a pattern like “*.txt” or “*.*” or an exact filename match. This is usually used inconjunction with DIRFindFirst and DIRFindNext comparing a pattern against the returned namefrom the DIRENT structure (d_name).TRUE is the pattern matches the filename and FALSE otherwiseDIRTotalSpace -- Return total space on specified driveDescription:Prototype:Inputs:Returns:Return total space on specified drivelong DIRTotalSpace(char *drive);drive is, for example, “c:\\”The total number of bytes as a longPERSISTOR<strong>Instruments</strong> <strong>Inc</strong>.21 of 84<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>7/19/2005