forked from modmaker/BeBoPr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalgo2cmds.h
38 lines (30 loc) · 1.2 KB
/
algo2cmds.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// PRUSS_MAGIC is in the reserved opcodes list, so there is
// less chance of finding it by accident. It identifies valid
// microcode for the BeagleBone. It should be located immediately
// after the first instruction (that should be jump to code start).
// UCODE_MAGIC identifies the application, in this case code for
// the BeBoPr (2191) board.
#define PRUSS_MAGIC 0xbeb0c0de
#define UCODE_MAGIC 0xba512191
// PRUSS code and C-code must have the same FW_VERSION to be compatible
#define FW_VERSION 3
#define NR_CMD_FIFO_ENTRIES 16
//
// The stepper code uses a 32-bit unsigned integer to keep track of position.
// This gives a usable range of a little more than 4000 mm.
// To split this range from -2000 .. +2000, set the virtual origin midscale:
//
#define VIRT_POS_MID_SCALE 0x80000000
#define CMD_AXIS_SET_ORIGIN 0
#define CMD_AXIS_RAMP_UP 1
#define CMD_AXIS_DWELL 2
#define CMD_AXIS_RAMP_DOWN 3
#define CMD_AXES_EXECUTE 4
#define CMD_AXIS_SET_ACCEL 5
#define CMD_AXIS_SET_PULSE_LENGTH 6
#define CMD_AXIS_CONFIG_AXIS 7
#define CMD_AXIS_ADJUST_ORIGIN 8
#define CMD_AXIS_ADJUST_FOR_RAMP 9
#define CMD_SET_IDLE_TIMEOUT 11
#define CMD_SET_ENABLE 12
#define CMD_HALT_PRU 15