mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
Fix for undefined baudrates at Mac OS (see #1840)
This commit is contained in:
@@ -35,6 +35,29 @@
|
||||
#include <caml/alloc.h>
|
||||
#include <caml/memory.h>
|
||||
|
||||
/* MacOS doesn't support higher baudrates (>230400B) */
|
||||
#ifdef __APPLE__
|
||||
static int baudrates[] = {
|
||||
B0,
|
||||
B50,
|
||||
B75,
|
||||
B110,
|
||||
B134,
|
||||
B150,
|
||||
B200,
|
||||
B300,
|
||||
B600,
|
||||
B1200,
|
||||
B1800,
|
||||
B2400,
|
||||
B4800,
|
||||
B9600,
|
||||
B19200,
|
||||
B38400,
|
||||
B57600,
|
||||
B115200,
|
||||
B230400 };
|
||||
#else /* regular Linux with higher baudrates */
|
||||
static int baudrates[] = {
|
||||
B0,
|
||||
B50,
|
||||
@@ -58,6 +81,8 @@ static int baudrates[] = {
|
||||
B921600,
|
||||
B1500000,
|
||||
B3000000 };
|
||||
#endif /* ifdef __APPLE__ */
|
||||
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user