mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 02:18:29 -04:00
AP_HAL_ChibiOS: add hwdef config to enable CANFD support
This commit is contained in:
parent
5bc65bb54e
commit
72090d10da
@ -18,6 +18,8 @@ APJ_BOARD_ID 140
|
|||||||
|
|
||||||
FLASH_SIZE_KB 2048
|
FLASH_SIZE_KB 2048
|
||||||
|
|
||||||
|
CANFD_SUPPORTED 1
|
||||||
|
|
||||||
# with 2M flash we can afford to optimize for speed
|
# with 2M flash we can afford to optimize for speed
|
||||||
env OPTIMIZE -O2
|
env OPTIMIZE -O2
|
||||||
|
|
||||||
|
@ -689,6 +689,13 @@ def enable_can(f):
|
|||||||
if 'CAN' in bytype and mcu_type.startswith("STM32F3"):
|
if 'CAN' in bytype and mcu_type.startswith("STM32F3"):
|
||||||
f.write('#define CAN1_BASE CAN_BASE\n')
|
f.write('#define CAN1_BASE CAN_BASE\n')
|
||||||
env_vars['HAL_NUM_CAN_IFACES'] = str(len(base_list))
|
env_vars['HAL_NUM_CAN_IFACES'] = str(len(base_list))
|
||||||
|
canfd_supported = get_config('CANFD_SUPPORTED', 0, required=False)
|
||||||
|
if canfd_supported:
|
||||||
|
f.write('#define HAL_CANFD_SUPPORTED 1\n')
|
||||||
|
env_vars['HAL_CANFD_SUPPORTED'] = 1
|
||||||
|
else:
|
||||||
|
f.write('#define HAL_CANFD_SUPPORTED 0\n')
|
||||||
|
env_vars['HAL_CANFD_SUPPORTED'] = 0
|
||||||
|
|
||||||
|
|
||||||
def has_sdcard_spi():
|
def has_sdcard_spi():
|
||||||
|
Loading…
Reference in New Issue
Block a user