Project

General

Profile

Revision 2853d46b

ID2853d46ba3da7879828050adece3cb330e999876
Parent 2b0ba4bb
Child 958699af

Added by Thomas Mullins over 11 years ago

Changed stepper to always step in step_sweep

Also added whole/half step as a separate setting, with a single
step_do_step function. Also added stepper to main.cpp.

View differences:

scout_avr/src/stepper.h
6 6

  
7 7
#define S_MS      PB7
8 8

  
9
//define the type func as a pointer to a void function with no parameters
10
typedef void (*func)();
9
#define STEP_WHOLE 2
10
#define STEP_HALF 1
11 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);
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();
16 15

  
17 16

  
17
void step_set_size(char size);
18 18
void step_dir(int dir);
19
void step_halfstep();
20
void step_fullstep();
19
void step_do_step();
21 20
void step_flush();
22
void step_sweep_speed(unsigned int speed);
23 21
void step_sweep_bounds(int ccw, int cw);
24 22
void step_sweep();
25 23

  

Also available in: Unified diff