Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Candas1 committed Aug 18, 2024
1 parent 08ceded commit ed5f776
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/current_sense/hardware_specific/stm32/stm32_dma.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include "../../hardware_api.h"

#if defined(_STM32_DEF_)

#include "stm32_dma.h"
Expand Down
5 changes: 5 additions & 0 deletions src/current_sense/hardware_specific/stm32/stm32_dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
#include "Arduino.h"
#include "../../../communication/SimpleFOCDebug.h"
#include "stm32_adc.h"
#include "../../hardware_api.h"

#if defined(_STM32_DEF_)

int _init_DMA(ADC_HandleTypeDef *hadc);
int _start_DMA_ADC(ADC_HandleTypeDef* hadc);
Expand All @@ -17,4 +20,6 @@ DMA_Channel_TypeDef *_getDMAChannel(int index);
DMA_Stream_TypeDef *_getDMAStream(int index);
#endif


#endif
#endif
4 changes: 4 additions & 0 deletions src/current_sense/hardware_specific/stm32/stm32_opamp.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#include "stm32_opamp.h"
#include "../../hardware_api.h"

#if defined(_STM32_DEF_)

#ifdef HAL_OPAMP_MODULE_ENABLED
OPAMP_HandleTypeDef hopamp1;
Expand Down Expand Up @@ -45,4 +48,5 @@ int _init_OPAMPs(void){
return 0;
}

#endif
#endif
5 changes: 3 additions & 2 deletions src/current_sense/hardware_specific/stm32/stm32_opamp.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
#define STM32_OPAMP_DEF
#include "Arduino.h"
#include "../../../communication/SimpleFOCDebug.h"
#include "../../hardware_api.h"


#if defined(_STM32_DEF_)
#ifdef HAL_OPAMP_MODULE_ENABLED
int _init_OPAMP(OPAMP_HandleTypeDef *hopamp, OPAMP_TypeDef *OPAMPx_Def);
int _init_OPAMPs(void);
#endif

#endif
#endif

0 comments on commit ed5f776

Please sign in to comment.