getStopBits method
Returns the number of stop bits. See stopbits2Int for converting the result to an integer.
Implementation
StopBits getStopBits() {
_checkStatus();
switch (_getInt32Value(_nativeSerialGetStopbits)) {
case 1:
return StopBits.sb1;
case 2:
return StopBits.sb2;
}
throw SerialException(SerialErrorCode.errorCodeNotMappable,
'Unable to map stop bits to enum');
}