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
d2c4dea658
commit
91460f1d4e
1 changed files with 17 additions and 17 deletions
|
|
@ -164,30 +164,30 @@ public:
|
|||
};
|
||||
|
||||
void EIO_Set(uv_work_t* req) {
|
||||
SetBaton* data = static_cast<SetBaton*>(req->data);
|
||||
// SetBaton* data = static_cast<SetBaton*>(req->data);
|
||||
|
||||
int bits;
|
||||
ioctl( data->fd, TIOCMGET, &bits );
|
||||
// int bits;
|
||||
// ioctl( data->fd, TIOCMGET, &bits );
|
||||
|
||||
bits &= ~(TIOCM_RTS | TIOCM_CTS | TIOCM_DTR | TIOCM_DSR);
|
||||
// bits &= ~(TIOCM_RTS | TIOCM_CTS | TIOCM_DTR | TIOCM_DSR);
|
||||
|
||||
if (data->rts) {
|
||||
bits |= TIOCM_RTS;
|
||||
}
|
||||
// if (data->rts) {
|
||||
// bits |= TIOCM_RTS;
|
||||
// }
|
||||
|
||||
if (data->cts) {
|
||||
bits |= TIOCM_CTS;
|
||||
}
|
||||
// if (data->cts) {
|
||||
// bits |= TIOCM_CTS;
|
||||
// }
|
||||
|
||||
if (data->dtr) {
|
||||
bits |= TIOCM_DTR;
|
||||
}
|
||||
// if (data->dtr) {
|
||||
// bits |= TIOCM_DTR;
|
||||
// }
|
||||
|
||||
if (data->dsr) {
|
||||
bits |= TIOCM_DSR;
|
||||
}
|
||||
// if (data->dsr) {
|
||||
// bits |= TIOCM_DSR;
|
||||
// }
|
||||
|
||||
data->result = ioctl( data->fd, TIOCMSET, &bits );
|
||||
// data->result = ioctl( data->fd, TIOCMSET, &bits );
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue