The simplest mechanism is to have two stopper pins for each direction, on different planes either radially or along the axle. And then have corresponding dogs that retracts when spins in the other direction to engage each pin.