Browse Source

Also toggle pins efficiently in sm4.c

Use the same technique used in fastio to toggle pins efficiently in sm4
when DEDGE is used.
Yuri D'Elia 3 years ago
parent
commit
e9d5c44732
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Firmware/sm4.c

+ 1 - 1
Firmware/sm4.c

@@ -130,7 +130,7 @@ void sm4_do_step(uint8_t axes_mask)
 {
 #if ((MOTHERBOARD == BOARD_RAMBO_MINI_1_0) || (MOTHERBOARD == BOARD_RAMBO_MINI_1_3) || (MOTHERBOARD == BOARD_EINSY_1_0a))
 #ifdef TMC2130_DEDGE_STEPPING
-	PORTC ^= (axes_mask & 0x0f); //set step signals by mask
+	PINC = (axes_mask & 0x0f); // toggle step signals by mask
 #else
     register uint8_t portC = PORTC & 0xf0;
 	PORTC = portC | (axes_mask & 0x0f); //set step signals by mask