From 36e978051f4da430a8e72669d332ad2128b1fe95 Mon Sep 17 00:00:00 2001 From: Drew Date: Wed, 15 Jul 2026 17:21:47 -0700 Subject: [PATCH 1/2] Write proof-of-concept rev3 interrupt callbacks --- driver | 2 +- init/rev3/config/Src/stm32h7xx_it.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/driver b/driver index 42a63d0f..ac408c9d 160000 --- a/driver +++ b/driver @@ -1 +1 @@ -Subproject commit 42a63d0fda862aa673b210b20bf40402efcf655b +Subproject commit ac408c9d50a64aca5b722e4dfc1e254f8d5e8d77 diff --git a/init/rev3/config/Src/stm32h7xx_it.c b/init/rev3/config/Src/stm32h7xx_it.c index 8e8df7d3..b13b635f 100644 --- a/init/rev3/config/Src/stm32h7xx_it.c +++ b/init/rev3/config/Src/stm32h7xx_it.c @@ -20,6 +20,9 @@ /* Includes ------------------------------------------------------------------*/ #include "main.h" #include "stm32h7xx_it.h" +#include "baro.h" +#include "sdr_pin_defines_A0010.h" + /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ /* USER CODE END Includes */ @@ -213,5 +216,26 @@ void OTG_HS_IRQHandler(void) } /* USER CODE BEGIN 1 */ +#if 0 // This is Proof-of-Concept Code, disabled to prevent breaking builds +void HAL_SPI_TxCpltCallback( SPI_HandleTypeDef *hspi ) { + if ( hspi == &( BARO_SPI ) ) { + baro_IT_handler(); + } +} +void HAL_SPI_TxRxCpltCallback( SPI_HandleTypeDef *hspi ) { + if ( hspi == &( BARO_SPI ) ) { + baro_IT_handler(); + } +} + +HAL_TIM_OC_DelayElapsedCallback( TIM_HandleTypeDef *htim ) { + // TODO add MICRO_TIM and BARO_TIM_CHANNEL macros to rev3 pin defines + if ( htim->Instance == MICRO_TIM ) { + if( htim->Channel == BARO_TIM_CHANNEL ) { + baro_IT_handler(); + } + } +} +#endif /* USER CODE END 1 */ From 3408dc4a3ca66cf89db57c7eb01fea3c9e09eeff Mon Sep 17 00:00:00 2001 From: Drew Date: Sat, 25 Jul 2026 20:54:23 -0700 Subject: [PATCH 2/2] Update interrupt callbacks for compatibility with BARO_EVENT --- driver | 2 +- init/rev3/config/Src/stm32h7xx_it.c | 6 +++--- mod | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/driver b/driver index ac408c9d..60dc30bc 160000 --- a/driver +++ b/driver @@ -1 +1 @@ -Subproject commit ac408c9d50a64aca5b722e4dfc1e254f8d5e8d77 +Subproject commit 60dc30bc1c3b1bf934fa0340115aced56b0fce7d diff --git a/init/rev3/config/Src/stm32h7xx_it.c b/init/rev3/config/Src/stm32h7xx_it.c index b13b635f..85b3a787 100644 --- a/init/rev3/config/Src/stm32h7xx_it.c +++ b/init/rev3/config/Src/stm32h7xx_it.c @@ -219,13 +219,13 @@ void OTG_HS_IRQHandler(void) #if 0 // This is Proof-of-Concept Code, disabled to prevent breaking builds void HAL_SPI_TxCpltCallback( SPI_HandleTypeDef *hspi ) { if ( hspi == &( BARO_SPI ) ) { - baro_IT_handler(); + baro_IT_handler(BARO_EVENT_TX_CPLT); } } void HAL_SPI_TxRxCpltCallback( SPI_HandleTypeDef *hspi ) { if ( hspi == &( BARO_SPI ) ) { - baro_IT_handler(); + baro_IT_handler(BARO_EVENT_TXRX_CPLT); } } @@ -233,7 +233,7 @@ HAL_TIM_OC_DelayElapsedCallback( TIM_HandleTypeDef *htim ) { // TODO add MICRO_TIM and BARO_TIM_CHANNEL macros to rev3 pin defines if ( htim->Instance == MICRO_TIM ) { if( htim->Channel == BARO_TIM_CHANNEL ) { - baro_IT_handler(); + baro_IT_handler(BARO_EVENT_DELAY_ELAPSED); } } } diff --git a/mod b/mod index 690f370d..95482a45 160000 --- a/mod +++ b/mod @@ -1 +1 @@ -Subproject commit 690f370d123ae97ce51bcff911b79703235791b8 +Subproject commit 95482a458fcd84dd52cbb0a70a7999c93e145feb