Tollos – tollosUART.c | ||||||||||
Libraries
Background
|
tollosUART.c – UART serial device functions The UART functions provide character I/O over a serial link.
uartGetc – get character from UART device int uartGetc(uint uart);
uart – ID number of UART to read
returns character read from UART, or −1 if none there or UART does not exist This function does not block. It returns an int so that errors are distinct, and will also allow extension. uartInit – initialize serial UART device int uartInit(uint uart, uint baud);
uart – ID number of UART to initialize baud – rate to run uart communications
returns 0 if OK, or −1 if uart does not exist uartPutc – send character to UART device int uartPutc(uint uart, int ch);
uart – ID number of UART to send character to ch – character to send
returns 0 if OK, or −1 if uart does not exist This waits for any previous send to complete. The character, ch, is an int to allow future extension. |
Tollos and these web pages were written by Mike Cowlishaw; Please send me any corrections, suggestions, etc. | |
All content © Mike Cowlishaw, 2010–2012, except where marked
otherwise. All rights reserved. The pages here are for non-commercial
use only (see the separate licence for Tollos source code).
Privacy policy: the Speleotrove website
records no personal information and sets no ‘cookies’.
However, statistics, etc. might be recorded by the web hosting
service.
This page was last updated on 2010-12-03 by c2wiki. |