From 3530f68ab59e356822b98efb8e7fd9f1c0e838bc Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Fri, 6 Nov 2020 20:07:45 +0000 Subject: [PATCH] stm32l4: correct build of stm32l4_can.c to respect L4 variant. Signed-off-by: Pavel Pisa --- arch/arm/src/stm32l4/stm32l4_can.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/src/stm32l4/stm32l4_can.c b/arch/arm/src/stm32l4/stm32l4_can.c index 3caca66823..c0d2536319 100644 --- a/arch/arm/src/stm32l4/stm32l4_can.c +++ b/arch/arm/src/stm32l4/stm32l4_can.c @@ -1076,12 +1076,12 @@ static int stm32l4can_ioctl(FAR struct can_dev_s *dev, int cmd, case CANIOC_SET_NART: { uint32_t regval; - ret = stm32can_enterinitmode(priv); + ret = stm32l4can_enterinitmode(priv); if (ret != 0) { return ret; } - regval = stm32can_getreg(priv, STM32_CAN_MCR_OFFSET); + regval = stm32l4can_getreg(priv, STM32_CAN_MCR_OFFSET); if (arg == 1) { regval |= CAN_MCR_NART; @@ -1090,20 +1090,20 @@ static int stm32l4can_ioctl(FAR struct can_dev_s *dev, int cmd, { regval &= ~CAN_MCR_NART; } - stm32can_putreg(priv, STM32_CAN_MCR_OFFSET, regval); - return stm32can_exitinitmode(priv); + stm32l4can_putreg(priv, STM32_CAN_MCR_OFFSET, regval); + return stm32l4can_exitinitmode(priv); } break; case CANIOC_SET_ABOM: { uint32_t regval; - ret = stm32can_enterinitmode(priv); + ret = stm32l4can_enterinitmode(priv); if (ret != 0) { return ret; } - regval = stm32can_getreg(priv, STM32_CAN_MCR_OFFSET); + regval = stm32l4can_getreg(priv, STM32_CAN_MCR_OFFSET); if (arg == 1) { regval |= CAN_MCR_ABOM; @@ -1112,8 +1112,8 @@ static int stm32l4can_ioctl(FAR struct can_dev_s *dev, int cmd, { regval &= ~CAN_MCR_ABOM; } - stm32can_putreg(priv, STM32_CAN_MCR_OFFSET, regval); - return stm32can_exitinitmode(priv); + stm32l4can_putreg(priv, STM32_CAN_MCR_OFFSET, regval); + return stm32l4can_exitinitmode(priv); } break;