getDataBits method
Returns the number of data bits. See databits2Int for converting the result to an integer.
Implementation
DataBits getDataBits() {
_checkStatus();
switch (_getInt32Value(_nativeSerialGetDatabits)) {
case 5:
return DataBits.db5;
case 6:
return DataBits.db6;
case 7:
return DataBits.db7;
case 8:
return DataBits.db8;
}
throw SerialException(SerialErrorCode.errorCodeNotMappable,
'Unable to map data bits to enum');
}