Events/2020/AVR: Difference between revisions

No edit summary
Line 14: Line 14:
   const int DIRECTION_MASK = 0b00001110;
   const int DIRECTION_MASK = 0b00001110;
   uint8_t direction = 0b00001010;
   uint8_t direction = 0b00001010;
  // https://github.com/gnea/grbl/blob/master/grbl/stepper.c#L324
   DIRECTION_PORT = (DIRECTION_PORT & ~DIRECTION_MASK) | (direction & DIRECTION_MASK);
   DIRECTION_PORT = (DIRECTION_PORT & ~DIRECTION_MASK) | (direction & DIRECTION_MASK);
   return 0;
   return 0;
  }
  }