yarf 0.1
Yet Another RepRap Firmware
Defines | Functions
src/hardware/steppers.h File Reference

Stepper motor initialization and control. More...

#include "yarf.h"
#include "fastio.h"

Go to the source code of this file.

Defines

#define stepper_enable_x()   WRITE(X_ENABLE_PIN, !X_ENABLE_INVERTED)
 Enables the x-axis stepper motor.
#define stepper_enable_y()   WRITE(Y_ENABLE_PIN, !Y_ENABLE_INVERTED)
 Enables the y-axis stepper motor.
#define stepper_enable_z()   WRITE(Z_ENABLE_PIN, !Z_ENABLE_INVERTED)
 Enables the z-axis stepper motor.
#define stepper_enable_e()   WRITE(E_ENABLE_PIN, !E_ENABLE_INVERTED)
 Enables the e-axis stepper motor.
#define stepper_disable_x()   WRITE(X_ENABLE_PIN, X_ENABLE_INVERTED)
 Disables the x-axis stepper motor.
#define stepper_disable_y()   WRITE(Y_ENABLE_PIN, Y_ENABLE_INVERTED)
 Disables the y-axis stepper motor.
#define stepper_disable_z()   WRITE(Z_ENABLE_PIN, Z_ENABLE_INVERTED)
 Disables the z-axis stepper motor.
#define stepper_disable_e()   WRITE(E_ENABLE_PIN, E_ENABLE_INVERTED)
 Disables the e-axis stepper motor.
#define stepper_x_dir_pos()   WRITE(X_DIR_PIN, !X_DIR_INVERTED)
 Sets up the x-axis stepper motor to step in the positive direction.
#define stepper_y_dir_pos()   WRITE(Y_DIR_PIN, !Y_DIR_INVERTED)
 Sets up the y-axis stepper motor to step in the positive direction.
#define stepper_z_dir_pos()   WRITE(Z_DIR_PIN, !Z_DIR_INVERTED)
 Sets up the z-axis stepper motor to step in the positive direction.
#define stepper_e_dir_pos()   WRITE(E_DIR_PIN, !E_DIR_INVERTED)
 Sets up the e-axis stepper motor to step in the positive direction.
#define stepper_x_dir_neg()   WRITE(X_DIR_PIN, X_DIR_INVERTED)
 Sets up the x-axis stepper motor to step in the negative direction.
#define stepper_y_dir_neg()   WRITE(Y_DIR_PIN, Y_DIR_INVERTED)
 Sets up the y-axis stepper motor to step in the negative direction.
#define stepper_z_dir_neg()   WRITE(Z_DIR_PIN, Z_DIR_INVERTED)
 Sets up the z-axis stepper motor to step in the negative direction.
#define stepper_e_dir_neg()   WRITE(E_DIR_PIN, E_DIR_INVERTED)
 Sets up the e-axis stepper motor to step in the negative direction.
#define stepper_x_step_high()   WRITE(X_STEP_PIN, !X_STEP_INVERTED)
 Sets the x-axis stepper motor step signal.
#define stepper_x_step_low()   WRITE(X_STEP_PIN, X_STEP_INVERTED)
 Clears the x-axis stepper motor step signal.
#define stepper_y_step_high()   WRITE(Y_STEP_PIN, !Y_STEP_INVERTED)
 Sets the y-axis stepper motor step signal.
#define stepper_y_step_low()   WRITE(Y_STEP_PIN, Y_STEP_INVERTED)
 Clears the y-axis stepper motor step signal.
#define stepper_z_step_high()   WRITE(Z_STEP_PIN, !Z_STEP_INVERTED)
 Sets the z-axis stepper motor step signal.
#define stepper_z_step_low()   WRITE(Z_STEP_PIN, Z_STEP_INVERTED)
 Clears the z-axis stepper motor step signal.
#define stepper_e_step_high()   WRITE(E_STEP_PIN, !E_STEP_INVERTED)
 Sets the e-axis stepper motor step signal.
#define stepper_e_step_low()   WRITE(E_STEP_PIN, E_STEP_INVERTED)
 Clears the e-axis stepper motor step signal.

Functions

static void stepper_enable (unsigned char axis)
 Enables a specific stepper motor.
static void stepper_disable (unsigned char axis)
 Disables a specific stepper motor.
static void stepper_dir_pos (unsigned char axis)
 Sets up a specific stepper motor to step in the positive direction.
static void stepper_dir_neg (unsigned char axis)
 Sets up a specific stepper motor to step in the negative direction.
static void stepper_step_high (unsigned char axis)
 Sets the enable signal of a specific stepper motor.
static void stepper_step_low (unsigned char axis)
 Clears the enable signal of a specific stepper motor.
void steppers_init (void)
 Initializes the stepper motors.
void steppers_disable (void)
 Disables all stepper motors.

Detailed Description

Stepper motor initialization and control.

Author:
Pieter Agten (pieter.agten@gmail.com)
Date:
22 sep 2011

Definition in file steppers.h.


Function Documentation

static void stepper_dir_neg ( unsigned char  axis) [inline, static]

Sets up a specific stepper motor to step in the negative direction.

Parameters:
axisthe axis of which to set up the stepper motor to step in the negative direction

Definition at line 218 of file steppers.h.

static void stepper_dir_pos ( unsigned char  axis) [inline, static]

Sets up a specific stepper motor to step in the positive direction.

Parameters:
axisthe axis of which to set up the stepper motor to step in the positive direction

Definition at line 194 of file steppers.h.

static void stepper_disable ( unsigned char  axis) [inline, static]

Disables a specific stepper motor.

Parameters:
axisthe axis of which to disable the stepper motor

Definition at line 170 of file steppers.h.

static void stepper_enable ( unsigned char  axis) [inline, static]

Enables a specific stepper motor.

Parameters:
axisthe axis of which to enable the stepper motor

Definition at line 147 of file steppers.h.

static void stepper_step_high ( unsigned char  axis) [inline, static]

Sets the enable signal of a specific stepper motor.

Parameters:
axisthe axis of which to set the stepper motor's enable signal

Definition at line 241 of file steppers.h.

static void stepper_step_low ( unsigned char  axis) [inline, static]

Clears the enable signal of a specific stepper motor.

Parameters:
axisthe axis of which to clear the stepper motor's enable signal

Definition at line 264 of file steppers.h.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines