CF2 API Reference (PDF) - Persistor Instruments Inc

CF2 API Reference (PDF) - Persistor Instruments Inc CF2 API Reference (PDF) - Persistor Instruments Inc

persistor.com
from persistor.com More from this publisher
10.07.2015 Views

CF2 API ReferenceConsole I/O Functions and MacrosSummary of Console I/O Functions and Macros The Console I/O functions provide patchable low levelaccess to your routines that interact with a user through a console interface. By default, all of these functionswork through the 68332 SCI (Serial Controller Interface), and all the PicoDOS command shell functions workthrough CIO functions, as do the default standard library console functions.CIOdrainCIOgetcCIOgetqCIOgetsCIOhexdumpCIOiflushCIOoflushCIOprintfCIOputcCIOputsgetchkbflushkbhitputchputflushputstruprintfWait for all transmissions to completeWait for, and return the next characterReturn non-zero count if input data is availableInput line with minimal editing featuresDump memory in hex and ASCII to the consoleFlush any pending input dataDiscard any queued transmit charactersSimple printf to consoleSend a characterSend zero terminated stringWait for and return the next byteEmpty the input buffer and returnDetect the availability of a character on the UARTWrites a byte out the main UARTWait for all transmission to completeWrite a NULL terminated string to the main UARTA clone of stdio's printf without floating point supportPERSISTORInstruments Inc.14 of 84CF2 API Reference7/19/2005

CF2 API ReferenceBelow are macros defined in along with their derivations.Red items are documented in this Console sectionBlue items are documented in the SCI sectionMACRO MAPS to MACRO MAPS TO FUNCTION USES BY DEFAULTkbhit() cgetq() CIOgetq() SCIRxQueuedCount()getch() cgetc() CIOgetc() SCIRxGetChar()kbflush() ciflush() CIOiflush() (SCIRxGetCharWaitIdle(1) !=putch(c) cputc(c) CIOputc(c) SCITxPutChar(c)putflush() cdrain() CIOdrain() SCITxWaitCompletion()coflush() CIOoflush() SCITxFlush()cgetclp(x) CIOgetclp(x) SCIRxGetChar() + low powercgetclp(x) CIOgetclp(x) SCIRxGetChar() + low powergetstr(s,n) cgets(s,n) CIOgets(s,n) uses CIOgetcputstr(s) cputs(s) CIOputs(s) uses CIOputc with CR-LFuprintf cprintf CIOprintf uses CIOputc with CR-LFcsprintf CIOsprintf uses no I/Ocvprintf CIOvprintf uses CIOputc with CR-LFhexdump chexdump CIOhexdump uses CIOputc/CIOgetqcstructdump(st)carraydump(ar)chexdump((void*)&st,(ulong)&st,1,sizeof(st))chexdump((void*)ar,(ulong)&ar,sizeof(*ar),sizeof(ar))CIOdrain – Wait for all transmissions to completeDescription:Prototype:Inputs:Returns:Forces and waits for all characters in the transmit buffer to be transmitted.void CIOdrain(void);NothingNothingCIOgetc – Wait for, and return the next characterDescription:Prototype:Inputs:Returns:Wait for the next input character.short CIOgetc(void);NoneThe character received.PERSISTORInstruments Inc.15 of 84CF2 API Reference7/19/2005

<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>Console I/O Functions and MacrosSummary of Console I/O Functions and Macros The Console I/O functions provide patchable low levelaccess to your routines that interact with a user through a console interface. By default, all of these functionswork through the 68332 SCI (Serial Controller Interface), and all the PicoDOS command shell functions workthrough CIO functions, as do the default standard library console functions.CIOdrainCIOgetcCIOgetqCIOgetsCIOhexdumpCIOiflushCIOoflushCIOprintfCIOputcCIOputsgetchkbflushkbhitputchputflushputstruprintfWait for all transmissions to completeWait for, and return the next characterReturn non-zero count if input data is availableInput line with minimal editing featuresDump memory in hex and ASCII to the consoleFlush any pending input dataDiscard any queued transmit charactersSimple printf to consoleSend a characterSend zero terminated stringWait for and return the next byteEmpty the input buffer and returnDetect the availability of a character on the UARTWrites a byte out the main UARTWait for all transmission to completeWrite a NULL terminated string to the main UARTA clone of stdio's printf without floating point supportPERSISTOR<strong>Instruments</strong> <strong>Inc</strong>.14 of 84<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>7/19/2005

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!