Project

General

Profile

Statistics
| Branch: | Revision:

root / scout_avr / src / stepper.h @ 64aea12e

History | View | Annotate | Download (620 Bytes)

1 a07a0b55 Julian Binder
#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 64aea12e Tom Mullins
#define S_EN      PF0
10
11 2853d46b Tom Mullins
#define STEP_WHOLE 2
12
#define STEP_HALF 1
13 a07a0b55 Julian Binder
14 2853d46b Tom Mullins
/* Initializes the stepper with whole steps and no direction. step_sweep_bounds
15
 * and step_dir should be called before using step_sweep. */
16
void step_init();
17 a07a0b55 Julian Binder
18 64aea12e Tom Mullins
/* Don't call step_do_step or step_sweep if you haven't called step_enable() */
19 a07a0b55 Julian Binder
20 2853d46b Tom Mullins
void step_set_size(char size);
21 ca9f6bd5 Tom Mullins
void step_dir(int dir);
22 2853d46b Tom Mullins
void step_do_step();
23 a07a0b55 Julian Binder
void step_flush();
24
void step_sweep_bounds(int ccw, int cw);
25
void step_sweep();
26 64aea12e Tom Mullins
void step_enable();
27
void step_disable();
28 a07a0b55 Julian Binder
29
30
#endif