180,15 → 180,20 |
// do some sort of bitwise operations here.... |
if( ( state & 0x01 ) > 0 ){ |
s.carrierDetect = true; |
}else if( ( state & (0x01 << 1 ) ) > 0 ){ |
} |
if( ( state & (0x01 << 1 ) ) > 0 ){ |
s.clearToSend = true; |
}else if( ( state & (0x01 << 2 ) ) > 0 ){ |
} |
if( ( state & (0x01 << 2 ) ) > 0 ){ |
s.dataSetReady = true; |
}else if( ( state & (0x01 << 3 ) ) > 0 ){ |
} |
if( ( state & (0x01 << 3 ) ) > 0 ){ |
s.dataTerminalReady = true; |
}else if( ( state & (0x01 << 4 ) ) > 0 ){ |
} |
if( ( state & (0x01 << 4 ) ) > 0 ){ |
s.requestToSend = true; |
}else if( ( state & (0x01 << 5 ) ) > 0 ){ |
} |
if( ( state & (0x01 << 5 ) ) > 0 ){ |
s.ringIndicator = true; |
} |
|
357,15 → 362,20 |
state = getSerialLineStateInternalNonblocking(); |
if( ( state & 0x01 ) > 0 ){ |
s.carrierDetect = true; |
}else if( ( state & (0x01 << 1 ) ) > 0 ){ |
} |
if( ( state & (0x01 << 1 ) ) > 0 ){ |
s.clearToSend = true; |
}else if( ( state & (0x01 << 2 ) ) > 0 ){ |
} |
if( ( state & (0x01 << 2 ) ) > 0 ){ |
s.dataSetReady = true; |
}else if( ( state & (0x01 << 3 ) ) > 0 ){ |
} |
if( ( state & (0x01 << 3 ) ) > 0 ){ |
s.dataTerminalReady = true; |
}else if( ( state & (0x01 << 4 ) ) > 0 ){ |
} |
if( ( state & (0x01 << 4 ) ) > 0 ){ |
s.requestToSend = true; |
}else if( ( state & (0x01 << 5 ) ) > 0 ){ |
} |
if( ( state & (0x01 << 5 ) ) > 0 ){ |
s.ringIndicator = true; |
} |
|
580,7 → 590,15 |
} |
|
setSerialLineStateInternal( state ); |
|
//Now, because Windows is weird, we need to post a serial changed event here. |
//however, since we can only set DTR and RTS, only post an event if those are |
//the things that changed |
if( this.state.dataTerminalReady != state.dataTerminalReady || |
this.state.requestToSend != state.requestToSend ){ |
this.postSerialChangedEvent( state ); |
} |
} |
|
/** |
* Get the baud rate of the serial port. |