Project 9  Stepper Motor
Neff Site
a4988.h
Go to the documentation of this file.
1 
16 #ifndef A4988_H_
17 #define A4988_H_
18 
19 #define A4988_PORT PORTD
20 #define A4988_STEPS_REV 200L
21 
22 #define A4988_ST_PIN_bp PIN0_bp
23 #define A4988_ST_PIN_bm PIN0_bm
24 
25 #define A4988_DIR_PIN_bp PIN1_bp
26 #define A4988_DIR_PIN_bm PIN1_bm
27 
28 #define A4988_SL_PIN_bp PIN2_bp
29 #define A4988_SL_PIN_bm PIN2_bm
30 
31 #define A4988_RST_PIN_bp PIN3_bp
32 #define A4988_RST_PIN_bm PIN3_bm
33 
34 #define A4988_EN_PIN_bp PIN4_bp
35 #define A4988_EN_PIN_bm PIN4_bm
36 
37 #define A4988_PINS_gp PIN0_bp
38 #define A4988_PINS_gm (PIN0_bm | PIN1_bm | PIN2_bm | PIN3_bm | PIN4_bm)
39 
40 #ifdef __cplusplus
41 extern "C"
42 {
43 #endif
44 
45 #include <stdint.h>
46 
48 void a4988_init(void);
49 
51 void a4988_reset(void);
52 
54 void a4988_on(void);
55 
57 void a4988_off(void);
58 
60 void a4988_left(void);
61 
63 void a4988_right(void);
64 
66 void a4988_step(void);
67 
68 #ifdef __cplusplus
69 }
70 #endif
71 
72 #endif /* A4988_H_ */
void a4988_reset(void)
Resets the stepper motor module.
void a4988_right(void)
Rotating direction is right.
void a4988_left(void)
Rotating direction is left.
void a4988_init(void)
Initializes the stepper motor module.
void a4988_on(void)
Switches the motor on.
void a4988_off(void)
Switches the motor off.
void a4988_step(void)
Advances one step.
Contact