12 #include <sys/types.h> 25 #define BAUD_2400 2400 26 #define BAUD_4800 4800 27 #define BAUD_9600 9600 28 #define BAUD_57600 57600 29 #define BAUD_115200 115200 30 #define BAUD_230400 230400 31 #define BAUD_460800 460800 34 #define PARITY_ODD 'O' //奇数 35 #define PARITY_EVEN 'E' //偶数 36 #define PARITY_NONE 'N' //无奇偶校验位 53 int read(
char *buffer,
int length,
int timeout = 30);
56 int send(
const char* buffer,
int length,
int timeout = 30);
70 LSIOSR(std::string name,
int speed,
int fd);
76 int setOpt(
int nBits, uint8_t nEvent,
int nStop);
int waitWritable(int millis)
int waitReadable(int millis)
int read(char *buffer, int length, int timeout=30)
static LSIOSR * instance(std::string name, int speed, int fd=0)
int setPort(std::string name)
LSIOSR(std::string name, int speed, int fd)
int setOpt(int nBits, uint8_t nEvent, int nStop)
int send(const char *buffer, int length, int timeout=30)