From b8f12d118742fd40c768a3600250d9cfafa5f588 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sat, 8 Jun 2024 20:09:14 +1000 Subject: [PATCH] No movement pin --- source/Core/BSP/Sequre/Pins.h | 29 ++++++++++++-------------- source/Core/BSP/Sequre/Setup.cpp | 4 +++- source/Core/BSP/Sequre/configuration.h | 3 +-- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/source/Core/BSP/Sequre/Pins.h b/source/Core/BSP/Sequre/Pins.h index ab522f3f8..f00be339f 100644 --- a/source/Core/BSP/Sequre/Pins.h +++ b/source/Core/BSP/Sequre/Pins.h @@ -81,23 +81,20 @@ #define TIP_TEMP_ADC1_CHANNEL ADC_CHANNEL_5 #define TIP_TEMP_ADC2_CHANNEL ADC_CHANNEL_5 -#define VIN_Pin GPIO_PIN_4 -#define VIN_GPIO_Port GPIOA -#define VIN_ADC1_CHANNEL ADC_CHANNEL_4 -#define VIN_ADC2_CHANNEL ADC_CHANNEL_4 -#define KEY_B_Pin GPIO_PIN_0 -#define KEY_B_GPIO_Port GPIOB +#define VIN_Pin GPIO_PIN_4 +#define VIN_GPIO_Port GPIOA +#define VIN_ADC1_CHANNEL ADC_CHANNEL_4 +#define VIN_ADC2_CHANNEL ADC_CHANNEL_4 +#define KEY_B_Pin GPIO_PIN_0 +#define KEY_B_GPIO_Port GPIOB -#define PWM_Out_Pin GPIO_PIN_8 -#define PWM_Out_GPIO_Port GPIOB -#define PWM_Out_CHANNEL TIM_CHANNEL_3 // Timer 4; channel 3 -#define SCL2_Pin GPIO_PIN_6 -#define SCL2_GPIO_Port GPIOB -#define SDA2_Pin GPIO_PIN_7 -#define SDA2_GPIO_Port GPIOB -// Pin gets pulled high on movement -#define MOVEMENT_Pin GPIO_PIN_3 -#define MOVEMENT_GPIO_Port GPIOA +#define PWM_Out_Pin GPIO_PIN_8 +#define PWM_Out_GPIO_Port GPIOB +#define PWM_Out_CHANNEL TIM_CHANNEL_3 // Timer 4; channel 3 +#define SCL2_Pin GPIO_PIN_6 +#define SCL2_GPIO_Port GPIOB +#define SDA2_Pin GPIO_PIN_7 +#define SDA2_GPIO_Port GPIOB #endif // MODEL_T55 diff --git a/source/Core/BSP/Sequre/Setup.cpp b/source/Core/BSP/Sequre/Setup.cpp index 2f999fe4d..9546ab3e8 100644 --- a/source/Core/BSP/Sequre/Setup.cpp +++ b/source/Core/BSP/Sequre/Setup.cpp @@ -51,7 +51,8 @@ void Setup_HAL() { HAL_ADCEx_InjectedStart(&hadc1); // enable injected readings HAL_ADCEx_InjectedStart(&hadc2); // enable injected readings - // Setup movement pin +// Setup movement pin +#ifdef MOVEMENT_Pin { GPIO_InitTypeDef GPIO_InitStruct; GPIO_InitStruct.Pin = MOVEMENT_Pin; @@ -60,6 +61,7 @@ void Setup_HAL() { GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(MOVEMENT_GPIO_Port, &GPIO_InitStruct); } +#endif } uint16_t getADCHandleTemp(uint8_t sample) { diff --git a/source/Core/BSP/Sequre/configuration.h b/source/Core/BSP/Sequre/configuration.h index aa939c650..8a8345d4b 100644 --- a/source/Core/BSP/Sequre/configuration.h +++ b/source/Core/BSP/Sequre/configuration.h @@ -236,14 +236,13 @@ #define USB_PD_EPR_WATTAGE 0 /*No EPR*/ #define DEBUG_POWER_MENU_BUTTON_B 1 #define HAS_POWER_DEBUG_MENU -#define TEMP_NTC #define NO_ACCEL 1 #define I2C_SOFT_BUS_2 // For now we are doing software I2C to get around hardware chip issues #define OLED_I2CBB2 #define FILTER_DISPLAYED_TIP_TEMP 4 // Filtering for GUI display #define MODEL_HAS_DCDC // We dont have DC/DC but have reallly fast PWM that gets us roughly the same place -#endif /* S60P */ +#endif /* T55 */ #define FLASH_LOGOADDR (0x08000000 + (62 * 1024)) #define SETTINGS_START_PAGE (0x08000000 + (63 * 1024))