PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
Go to the source code of this file.
Functions | |
fdserial * | fdserial_open (int rxpin, int txpin, int mode, int baudrate) |
Open a full duplex serial connection. More... | |
void | fdserial_close (fdserial *term) |
Stop stops the cog running the native assembly driver. More... | |
int | fdserial_txEmpty (fdserial *term) |
Check if the transmit buffer is empty. More... | |
int | fdserial_rxCheck (fdserial *term) |
Gets a byte from the receive buffer if available, but does not wait if there's nothing in the buffer. More... | |
int | fdserial_rxChar (fdserial *term) |
Get a byte from the receive buffer, or if it's emtpy, wait until a byte is received. More... | |
int | fdserial_txChar (fdserial *term, int txbyte) |
Send a byte by adding it to the transmit buffer. More... | |
Full Duplex Serial adapter module.
Copyright (c) 2008-2013, Steve Denson See end of file for terms of use.
Definition in file fdserial.c.
void fdserial_close | ( | fdserial * | term | ) |
Stop stops the cog running the native assembly driver.
*term | Device ID returned by fdserial_open. |
Definition at line 115 of file fdserial.c.
fdserial* fdserial_open | ( | int | rxpin, |
int | txpin, | ||
int | mode, | ||
int | baudrate | ||
) |
Open a full duplex serial connection.
rxpin | Serial receive input pin number. |
txpin | Serial transmit output pin number. |
mode | Set/clear bits to define mode: mode bit 0 = invert rx mode bit 1 = invert tx mode bit 2 = open-drain/source tx mode bit 3 = ignore tx echo on rx |
baudrate | Rate binary values are transmitted, like 115200, 57600,..., 9600 etc. |
Definition at line 20 of file fdserial.c.
int fdserial_rxChar | ( | fdserial * | term | ) |
Get a byte from the receive buffer, or if it's emtpy, wait until a byte is received.
*term | Device ID returned by fdserial_open. |
Oldest byte (0 to 255) in receive buffer
Definition at line 164 of file fdserial.c.
int fdserial_rxCheck | ( | fdserial * | term | ) |
Gets a byte from the receive buffer if available, but does not wait if there's nothing in the buffer.
*term | Device ID returned by fdserial_open. |
Definition at line 146 of file fdserial.c.
int fdserial_txChar | ( | fdserial * | term, |
int | txbyte | ||
) |
Send a byte by adding it to the transmit buffer.
*term | Device ID returned by fdserial_open. |
txbyte | is byte to send. |
Definition at line 176 of file fdserial.c.
int fdserial_txEmpty | ( | fdserial * | term | ) |
Check if the transmit buffer is empty.
*term | Device ID returned by fdserial_open. |
Definition at line 135 of file fdserial.c.