#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <avr/pgmspace.h>
#include "motori.h"
#include "shvars.h"
Go to the source code of this file.
Defines | |
#define | SWAP(a, b) {(a)^=(b);(b)^=(a);(a)^=(b);} |
Functions | |
void | move_reset () |
uint8_t | motors_ready () |
uint8_t | move_is_steep () |
int16_t | movestep (int16_t x1, int16_t y1) |
uint8_t motors_ready | ( | ) |
uint8_t move_is_steep | ( | ) |
int16_t movestep | ( | int16_t | x1, | |
int16_t | y1 | |||
) |
Initialize a line, or perform a subsequent line step.
If motors_ready(), initiate a new line from the current location (stepper_loc) to specified (x1,y1). Subsequent steps should make calls with (-1,-1) arguments. Each line step will will call back external function step(x,y), until movement is done.
The movement is calculated using adopted Bresenham's algorithm.
ordinal number of the current step during movement