HAL_ChibiOS: fixed build on boards with less than max uarts

This commit is contained in:
Andrew Tridgell 2019-07-12 15:18:31 +10:00
parent 1919268801
commit 2f0a4ff1ab
1 changed files with 1 additions and 1 deletions

View File

@ -894,7 +894,7 @@ def write_UART_config(f):
% (devnames[idx], devnames[idx], sdev))
sdev += 1
idx += 1
for idx in range(len(uart_list), 7):
for idx in range(len(uart_list), len(devnames)):
f.write('#define HAL_UART%s_DRIVER Empty::UARTDriver uart%sDriver\n' %
(devnames[idx], devnames[idx]))