#ifndef _STEPPER_H_
#define _STEPPER_H_

#define S_STEP    PD6
#define S_DIR     PD7

#define S_MS      PB7

//define the type func as a pointer to a void function with no parameters
typedef void (*func)();

/*returns a funciton pointer that must be called at regular intervals
* as specified by the call_us argument
*/
func step_init(unsigned int call_us);


void step_dir(int dir);
void step_halfstep();
void step_fullstep();
void step_flush();
void step_sweep_speed(unsigned int speed);
void step_sweep_bounds(int ccw, int cw);
void step_sweep();


#endif
