From 70ef49418ba60c5cba87a32018a614c09e9e4288 Mon Sep 17 00:00:00 2001 From: Peter Poetzi Date: Thu, 3 Feb 2022 21:17:51 +0100 Subject: [PATCH] add more hall configs --- defines.h | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/defines.h b/defines.h index 9b839c0..55d2592 100644 --- a/defines.h +++ b/defines.h @@ -23,7 +23,20 @@ #include "stm32f1xx_hal.h" #ifdef PETERS_PLATINE -#ifdef HALL_BCA + +#ifdef HALL_CAB + #define LEFT_HALL_U_PIN GPIO_PIN_11 + #define LEFT_HALL_V_PIN GPIO_PIN_12 + #define LEFT_HALL_W_PIN GPIO_PIN_10 +#elif HALL_CBA + #define LEFT_HALL_U_PIN GPIO_PIN_11 + #define LEFT_HALL_V_PIN GPIO_PIN_10 + #define LEFT_HALL_W_PIN GPIO_PIN_12 +#elif HALL_BAC + #define LEFT_HALL_U_PIN GPIO_PIN_10 + #define LEFT_HALL_V_PIN GPIO_PIN_12 + #define LEFT_HALL_W_PIN GPIO_PIN_11 +#elif HALL_BCA #define LEFT_HALL_U_PIN GPIO_PIN_10 #define LEFT_HALL_V_PIN GPIO_PIN_11 #define LEFT_HALL_W_PIN GPIO_PIN_12 @@ -41,7 +54,19 @@ #define LEFT_HALL_V_PORT GPIOC #define LEFT_HALL_W_PORT GPIOC -#ifdef HALL_BCA +#ifdef HALL_CAB + #define RIGHT_HALL_U_PIN GPIO_PIN_6 + #define RIGHT_HALL_V_PIN GPIO_PIN_5 + #define RIGHT_HALL_W_PIN GPIO_PIN_7 +#elif HALL_CBA + #define RIGHT_HALL_U_PIN GPIO_PIN_6 + #define RIGHT_HALL_V_PIN GPIO_PIN_7 + #define RIGHT_HALL_W_PIN GPIO_PIN_5 +#elif HALL_BAC + #define RIGHT_HALL_U_PIN GPIO_PIN_7 + #define RIGHT_HALL_V_PIN GPIO_PIN_5 + #define RIGHT_HALL_W_PIN GPIO_PIN_6 +#elif HALL_BCA #define RIGHT_HALL_U_PIN GPIO_PIN_7 #define RIGHT_HALL_V_PIN GPIO_PIN_6 #define RIGHT_HALL_W_PIN GPIO_PIN_5