NetBurner 3.5.0
PDF Version
 
serial.h File Reference

NetBurner Serial API. More...

#include <basictypes.h>

Go to the source code of this file.

Macros

#define SERIAL_ERR_NOSUCH_PORT   (-1)
 Port number does not exist.
 
#define SERIAL_ERR_PORT_NOTOPEN   (-2)
 Port is not open.
 
#define SERIAL_ERR_PORT_ALREADYOPEN   (-3)
 Port is already open.
 
#define SERIAL_ERR_PARAM_ERROR   (-4)
 Parameter error.
 
#define ADDR_ESCAPE_CHAR   (0xFF)
 Address escape character.
 
#define SimpleOpenSerial(p, b)   OpenSerial(p, b, 1, 8, eParityNone)
 Simple open a serial port.
 

Enumerations

enum  parity_mode {
  eParityNone , eParityOdd , eParityEven , eParityMulti ,
  eParityMultiOdd , eParityMultiEven
}
 Serial Parity Modes. More...
 

Functions

int OpenSerial (int portnum, unsigned int baudrate, int stop_bits, int data_bits, parity_mode parity)
 Open a serial port.
 
int OpenDefaultSerial ()
 Opens the Default serial port as defined by the Boot Config settings.
 
void SerialExpandRxBuffer (int fd, int nb)
 Expand the received serial buffer.
 
int SerialClose (int portnum)
 Close a serial port.
 
void SerialEnableTxFlow (int port, int enab)
 Enable transmit software flow control on the specified UART.
 
void SerialEnableRxFlow (int port, int enab)
 
void SerialEnableHwTxFlow (int port, int enab)
 
void SerialEnableHwRxFlow (int port, int enab)
 
void Serial485HalfDupMode (int port, int enab)
 
void SendBreak (int port, uint32_t time)
 
int serwriteaddress (int fd, const char c)
 
int GetUartErrorReg (int fd)
 
void SetRTS (int port, bool val)
 
BOOL SerialSendComplete (int fd)
 

Detailed Description

NetBurner Serial API.