]> git.tdb.fi Git - model-railway-devices.git/blob - arducontrol/commands.h
Implement current and voltage monitoring
[model-railway-devices.git] / arducontrol / commands.h
1 #ifndef COMMANDS_H_
2 #define COMMANDS_H_
3
4 enum Command
5 {
6         POWER_ON = 0x01,
7         POWER_OFF = 0x02,
8         READ_TRACK_CURRENT = 0x03,
9         SET_OVERCURRENT_LIMIT = 0x04,
10         READ_INPUT_VOLTAGE = 0x05,
11         MOTOROLA_SPEED = 0x11,
12         MOTOROLA_REVERSE = 0x12,
13         MOTOROLA_SPEED_DIRECTION = 0x13,
14         MOTOROLA_SPEED_FUNCTION = 0x14,
15         MOTOROLA_SOLENOID = 0x15,
16         COMMAND_OK = 0x80,
17         RECEIVE_OVERRUN = 0x81,
18         FRAMING_ERROR = 0x82,
19         INVALID_COMMAND = 0x83,
20         LENGTH_ERROR = 0x84,
21         INVALID_VALUE = 0x85,
22         OVERCURRENT = 0xA0,
23         TRACK_CURRENT = 0xC0,
24         INPUT_VOLTAGE = 0xC1
25 };
26
27 #endif