19 #define A4988_PORT PORTD 20 #define A4988_STEPS_REV 200L 22 #define A4988_ST_PIN_bp PIN0_bp 23 #define A4988_ST_PIN_bm PIN0_bm 25 #define A4988_DIR_PIN_bp PIN1_bp 26 #define A4988_DIR_PIN_bm PIN1_bm 28 #define A4988_SL_PIN_bp PIN2_bp 29 #define A4988_SL_PIN_bm PIN2_bm 31 #define A4988_RST_PIN_bp PIN3_bp 32 #define A4988_RST_PIN_bm PIN3_bm 34 #define A4988_EN_PIN_bp PIN4_bp 35 #define A4988_EN_PIN_bm PIN4_bm 37 #define A4988_PINS_gp PIN0_bp 38 #define A4988_PINS_gm (PIN0_bm | PIN1_bm | PIN2_bm | PIN3_bm | PIN4_bm) 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.