mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-26 02:47:17 +00:00
Bug fix possibly for windows.
This commit is contained in:
parent
a742c97279
commit
d2c4dea658
1 changed files with 29 additions and 0 deletions
|
|
@ -163,6 +163,35 @@ public:
|
|||
NanCallback* disconnectedCallback;
|
||||
};
|
||||
|
||||
void EIO_Set(uv_work_t* req) {
|
||||
SetBaton* data = static_cast<SetBaton*>(req->data);
|
||||
|
||||
int bits;
|
||||
ioctl( data->fd, TIOCMGET, &bits );
|
||||
|
||||
bits &= ~(TIOCM_RTS | TIOCM_CTS | TIOCM_DTR | TIOCM_DSR);
|
||||
|
||||
if (data->rts) {
|
||||
bits |= TIOCM_RTS;
|
||||
}
|
||||
|
||||
if (data->cts) {
|
||||
bits |= TIOCM_CTS;
|
||||
}
|
||||
|
||||
if (data->dtr) {
|
||||
bits |= TIOCM_DTR;
|
||||
}
|
||||
|
||||
if (data->dsr) {
|
||||
bits |= TIOCM_DSR;
|
||||
}
|
||||
|
||||
data->result = ioctl( data->fd, TIOCMSET, &bits );
|
||||
|
||||
}
|
||||
|
||||
|
||||
void EIO_WatchPort(uv_work_t* req) {
|
||||
WatchPortBaton* data = static_cast<WatchPortBaton*>(req->data);
|
||||
data->bytesRead = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue