Skip to content

Commit 67248d8

Browse files
committed
forgotten return statement change in stm32
1 parent 4c25ef0 commit 67248d8

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void* _driverSyncLowSide(void* _driver_params, void* _cs_params){
4545
Stm32CurrentSenseParams* cs_params = (Stm32CurrentSenseParams*)_cs_params;
4646

4747
// if compatible timer has not been found
48-
if (cs_params->timer_handle == NULL) return;
48+
if (cs_params->timer_handle == NULL) return SIMPLEFOC_CURRENT_SENSE_INIT_FAILED;
4949

5050
// stop all the timers for the driver
5151
_stopTimers(driver_params->timers, 6);

src/current_sense/hardware_specific/stm32/stm32f7/stm32f7_mcu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void* _driverSyncLowSide(void* _driver_params, void* _cs_params){
3939
Stm32CurrentSenseParams* cs_params = (Stm32CurrentSenseParams*)_cs_params;
4040

4141
// if compatible timer has not been found
42-
if (cs_params->timer_handle == NULL) return;
42+
if (cs_params->timer_handle == NULL) return SIMPLEFOC_CURRENT_SENSE_INIT_FAILED;
4343

4444
// stop all the timers for the driver
4545
_stopTimers(driver_params->timers, 6);

src/current_sense/hardware_specific/stm32/stm32g4/stm32g4_mcu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void* _driverSyncLowSide(void* _driver_params, void* _cs_params){
4747
Stm32CurrentSenseParams* cs_params = (Stm32CurrentSenseParams*)_cs_params;
4848

4949
// if compatible timer has not been found
50-
if (cs_params->timer_handle == NULL) return;
50+
if (cs_params->timer_handle == NULL) return SIMPLEFOC_CURRENT_SENSE_INIT_FAILED;
5151

5252
// stop all the timers for the driver
5353
_stopTimers(driver_params->timers, 6);

src/current_sense/hardware_specific/stm32/stm32l4/stm32l4_mcu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void* _driverSyncLowSide(void* _driver_params, void* _cs_params){
4646
Stm32CurrentSenseParams* cs_params = (Stm32CurrentSenseParams*)_cs_params;
4747

4848
// if compatible timer has not been found
49-
if (cs_params->timer_handle == NULL) return;
49+
if (cs_params->timer_handle == NULL) return SIMPLEFOC_CURRENT_SENSE_INIT_FAILED;
5050

5151
// stop all the timers for the driver
5252
_stopTimers(driver_params->timers, 6);

0 commit comments

Comments
 (0)