RS232 serial i/o.
More...
#include "Serial.h"
#include "Utils/Log.h"
#include "Utils/Exception.h"
#include <QString>
#include <fcntl.h>
#include <termios.h>
#include <sys/ioctl.h>
#include <unistd.h>
|
#define | INVALID_HANDLE_VALUE (-1) |
|
#define | S_WRITE(p, b, li, lo) (lo = write(p, b, li)) |
|
#define | S_READ(p, b, li, lo) (lo = read (p, b, li)) |
|
#define | S_LEN ssize_t |
|
#define | S_FLUSH(p) tcdrain(p) |
|
#define | S_PURGE(p) tcflush(p,TCIOFLUSH) |
|
#define | S_CLOSE(p) ::close(p) |
|
RS232 serial i/o.
- Author
- JD Gascuel.
- Copyright
- (c) 2011-2016 JD Gascuel. All rights reserved.
- Id
- Serial.cpp,v 52db1e7f5e3c 2016/07/07 15:05:40 jDG
#define INVALID_HANDLE_VALUE (-1) |
#define S_CLOSE |
( |
|
p | ) |
::close(p) |
#define S_FLUSH |
( |
|
p | ) |
tcdrain(p) |
#define S_PURGE |
( |
|
p | ) |
tcflush(p,TCIOFLUSH) |
#define S_READ |
( |
|
p, |
|
|
|
b, |
|
|
|
li, |
|
|
|
lo |
|
) |
| (lo = read (p, b, li)) |
#define S_WRITE |
( |
|
p, |
|
|
|
b, |
|
|
|
li, |
|
|
|
lo |
|
) |
| (lo = write(p, b, li)) |