57 #include "rnr/rnrconfig.h" 65 #define EOL_CRLF "\r\n" // carriage-return,line-feed 68 #define EOL_LFCR "\n\r" // line-feed,carriage-return 71 #define EOL_CR "\r" // carriage-return 74 #define EOL_NL "\n" // line-feed 213 extern int SerDevPutc(
int fd, byte_t byte, uint_t usec);
ssize_t SerDevFIFOInputFlush(int fd)
Flush the input FIFO buffer, discarding all data in buffer.
ssize_t SerDevWriteLine(int fd, char *buffer, char *eol, uint_t usec)
Write null-terminated ASCII character line to serial device.
int SerDevOpen(const char *sSerDevName, int nBaudRate, int nByteSize, int cParity, int nStopBits, bool_t bRtsCts, bool_t bXonXoff)
Open and configure serial device for communication.
INLINE_IN_H bool_t SerDevIsInputDataPresent(int fd)
Checks to see if there are bytes in the input queue availabe to be read.
int SerDevDeassertCTS(int fd)
De-assert RTS (clear to send).
int SerDevSetByteSize(int fd, int nByteSize)
Set the byte size.
int SerDevSetSwFlowControl(int fd, bool_t bXonXoff)
Set software flow control state.
ssize_t SerDevFIFOInputCount(int fd)
Determine the number of bytes in the input FIFO of the serial device.
int SerDevClose(int fd)
Close serial device port.
ssize_t SerDevReadLine(int fd, char buffer[], size_t count, char *eol, uint_t usec)
Read a ASCII character line from the serial device.
int SerDevPutc(int fd, byte_t byte, uint_t usec)
Put one character to serial device.
ssize_t SerDevWrite(int fd, byte_t *buffer, size_t count, uint_t usec)
Write to serial device.
ssize_t SerDevRead(int fd, byte_t *buffer, size_t count, uint_t usec)
Read from the serial device.
int SerDevSetBaudRate(int fd, int nBaudRate)
Set the baudrate.
int SerDevGetc(int fd, uint_t usec)
Get 1 character from the serial device.
int SerDevDeassertRTS(int fd)
De-assert RTS (request to send).
int SerDevSetHwFlowControl(int fd, bool_t bRtsCts)
Set hardware flow control state.
void SerDevFIFOOutputFlush(int fd)
Flush output FIFO buffer, discarding all data in buffer.
void SerDevFIFOOutputDrain(int fd)
Transmit (drain) all data written to the output FIFO buffer.
int SerDevSetParity(int fd, int cParity)
Set the parity.
int SerDevAssertCTS(int fd)
Assert RTS (clear to send).
int SerDevSetStopBits(int fd, int nStopBitgs)
Set the number of stop bits.
int SerDevAssertRTS(int fd)
Assert RTS (request to send).