Browse Source

HAL_ChibiOS: fixed build for boards with no USB

mission-4.1.18
Andrew Tridgell 7 years ago
parent
commit
626632989e
  1. 2
      libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py

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

@ -355,6 +355,8 @@ INCLUDE common.ld @@ -355,6 +355,8 @@ INCLUDE common.ld
def write_USB_config(f):
'''write USB config defines'''
if not 'OTG1' in bytype:
return;
f.write('// USB configuration\n')
f.write('#define HAL_USB_VENDOR_ID %s\n' % get_config('USB_VENDOR', default=0x0483)) # default to ST
f.write('#define HAL_USB_PRODUCT_ID %s\n' % get_config('USB_PRODUCT', default=0x5740))

Loading…
Cancel
Save