Skip to content

Commit

Permalink
platforms: add missing baudrate defines
Browse files Browse the repository at this point in the history
  • Loading branch information
julianoes committed Jul 28, 2024
1 parent fe7e998 commit b8c2f10
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions platforms/nuttx/src/px4/common/SerialImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,16 @@ bool SerialImpl::configure()

case 460800: speed = B460800; break;

#ifndef B500000
#define B500000 500000
#endif

case 500000: speed = B500000; break;

#ifndef B576000
#define B576000 576000
#endif

case 576000: speed = B576000; break;

#ifndef B921600
Expand All @@ -107,8 +115,16 @@ bool SerialImpl::configure()

case 921600: speed = B921600; break;

#ifndef B1000000
#define B1000000 1000000
#endif

case 1000000: speed = B1000000; break;

#ifndef B1500000
#define B1500000 1500000
#endif

case 1500000: speed = B1500000; break;

default:
Expand Down
16 changes: 16 additions & 0 deletions platforms/posix/src/px4/common/SerialImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,16 @@ bool SerialImpl::configure()

case 460800: speed = B460800; break;

#ifndef B500000
#define B500000 500000
#endif

case 500000: speed = B500000; break;

#ifndef B576000
#define B576000 576000
#endif

case 576000: speed = B576000; break;

#ifndef B921600
Expand All @@ -100,8 +108,16 @@ bool SerialImpl::configure()

case 921600: speed = B921600; break;

#ifndef B1000000
#define B1000000 1000000
#endif

case 1000000: speed = B1000000; break;

#ifndef B1500000
#define B1500000 1500000
#endif

case 1500000: speed = B1500000; break;

default:
Expand Down

0 comments on commit b8c2f10

Please sign in to comment.