From 89d7aaca082683a3cc8e76a20da317ee3ce03acf Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Thu, 19 Nov 2026 15:37:42 +0100 Subject: [PATCH] fix(stm32_def): guard CAN1 and DAC1 aliases on base peripheral Only define CAN1 as CAN and DAC1 as DAC when CAN or DAC is actually defined, avoiding bogus aliases to undefined symbols. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Frederic Pillon --- libraries/SrcWrapper/inc/stm32_def.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/SrcWrapper/inc/stm32_def.h b/libraries/SrcWrapper/inc/stm32_def.h index 422c590cc5..e23db0ab94 100644 --- a/libraries/SrcWrapper/inc/stm32_def.h +++ b/libraries/SrcWrapper/inc/stm32_def.h @@ -97,10 +97,10 @@ #if !defined (ADC1) && defined (ADC) #define ADC1 ADC #endif -#ifndef CAN1 +#if !defined(CAN1) && defined(CAN) #define CAN1 CAN #endif -#ifndef DAC1 +#if !defined(DAC1) && defined(DAC) #define DAC1 DAC #endif