From 50208e4a1a302820c063a81c42d73951a635e6a5 Mon Sep 17 00:00:00 2001 From: Marcel Peterkau Date: Thu, 2 Mar 2023 17:38:57 +0100 Subject: [PATCH] fixed some PCB_rev-define-Stuff --- Software/src/common.h | 18 ++++++++++++------ Software/src/sanitycheck.h | 4 ++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Software/src/common.h b/Software/src/common.h index ece0342..727f087 100644 --- a/Software/src/common.h +++ b/Software/src/common.h @@ -4,16 +4,22 @@ #define Q(x) #x #define QUOTE(x) Q(x) -#if PCB_REV == 2 +#if PCB_REV == 1 #define GPIO_BUTTON D7 #define GPIO_LED D8 #define GPIO_TRIGGER D6 #define GPIO_PUMP D5 -#elif PCB_REV == 1 || PCB_REV == 3 - #define GPIO_BUTTON D5 - #define GPIO_LED D6 - #define GPIO_TRIGGER D4 - #define GPIO_PUMP D3 +#elif PCB_REV == 2 + #define GPIO_BUTTON D7 + #define GPIO_LED D8 + #define GPIO_TRIGGER D6 + #define GPIO_PUMP D5 +#elif PCB_REV == 3 + #define GPIO_BUTTON D4 + #define GPIO_LED D3 + #define GPIO_TRIGGER D6 + #define GPIO_PUMP D0 + #define GPIO_CS_CAN D8 #elif PCB_REV == 4 #define GPIO_BUTTON D4 #define GPIO_LED D3 diff --git a/Software/src/sanitycheck.h b/Software/src/sanitycheck.h index e8033a5..6da5368 100644 --- a/Software/src/sanitycheck.h +++ b/Software/src/sanitycheck.h @@ -8,11 +8,11 @@ #error "Unsupported PCB-Revision" #endif - #if PCB_REV < 4 && defined(FEATURE_ENABLE_CAN) + #if PCB_REV < 3 && defined(FEATURE_ENABLE_CAN) #error "CAN-Feature unsupported with this PCB-Rev" #endif #if PCB_REV < 4 && defined(DFEATURE_ENABLE_GPS) - #error "CAN-Feature unsupported with this PCB-Rev" + #error "GPS-Feature unsupported with this PCB-Rev" #endif #endif