Skip to content

Commit 60acc40

Browse files
committed
Print a warning message when inline current sense is used on the B-G431b
1 parent 675e591 commit 60acc40

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,17 @@ void MX_DMA1_Init(ADC_HandleTypeDef *hadc, DMA_HandleTypeDef *hdma_adc, DMA_Chan
8383

8484
void* _configureADCInline(const void* driver_params, const int pinA,const int pinB,const int pinC){
8585
_UNUSED(driver_params);
86+
_UNUSED(pinA);
87+
_UNUSED(pinB);
88+
_UNUSED(pinC);
89+
90+
SIMPLEFOC_DEBUG("B-G431B does not implement inline current sense. Use low-side current sense instead.");
91+
return SIMPLEFOC_CURRENT_SENSE_INIT_FAILED;
92+
}
93+
94+
95+
void* _configureADCLowSide(const void* driver_params, const int pinA,const int pinB,const int pinC){
96+
_UNUSED(driver_params);
8697

8798
HAL_Init();
8899
MX_GPIO_Init();

0 commit comments

Comments
 (0)