diff --git a/sw/lib/ocaml/cserial.c b/sw/lib/ocaml/cserial.c index 35f4ffba60..e245878a71 100644 --- a/sw/lib/ocaml/cserial.c +++ b/sw/lib/ocaml/cserial.c @@ -35,7 +35,31 @@ #include #include -static int baudrates[] = { B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, B2400, B4800, B9600, B19200, B38400, B57600, B115200, B230400 }; +#include + +static int baudrates[] = { + B0, + B50, + B75, + B110, + B134, + B150, + B200, + B300, + B600, + B1200, + B1800, + B2400, + B4800, + B9600, + B19200, + B38400, + B57600, + B115200, + B230400, + B921600, + B1500000, + B3000000 }; /****************************************************************************/ diff --git a/sw/lib/ocaml/serial.ml b/sw/lib/ocaml/serial.ml index 795519cf10..4f94438c02 100644 --- a/sw/lib/ocaml/serial.ml +++ b/sw/lib/ocaml/serial.ml @@ -45,6 +45,9 @@ type speed = | B57600 | B115200 | B230400 + | B921600 + | B1500000 + | B3000000 let speed_of_baudrate = fun baudrate -> match baudrate with @@ -67,6 +70,9 @@ let speed_of_baudrate = fun baudrate -> | "57600" -> B57600 | "115200" -> B115200 | "230400" -> B230400 + | "921600" -> B921600 + | "1500000" -> B1500000 + | "3000000" -> B3000000 | _ -> invalid_arg "Serial.speed_of_baudrate" diff --git a/sw/lib/ocaml/serial.mli b/sw/lib/ocaml/serial.mli index 32195ff861..4b2b043436 100644 --- a/sw/lib/ocaml/serial.mli +++ b/sw/lib/ocaml/serial.mli @@ -44,6 +44,9 @@ type speed = | B57600 | B115200 | B230400 + | B921600 + | B1500000 + | B3000000 val speed_of_baudrate : string -> speed