mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
Add UART9/10 support.
* UART9 was supported as LPUART on some H7s. * Newer 100-pin H7 CPUs support UART9 and USART10. * 100+ pin devices support higher numbered UARTS than UART10. Use USE_LPUART instead of hacking into UART9 for clarity. * LPUARTS are different from other types of UARTS. * They need different ID ranges. * They have and different capabilities. * Renumber LPUART1 to 40. 0-19 reserved for UART1-20 40-49 onwards for LPUART instances. It makes sense to treat them as a different class of UART. Just like we do for softserial, vcp, etc.
This commit is contained in:
parent
025ee87a7a
commit
263c5fa373
15 changed files with 201 additions and 26 deletions
|
@ -94,7 +94,10 @@ const serialPortIdentifier_e serialPortIdentifiers[SERIAL_PORT_COUNT] = {
|
|||
SERIAL_PORT_USART8,
|
||||
#endif
|
||||
#ifdef USE_UART9
|
||||
SERIAL_PORT_LPUART1,
|
||||
SERIAL_PORT_UART9_INSTANCE,
|
||||
#endif
|
||||
#ifdef USE_UART10
|
||||
SERIAL_PORT_UART10_INSTANCE,
|
||||
#endif
|
||||
#ifdef USE_SOFTSERIAL1
|
||||
SERIAL_PORT_SOFTSERIAL1,
|
||||
|
@ -395,7 +398,10 @@ serialPort_t *openSerialPort(
|
|||
case SERIAL_PORT_USART8:
|
||||
#endif
|
||||
#ifdef USE_UART9
|
||||
case SERIAL_PORT_LPUART1:
|
||||
case SERIAL_PORT_UART9:
|
||||
#endif
|
||||
#ifdef USE_UART10
|
||||
case SERIAL_PORT_USART10:
|
||||
#endif
|
||||
#if defined(SIMULATOR_BUILD)
|
||||
// emulate serial ports over TCP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue