Skip to content

Commit ed5f776

Browse files
committed
Fixes
1 parent 08ceded commit ed5f776

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

src/current_sense/hardware_specific/stm32/stm32_dma.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "../../hardware_api.h"
2+
13
#if defined(_STM32_DEF_)
24

35
#include "stm32_dma.h"

src/current_sense/hardware_specific/stm32/stm32_dma.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
#include "Arduino.h"
44
#include "../../../communication/SimpleFOCDebug.h"
55
#include "stm32_adc.h"
6+
#include "../../hardware_api.h"
7+
8+
#if defined(_STM32_DEF_)
69

710
int _init_DMA(ADC_HandleTypeDef *hadc);
811
int _start_DMA_ADC(ADC_HandleTypeDef* hadc);
@@ -17,4 +20,6 @@ DMA_Channel_TypeDef *_getDMAChannel(int index);
1720
DMA_Stream_TypeDef *_getDMAStream(int index);
1821
#endif
1922

23+
24+
#endif
2025
#endif

src/current_sense/hardware_specific/stm32/stm32_opamp.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#include "stm32_opamp.h"
2+
#include "../../hardware_api.h"
3+
4+
#if defined(_STM32_DEF_)
25

36
#ifdef HAL_OPAMP_MODULE_ENABLED
47
OPAMP_HandleTypeDef hopamp1;
@@ -45,4 +48,5 @@ int _init_OPAMPs(void){
4548
return 0;
4649
}
4750

51+
#endif
4852
#endif

src/current_sense/hardware_specific/stm32/stm32_opamp.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
#define STM32_OPAMP_DEF
33
#include "Arduino.h"
44
#include "../../../communication/SimpleFOCDebug.h"
5+
#include "../../hardware_api.h"
56

6-
7+
#if defined(_STM32_DEF_)
78
#ifdef HAL_OPAMP_MODULE_ENABLED
89
int _init_OPAMP(OPAMP_HandleTypeDef *hopamp, OPAMP_TypeDef *OPAMPx_Def);
910
int _init_OPAMPs(void);
1011
#endif
11-
12+
#endif
1213
#endif

0 commit comments

Comments
 (0)