14 #ifndef FirmataConstants_h
15 #define FirmataConstants_h
22 static const int FIRMWARE_MAJOR_VERSION = 2;
23 static const int FIRMWARE_MINOR_VERSION = 5;
24 static const int FIRMWARE_BUGFIX_VERSION = 7;
30 static const int PROTOCOL_MAJOR_VERSION = 2;
31 static const int PROTOCOL_MINOR_VERSION = 5;
32 static const int PROTOCOL_BUGFIX_VERSION = 1;
34 static const int MAX_DATA_BYTES = 64;
38 static const int DIGITAL_MESSAGE = 0x90;
39 static const int ANALOG_MESSAGE = 0xE0;
40 static const int REPORT_ANALOG = 0xC0;
41 static const int REPORT_DIGITAL = 0xD0;
43 static const int SET_PIN_MODE = 0xF4;
44 static const int SET_DIGITAL_PIN_VALUE = 0xF5;
46 static const int REPORT_VERSION = 0xF9;
47 static const int SYSTEM_RESET = 0xFF;
49 static const int START_SYSEX = 0xF0;
50 static const int END_SYSEX = 0xF7;
55 static const int SERIAL_DATA = 0x60;
56 static const int ENCODER_DATA = 0x61;
57 static const int SERVO_CONFIG = 0x70;
58 static const int STRING_DATA = 0x71;
59 static const int STEPPER_DATA = 0x72;
60 static const int ONEWIRE_DATA = 0x73;
61 static const int SHIFT_DATA = 0x75;
62 static const int I2C_REQUEST = 0x76;
63 static const int I2C_REPLY = 0x77;
64 static const int I2C_CONFIG = 0x78;
65 static const int REPORT_FIRMWARE = 0x79;
66 static const int EXTENDED_ANALOG = 0x6F;
67 static const int PIN_STATE_QUERY = 0x6D;
68 static const int PIN_STATE_RESPONSE = 0x6E;
69 static const int CAPABILITY_QUERY = 0x6B;
70 static const int CAPABILITY_RESPONSE = 0x6C;
71 static const int ANALOG_MAPPING_QUERY = 0x69;
72 static const int ANALOG_MAPPING_RESPONSE = 0x6A;
73 static const int SAMPLING_INTERVAL = 0x7A;
74 static const int SCHEDULER_DATA = 0x7B;
75 static const int SYSEX_NON_REALTIME = 0x7E;
76 static const int SYSEX_REALTIME = 0x7F;
79 static const int PIN_MODE_INPUT = 0x00;
80 static const int PIN_MODE_OUTPUT = 0x01;
81 static const int PIN_MODE_ANALOG = 0x02;
82 static const int PIN_MODE_PWM = 0x03;
83 static const int PIN_MODE_SERVO = 0x04;
84 static const int PIN_MODE_SHIFT = 0x05;
85 static const int PIN_MODE_I2C = 0x06;
86 static const int PIN_MODE_ONEWIRE = 0x07;
87 static const int PIN_MODE_STEPPER = 0x08;
88 static const int PIN_MODE_ENCODER = 0x09;
89 static const int PIN_MODE_SERIAL = 0x0A;
90 static const int PIN_MODE_PULLUP = 0x0B;
91 static const int PIN_MODE_IGNORE = 0x7F;
93 static const int TOTAL_PIN_MODES = 13;
97 #endif // FirmataConstants_h