1
0
Fork 0

Consider parity when calculating the duration of a serial frame. E-mail report by MB.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3756
This commit is contained in:
Ralf Grillenberger 2011-11-05 17:24:01 +00:00
parent 7603b90e45
commit 421e192559

View file

@ -223,7 +223,8 @@ void CSerial::changeLineProperties() {
else bitlen = (1000.0f/115200.0f)*(float)baud_divider;
bytetime=bitlen*(float)(1+5+1); // startbit + minimum length + stopbit
bytetime+= bitlen*(float)(LCR&0x3); // databits
if(LCR&0x4) bytetime+=bitlen; // stopbit
if(LCR&0x4) bytetime+=bitlen; // 2nd stopbit
if(LCR&0x8) bytetime+=bitlen; // parity
#if SERIAL_DEBUG
const char* const dbgtext[]={"none","odd","none","even","none","mark","none","space"};