From f1ef5daa92fbe5c7f5339c69432c735ee2f4015e Mon Sep 17 00:00:00 2001 From: Michal Lenc Date: Thu, 4 Jul 2024 19:58:23 +0200 Subject: [PATCH] samv7/sam_mcan.c: fix TSEG1, TSEG2 and SJW compile warnings for MCAN1 Following warnings were caused by incorrect naming of few defines. chip/sam_mcan.c:415:7: warning: "MCAN1_NTSEG1" is not defined, evaluates to 0 [-Wundef] 415 | # if MCAN1_NTSEG1 > 63 | ^~~~~~~~~~~~ chip/sam_mcan.c:418:7: warning: "MCAN1_NTSEG2" is not defined, evaluates to 0 [-Wundef] 418 | # if MCAN1_NTSEG2 > 15 | ^~~~~~~~~~~~ chip/sam_mcan.c:421:7: warning: "MCAN1_NSJW" is not defined, evaluates to 0 [-Wundef] 421 | # if MCAN1_NSJW > 15 Signed-off-by: Michal Lenc --- arch/arm/src/samv7/sam_mcan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/src/samv7/sam_mcan.c b/arch/arm/src/samv7/sam_mcan.c index 96cebedd85..0f98953c5b 100644 --- a/arch/arm/src/samv7/sam_mcan.c +++ b/arch/arm/src/samv7/sam_mcan.c @@ -412,13 +412,13 @@ (float)CONFIG_SAMV7_MCAN1_BITRATE)) - 1)) # define MCAN1_SJW (CONFIG_SAMV7_MCAN1_FSJW - 1) -# if MCAN1_NTSEG1 > 63 +# if MCAN1_TSEG1 > 63 # error Invalid MCAN1 NTSEG1 # endif -# if MCAN1_NTSEG2 > 15 +# if MCAN1_TSEG2 > 15 # error Invalid MCAN1 NTSEG2 # endif -# if MCAN1_NSJW > 15 +# if MCAN1_SJW > 15 # error Invalid MCAN1 NSJW # endif