Baud rate setting

This commit is contained in:
cschwinne
2022-02-01 20:02:46 +01:00
parent 32286888e5
commit 00dbdc2267
8 changed files with 43 additions and 9 deletions

View File

@@ -21,9 +21,9 @@ enum class AdaState {
uint16_t currentBaud = 1152; //default baudrate 115200 (divided by 100)
void updateBaudRate(int rate){
void updateBaudRate(uint32_t rate){
uint16_t rate100 = rate/100;
if (rate100 == currentBaud) return;
if (rate100 == currentBaud || rate100 < 96) return;
currentBaud = rate100;
if (!pinManager.isPinAllocated(1) || pinManager.getPinOwner(1) == PinOwner::DebugOut){