Project

General

Profile

Statistics
| Branch: | Revision:

root / scout_avr / src / stepper.h @ 47e26dee

History | View | Annotate | Download (565 Bytes)

1
#ifndef _STEPPER_H_
2
#define _STEPPER_H_
3

    
4
#define S_STEP    PD6
5
#define S_DIR     PD7
6

    
7
#define S_MS      PB7
8

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

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

    
17

    
18
void step_direction(int dir);
19
void step_halfstep();
20
void step_fullstep();
21
void step_flush();
22
void step_sweep_speed(unsigned int speed);
23
void step_sweep_bounds(int ccw, int cw);
24
void step_sweep();
25

    
26

    
27
#endif