Skip to content

Commit 5d06560

Browse files
committed
FIX remove init by default of pin names
1 parent 493273f commit 5d06560

File tree

4 files changed

+3
-2
lines changed

4 files changed

+3
-2
lines changed

src/current_sense/hardware_api.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// will be returned as a void pointer from the _configureADCx functions
1313
// will be provided to the _readADCVoltageX() as a void pointer
1414
typedef struct GenericCurrentSenseParams {
15-
int pins[3]={(int)NOT_SET};
15+
int pins[3];
1616
float adc_voltage_conv;
1717
} GenericCurrentSenseParams;
1818

src/current_sense/hardware_specific/stm32/b_g431/b_g431_mcu.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "b_g431_hal.h"
66
#include "Arduino.h"
77
#include "../stm32_mcu.h"
8+
#include "../../../../drivers/hardware_specific/stm32_mcu.h"
89

910
#define _ADC_VOLTAGE 3.3f
1011
#define _ADC_RESOLUTION 4096.0f

src/current_sense/hardware_specific/stm32/stm32f4/stm32f4_hal.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ ADC_HandleTypeDef hadc;
3535

3636
void _adc_init(Stm32CurrentSenseParams* cs_params, const STM32DriverParams* driver_params)
3737
{
38-
ADC_ChannelConfTypeDef sConfig;
3938
ADC_InjectionConfTypeDef sConfigInjected;
4039

4140
/**Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion)

src/current_sense/hardware_specific/stm32/stm32f4/stm32f4_hal.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#if defined(STM32F4xx)
77
#include "stm32f4xx_hal.h"
8+
#include "stm32f4xx_hal_adc.h"
89
#include "../../../../common/foc_utils.h"
910
#include "../../../../drivers/hardware_specific/stm32_mcu.h"
1011
#include "../stm32_mcu.h"

0 commit comments

Comments
 (0)