Browse Source

HAL_ChibiOS: setup define for number of serial ports

master
Andrew Tridgell 5 years ago committed by Randy Mackay
parent
commit
49eb2de591
  1. 4
      libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py

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

@ -1030,6 +1030,10 @@ def write_UART_config(f): @@ -1030,6 +1030,10 @@ def write_UART_config(f):
#define HAL_USE_SERIAL HAL_USE_SERIAL_USB
#endif
''')
num_uarts = len(devlist)
if 'IOMCU_UART' in config:
num_uarts -= 1
f.write('#define HAL_UART_NUM_SERIAL_PORTS %u\n' % num_uarts)
def write_UART_config_bootloader(f):
'''write UART config defines'''

Loading…
Cancel
Save