Skip to content

Commit

Permalink
Merge pull request #322 from Paciente8159/321-bug-probe-fails-using-i…
Browse files Browse the repository at this point in the history
…sr-on-stm32

fixed PROBE ISR for STM32
  • Loading branch information
Paciente8159 committed Oct 28, 2022
2 parents 0bcc89b + cedc50c commit 6dce7fb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion uCNC/src/core/motion_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ uint8_t mc_probe(float *target, uint8_t flags, motion_data_t *block_data)
return STATUS_CRITICAL_FAIL;
}

#if (defined(FORCE_SOFT_POLLING) || (PROBEEN_MASK != PROBEISR_MASK))
#if (defined(FORCE_SOFT_POLLING) || !defined(PROBE_ISR))
if (io_get_probe() ^ (flags & 0x01))
{
mcu_probe_changed_cb();
Expand Down
2 changes: 1 addition & 1 deletion uCNC/src/hal/mcus/stm32f1x/mcu_stm32f1x.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ static void mcu_input_isr(void)
mcu_controls_changed_cb();
}
#endif
#if (PROBE_EXTIBITMASK & 0x01)
#if (PROBE_EXTIBITMASK != 0)
if (EXTI->PR & PROBE_EXTIBITMASK)
{
mcu_probe_changed_cb();
Expand Down
2 changes: 1 addition & 1 deletion uCNC/src/hal/mcus/stm32f4x/mcu_stm32f4x.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ static void mcu_input_isr(void)
mcu_controls_changed_cb();
}
#endif
#if (PROBE_EXTIBITMASK & 0x01)
#if (PROBE_EXTIBITMASK != 0)
if (EXTI->PR & PROBE_EXTIBITMASK)
{
mcu_probe_changed_cb();
Expand Down

0 comments on commit 6dce7fb

Please sign in to comment.