14 #ifdef ARDUINO_ARCH_AVR 17 #define UNDEFINED_PIN 255 24 #define MAX_MAIN_REGISTERS 12 26 #define MAX_PROG_REGISTERS 3 33 #ifdef ARDUINO_AVR_MEGA // is using Mega 1280, define as Mega 2560 (pinouts and functionality are identical) 34 #ifndef ARDUINO_AVR_MEGA2560 35 #define ARDUINO_AVR_MEGA2560 39 #if defined(ARDUINO_AVR_UNO) || defined(ARDUINO_AVR_NANO) // Configuration for UNO or NANO 42 #define DCC_SIGNAL_PIN_MAIN 10 // Arduino Uno - uses OC1B 44 #define DCC_SIGNAL_PIN_PROG 5 // Arduino Uno - uses OC0B 46 #elif defined(ARDUINO_AVR_MEGA2560) 48 #define DCC_SIGNAL_PIN_MAIN 12 // Arduino Mega - uses OC1B 49 #define DCC_SIGNAL_PIN_PROG 2 // Arduino Mega - uses OC3B 58 #define MOTOR_SHIELD_SIGNAL_ENABLE_PIN_MAIN 3 59 #define MOTOR_SHIELD_SIGNAL_ENABLE_PIN_PROG 11 61 #define MOTOR_SHIELD_CURRENT_MONITOR_PIN_MAIN A0 62 #define MOTOR_SHIELD_CURRENT_MONITOR_PIN_PROG A1 64 #define MOTOR_SHIELD_DIRECTION_MOTOR_CHANNEL_PIN_A 12 65 #define MOTOR_SHIELD_DIRECTION_MOTOR_CHANNEL_PIN_B 13 67 #define POLOLU_SIGNAL_ENABLE_PIN_MAIN 9 68 #define POLOLU_SIGNAL_ENABLE_PIN_PROG 11 70 #define POLOLU_CURRENT_MONITOR_PIN_MAIN A0 71 #define POLOLU_CURRENT_MONITOR_PIN_PROG A1 73 #define POLOLU_DIRECTION_MOTOR_CHANNEL_PIN_A 7 74 #define POLOLU_DIRECTION_MOTOR_CHANNEL_PIN_B 8 87 static uint8_t EthernetIp[4];
88 static uint8_t EthernetMac[6];
89 static int EthernetPort;
90 static EthernetProtocol Protocol;
93 static byte SignalEnablePinMain;
94 static byte CurrentMonitorMain;
96 static byte SignalEnablePinProg;
97 static byte CurrentMonitorProg;
100 static byte DirectionMotorA;
101 static byte DirectionMotorB;