mirror of
https://github.com/apache/nuttx.git
synced 2026-08-18 01:49:24 +08:00
arch/kinetis: initializers clobbering rx_pin instead of enable_high
The `rx_pin` configuration when `CONFIG_KINETIS_FLEXCAN2` is defined is overwritten if `PIN_CAN2_ENABLE` is defined, breaking the flexcan config for Kinetis MCU. Additionally, the `.enable_high` configuration points to a non-defined constant/macro (looks like a legacy from the first driver definition). Based on regularly maintained drivers (such as s32k3), this was changed to `CAN2_ENABLE_OUT` Signed-off-by: Javier Alonso <javieralonso@geotab.com>
This commit is contained in:
committed by
Alin Jerpelea
parent
8730a75687
commit
2a777381d6
@@ -268,11 +268,11 @@ static const struct flexcan_config_s kinetis_flexcan2_config =
|
||||
.tx_pin = PIN_CAN2_TX,
|
||||
.rx_pin = PIN_CAN2_RX,
|
||||
#ifdef PIN_CAN2_ENABLE
|
||||
.enable_pin = PIN_CAN2_ENABLE,
|
||||
.rx_pin = CAN2_ENABLE_HIGH,
|
||||
.enable_pin = PIN_CAN2_ENABLE,
|
||||
.rx_pin = CAN2_ENABLE_OUT,
|
||||
#else
|
||||
.enable_pin = 0,
|
||||
.rx_pin = 0,
|
||||
.enable_pin = 0,
|
||||
.enable_high = 0,
|
||||
#endif
|
||||
.bus_irq = KINETIS_IRQ_CAN2_BUS,
|
||||
.error_irq = KINETIS_IRQ_CAN2_ERROR,
|
||||
|
||||
Reference in New Issue
Block a user