HAL_ChibiOS: fixed build for boards with no USB

This commit is contained in:
Andrew Tridgell 2018-02-06 15:21:27 +11:00
parent 41758348e5
commit 626632989e

View File

@ -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))