Skip to content

Commit 7234ec2

Browse files
committed
HAL_ChibiOS: fixed USB pass-thru for 2nd USB endpoint
we need to align the endpoint ID in the structure
1 parent edf9fbd commit 7234ec2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1876,13 +1876,13 @@ def write_UART_config(self, f):
18761876

18771877
if dev.startswith('OTG2'):
18781878
f.write(
1879-
'#define HAL_%s_CONFIG {(BaseSequentialStream*) &SDU2, 2, true, false, 0, 0, false, 0, 0, 2}\n'
1879+
'#define HAL_%s_CONFIG {(BaseSequentialStream*) &SDU2, 2, true, false, 0, 0, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2}\n'
18801880
% dev)
18811881
OTG2_index = uart_list.index(dev)
18821882
self.dual_USB_enabled = True
18831883
elif dev.startswith('OTG'):
18841884
f.write(
1885-
'#define HAL_%s_CONFIG {(BaseSequentialStream*) &SDU1, 1, true, false, 0, 0, false, 0, 0, 0}\n'
1885+
'#define HAL_%s_CONFIG {(BaseSequentialStream*) &SDU1, 1, true, false, 0, 0, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}\n'
18861886
% dev)
18871887
else:
18881888
need_uart_driver = True

0 commit comments

Comments
 (0)