CF2 API Reference (PDF) - Persistor Instruments Inc
CF2 API Reference (PDF) - Persistor Instruments Inc CF2 API Reference (PDF) - Persistor Instruments Inc
CF2 API ReferenceContentsFUNCTION FAMILY COMMAND PREFIX PgATA Device Drivers ATA… 3BigIDEA IDE Drivers BIA… 5BIOS Functions BIOS… 6Checksums and Cyclic Redundancy Check Functions CheckSum…, CRC… 8Chip Select Wrapper Functions CS8…, CS10… 11CompactFlash Low Level Drivers CFCardDetect, CFEnable, CFGetDriver 13Console I/O Functions and Macros CIO…, getch, kb…, put…, uprintf 14DOS Directory Functions DIR… 20Interrupt and Exception Vector Wrapper Functions IEV… 22LED Signal Functions LED… 23Periodic Interrupt Timer Functions PIT… 25PicoDOS Initialization and Coordination Functions Pico… 27PicoZOOM Functions PZ… 28Pin I/O Drivers, Functions, and Macros Pin…, PIO… 29Ping-Pong Buffer Functions PPB… 35Power Management Drivers and Functions LP…, QSM…, PWR… 38Query/Reply Functions QR… 41Queued PicoBUS (QSPI) Drivers and Functions QPB… 45Real Time Clock Drivers and Functions RTC… 49Serial Controller Interface Drivers and Functions SCI…, EIA… 52System Clock Timing Functions TMG… 60Table Driven Command Processor Functions Cmd… 61Time Processing Unit TU… 65Utility Functions execstr, flogf, Initflog, pdcfinfo, picodosver, sscan 71Virtual EEPROM Functions VEE… 74ABOUT THIS DOCUMENTThis API reference is meant to assist an experienced programmer who is familiar with the CF2 softwarearchitecture. A companion document entitled; “CF2 Programmer’s Guide” discusses issues involved withapplication development.PERSISTORInstruments Inc.2 of 84CF2 API Reference7/19/2005
CF2 API ReferenceATA Device DriversATACapacity -- Return the PC Card capacity in total sectorsDescription:Prototype:Inputs:Returns:Notes:This function returns the drive or media capacity as well as additional information about thenumber of heads and sectors per track for LBA translation. It also optionally returns card ordrive information table which has both generic and manufacturer specific fields. Refer to thedevice/media manuals for exact interpretation.short ATACapacity(ATADvr iodvr, ulong *sectors, ushort *spt, ushort *heads, void**info);ATADvr see following notesiodvr pointer to the physical device driver*sectors pointer to hold the total number of LBA sectors available*spt pointer to hold sectors per track*heads pointer to hold the logical number of heads**info pointer to a ATA_SECTOR_SIZE buffer pointer that can accept the drive informationtableReturns-zero for success or ATA error bitspass zeros for everything except *sectors to just quickly determine capacityATAReadSectors -- Read logical drive sector(s)Description:Prototype:Inputs:Returns:Notes:This function reads one or more 512 byte sectors from the card or disk into a memory buffer.short ATAReadSectors(ATADvr iodvr, ulong sector, void *buffer, short count);ATADvr see following notesiodvr pointer to the physical device driversector first LBA sector to read*buffer pointer to memory that will contain read datacount number of ATA_SECTOR_SIZE sectors to readReturns-zero for success or ATA error bitsUse multi-sector reads for best performancePERSISTORInstruments Inc.3 of 84CF2 API Reference7/19/2005
- Page 1: PERSISTOR ® CF2API ReferenceCopyri
- 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 and 20: CF2 API Referenceuprintf -- A clone
- Page 21 and 22: CF2 API ReferenceDIRMatchName -- Re
- 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
<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>ContentsFUNCTION FAMILY COMMAND PREFIX PgATA Device Drivers ATA… 3BigIDEA IDE Drivers BIA… 5BIOS Functions BIOS… 6Checksums and Cyclic Redundancy Check Functions CheckSum…, CRC… 8Chip Select Wrapper Functions CS8…, CS10… 11CompactFlash Low Level Drivers CFCardDetect, CFEnable, CFGetDriver 13Console I/O Functions and Macros CIO…, getch, kb…, put…, uprintf 14DOS Directory Functions DIR… 20Interrupt and Exception Vector Wrapper Functions IEV… 22LED Signal Functions LED… 23Periodic Interrupt Timer Functions PIT… 25PicoDOS Initialization and Coordination Functions Pico… 27PicoZOOM Functions PZ… 28Pin I/O Drivers, Functions, and Macros Pin…, PIO… 29Ping-Pong Buffer Functions PPB… 35Power Management Drivers and Functions LP…, QSM…, PWR… 38Query/Reply Functions QR… 41Queued PicoBUS (QSPI) Drivers and Functions QPB… 45Real Time Clock Drivers and Functions RTC… 49Serial Controller Interface Drivers and Functions SCI…, EIA… 52System Clock Timing Functions TMG… 60Table Driven Command Processor Functions Cmd… 61Time Processing Unit TU… 65Utility Functions execstr, flogf, Initflog, pdcfinfo, picodosver, sscan 71Virtual EEPROM Functions VEE… 74ABOUT THIS DOCUMENTThis <strong>API</strong> reference is meant to assist an experienced programmer who is familiar with the <strong>CF2</strong> softwarearchitecture. A companion document entitled; “<strong>CF2</strong> Programmer’s Guide” discusses issues involved withapplication development.PERSISTOR<strong>Instruments</strong> <strong>Inc</strong>.2 of 84<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>7/19/2005