DRV8825 and Arduino - Help needed

I got myself an 400 stepper motor and an DRV8825 stepper driver.
I want to use every all pins to control steps,speed and rotation.

Does anyone know any code to give me full control of the DRV8825 stepper driver.
I have it connected to an Arduino Mega 2560

This Simple Stepper Code should get you started.

The Pololu DRV8825 web page has a good wiring diagram.

...R
Stepper Motor Basics