1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

Added 3 more baudrate options for windows users .. 230400, 460800 & 921600

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2715 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
pip 2011-02-03 13:13:29 +00:00 committed by pip
parent 3bad7982dd
commit 7643cd2016
2 changed files with 21 additions and 3 deletions

View File

@ -73,7 +73,10 @@ enum BaudRateType
BAUD76800, //POSIX ONLY
BAUD115200,
BAUD128000, //WINDOWS ONLY
BAUD256000 //WINDOWS ONLY
BAUD230400, //WINDOWS ONLY
BAUD256000, //WINDOWS ONLY
BAUD460800, //WINDOWS ONLY
BAUD921600 //WINDOWS ONLY
};
enum DataBitsType

View File

@ -695,12 +695,27 @@ void QextSerialPort::setBaudRate(BaudRateType baudRate) {
Win_CommConfig.dcb.BaudRate=CBR_128000;
break;
/*256000 baud*/
/*230400 baud*/
case BAUD230400:
Win_CommConfig.dcb.BaudRate=CBR_230400;
break;
/*256000 baud*/
case BAUD256000:
TTY_PORTABILITY_WARNING("QextSerialPort Portability Warning: POSIX does not support 256000 baud operation.");
Win_CommConfig.dcb.BaudRate=CBR_256000;
break;
}
/*460800 baud*/
case BAUD460800:
Win_CommConfig.dcb.BaudRate=CBR_460800;
break;
/*921600 baud*/
case BAUD921600:
Win_CommConfig.dcb.BaudRate=CBR_921600;
break;
}
SetCommConfig(Win_Handle, &Win_CommConfig, sizeof(COMMCONFIG));
}
}