That is called by timer1 interrupt and the returned time in ticks is when timer should trigger again. That way we can control speed without dummy loops.
Bresenham algorithm needs a leading axis to work. Since deltas are nonlinear the driving axis could change over a line. So we added a virtual axis that has the biggest steps for all segments so it is always the driving axis in nonlinear systems.