scoutos / scout_avr / src / stepper.h @ 2853d46b
History | View | Annotate | Download (476 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 STEP_WHOLE 2 |
10 |
#define STEP_HALF 1 |
11 |
|
12 |
/* Initializes the stepper with whole steps and no direction. step_sweep_bounds
|
13 |
* and step_dir should be called before using step_sweep. */
|
14 |
void step_init();
|
15 |
|
16 |
|
17 |
void step_set_size(char size); |
18 |
void step_dir(int dir); |
19 |
void step_do_step();
|
20 |
void step_flush();
|
21 |
void step_sweep_bounds(int ccw, int cw); |
22 |
void step_sweep();
|
23 |
|
24 |
|
25 |
#endif
|