Rewersing directionof stepper motor with limit switch

It is 6 wire unipolar motor,
Controlled over arduino uno,

And i am trying to use accel stepper library