MacOS doesn't have B460800
This commit is contained in:
parent
047b7d2006
commit
c452264a11
1 changed files with 5 additions and 1 deletions
|
@ -112,8 +112,10 @@ void rs232_set_speed(const serial_port sp, const uint32_t uiPortSpeed)
|
|||
break;
|
||||
case 230400: stPortSpeed = B230400;
|
||||
break;
|
||||
#ifdef B460800
|
||||
case 460800: stPortSpeed = B460800;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
ERR("Unable to set serial port speed to %d bauds. Speed value must be one of these constants: 9600 (default), 19200, 38400, 57600, 115200, 230400 or 460800.", uiPortSpeed);
|
||||
};
|
||||
|
@ -144,8 +146,10 @@ uint32_t rs232_get_speed(const serial_port sp)
|
|||
break;
|
||||
case B230400: uiPortSpeed = 230400;
|
||||
break;
|
||||
case B460800: uiPortSpeed = 460800;
|
||||
#ifdef B460800
|
||||
case 460800: uiPortSpeed = B460800;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
return uiPortSpeed;
|
||||
|
|
Loading…
Add table
Reference in a new issue