|
PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
Go to the documentation of this file.
56 #define FDSERIAL_BUFF_MASK 0x3f
61 #define FDSERIAL_MODE_NONE 0
66 #define FDSERIAL_MODE_INVERT_RX 1
71 #define FDSERIAL_MODE_INVERT_TX 2
77 #define FDSERIAL_MODE_OPENDRAIN_TX 4
82 #define FDSERIAL_MODE_IGNORE_TX_ECHO 8
87 #define FDSERIAL_MODE_RX_ONLY 16
92 #define FDSERIAL_MODE_ECHO_RX_TO_TX 32
int fdserial_rxReady(fdserial *term)
Check if a byte is ready in the receive buffer.
int fdserial_rxPeek(fdserial *term)
Get a byte from the receive buffer without changing the pointers. The function does not block.
int fdserial_rxTime(fdserial *term, int ms)
Gets a byte from the receive buffer if available, or wait for up to timeout ms to receive a byte.
int fdserial_txChar(fdserial *term, int txbyte)
Send a byte by adding it to the transmit buffer.
int fdserial_rxChar(fdserial *term)
Get a byte from the receive buffer, or if it's emtpy, wait until a byte is received.
int fdserial_txEmpty(fdserial *term)
Check if the transmit buffer is empty.
int fdserial_rxCount(fdserial *term)
Get number of bytes available in the receive buffer without receiving any. NOTE: This function is not...
Defines fdserial interface structure of 9 contiguous longs + buffers.
This library provides a collection of functions for communicating with text devices such as SimpleIDE...
void fdserial_rxFlush(fdserial *term)
Empties the receive buffer.
void fdserial_txFlush(fdserial *term)
Remove any bytes that might be waiting in the transmit buffer.
Structure that contains data used by simple text device libraries.
fdserial * fdserial_open(int rxpin, int txpin, int mode, int baudrate)
Open a full duplex serial connection.
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.
void fdserial_close(fdserial *term)
Stop stops the cog running the native assembly driver.
struct fdserial_struct fdserial_st
Defines fdserial interface structure of 9 contiguous longs + buffers.
text_t fdserial
Defines text_t data type as fdserial to allow declarations like fdserial *MyDevice....