Browse Source

HAL_ChibiOS: added max uarts check

c415-sdk
Andrew Tridgell 5 years ago
parent
commit
ab0f1a8887
  1. 2
      libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py

2
libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py

@ -1122,6 +1122,8 @@ def write_UART_config(f): @@ -1122,6 +1122,8 @@ def write_UART_config(f):
num_uarts = len(devlist)
if 'IOMCU_UART' in config:
num_uarts -= 1
if num_uarts > 8:
error("Exceeded max num UARTs of 8 (%u)" % num_uarts)
f.write('#define HAL_UART_NUM_SERIAL_PORTS %u\n' % (num_uarts+num_empty_uarts))

Loading…
Cancel
Save