10.07.2015 Views

CF2 API Reference (PDF) - Persistor Instruments Inc

CF2 API Reference (PDF) - Persistor Instruments Inc

CF2 API Reference (PDF) - Persistor Instruments Inc

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>CIOprintf – Simple printf to consoleDescription:A simple printf to the console but without any floating point support.Prototype: short CIOprintf(const char *format, ...);Inputs:Returns:Args like printfThe number of characters written or negative if there was an errorCIOputc – Send a characterDescription:Prototype:Inputs:Returns:Send a character to the console with no '\n' to '\r'-'\n' translation.void CIOputc(char c);The character to sendNothingCIOputs – Send zero terminated stringDescription:Prototype:Inputs:Returns:Send a null (zero) terminated string to the console with no '\n' to '\r'-'\n' translation.void CIOputs(const char *str);*str is a pointer to a null terminated stringNothinggetch -- Wait for and return the next byteDescription:Prototype:Returns:Notes:This function will wait for and retrieve the next incoming byte on the main UART.short getch(void);Returns a short integer (16 bits) instead of a char (8 bits) as you might expect. The characterfetched is always in the LSB(low 8 bits) of the short.The CIO functions (on which the CIO related macros are based) explicitly mask off the high byteto appear the same as early versions.getch() is a macro to SCIRxGetChar()See STDIOWarning at end of this sectionkbflush -- Empty the input buffer and returnDescription:Prototype:kbflush() will empty the receive buffer and return immediately regardless of buffer contents orbuffering mode.void kbflush(void);Notes: kbflush() is a macro to (SCIRxGetCharWaitIdle(1) != 1)See STDIOWarning at end of this sectionPERSISTOR<strong>Instruments</strong> <strong>Inc</strong>.17 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!