mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-24 21:21:24 +01:00
commit
f134d87c85
@ -188,13 +188,17 @@ bool DCCWaveform::interrupt1() {
|
|||||||
setSignal(LOW);
|
setSignal(LOW);
|
||||||
state = 0;
|
state = 0;
|
||||||
}
|
}
|
||||||
else state = 2;
|
else {
|
||||||
|
setSignal(HIGH); // jitter prevention
|
||||||
|
state = 2;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 2: // 116us after case 0
|
case 2: // 116us after case 0
|
||||||
setSignal(LOW);
|
setSignal(LOW);
|
||||||
state = 3;
|
state = 3;
|
||||||
break;
|
break;
|
||||||
case 3: // finished sending zero bit
|
case 3: // finished sending zero bit
|
||||||
|
setSignal(LOW); // jitter prevention
|
||||||
state = 0;
|
state = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -50,11 +50,15 @@ EthernetInterface::EthernetInterface()
|
|||||||
DIAG(F("\n+++++ Ethernet Setup "));
|
DIAG(F("\n+++++ Ethernet Setup "));
|
||||||
connected=false;
|
connected=false;
|
||||||
|
|
||||||
|
#ifdef IP_ADDRESS
|
||||||
|
Ethernet.begin(mac, IP_ADDRESS);
|
||||||
|
#else
|
||||||
if (Ethernet.begin(mac) == 0)
|
if (Ethernet.begin(mac) == 0)
|
||||||
{
|
{
|
||||||
DIAG(F("begin FAILED\n"));
|
DIAG(F("begin FAILED\n"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
DIAG(F("begin OK."));
|
DIAG(F("begin OK."));
|
||||||
if (Ethernet.hardwareStatus() == EthernetNoHardware) {
|
if (Ethernet.hardwareStatus() == EthernetNoHardware) {
|
||||||
DIAG(F("shield not found\n"));
|
DIAG(F("shield not found\n"));
|
||||||
|
@ -30,24 +30,14 @@
|
|||||||
#include <Ethernet.h>
|
#include <Ethernet.h>
|
||||||
#include "RingStream.h"
|
#include "RingStream.h"
|
||||||
|
|
||||||
/* some generated mac addresses as EthernetShields don't have one by default in HW.
|
|
||||||
* Sometimes they come on a sticker on the EthernetShield then use this address otherwise
|
|
||||||
* just choose one from below or generate one yourself. Only condition is that there is no
|
|
||||||
* other device on your network with the same Mac address.
|
|
||||||
*
|
|
||||||
* 52:b8:8a:8e:ce:21
|
|
||||||
* e3:e9:73:e1:db:0d
|
|
||||||
* 54:2b:13:52:ac:0c
|
|
||||||
* c2:d8:d4:7d:7c:cb
|
|
||||||
* 86:cf:fa:9f:07:79
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Network Configuration
|
* @brief Network Configuration
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#define MAC_ADDRESS { 0x52, 0xB8, 0x8A, 0x8E, 0xCE, 0x21 } // MAC address of your networking card found on the sticker on your card or take one from above
|
#ifndef MAC_ADDRESS
|
||||||
// this one is not used elsewhere and corresponds to your network layout
|
#error define MAC_ADDRESS in config.h
|
||||||
|
#endif
|
||||||
|
|
||||||
#define LISTEN_PORT 2560 // default listen port for the server
|
#define LISTEN_PORT 2560 // default listen port for the server
|
||||||
#define MAX_ETH_BUFFER 512
|
#define MAX_ETH_BUFFER 512
|
||||||
#define OUTBOUND_RING_SIZE 2048
|
#define OUTBOUND_RING_SIZE 2048
|
||||||
|
@ -96,7 +96,18 @@ The configuration file for DCC++ EX Command Station
|
|||||||
//
|
//
|
||||||
// Uncomment to use with Ethernet Shields
|
// Uncomment to use with Ethernet Shields
|
||||||
//
|
//
|
||||||
|
// Ethernet Shields do not have have a MAC address in hardware. There may be one on
|
||||||
|
// a sticker on the Shield that you should use. Otherwise choose one of the ones below
|
||||||
|
// Be certain that no other device on your network has this same MAC address!
|
||||||
|
//
|
||||||
|
// 52:b8:8a:8e:ce:21
|
||||||
|
// e3:e9:73:e1:db:0d
|
||||||
|
// 54:2b:13:52:ac:0c
|
||||||
|
|
||||||
// NOTE: This is not used with ESP8266 WiFi modules.
|
// NOTE: This is not used with ESP8266 WiFi modules.
|
||||||
|
|
||||||
|
//#define MAC_ADDRESS { 0x52, 0xB8, 0x8A, 0x8E, 0xCE, 0x21 } // MAC address of your networking card found on the sticker on your card or take one from above
|
||||||
|
|
||||||
//
|
//
|
||||||
// #define MAC_ADDRESS { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xEF }
|
// #define MAC_ADDRESS { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xEF }
|
||||||
|
|
||||||
|
@ -37,9 +37,9 @@ lib_deps =
|
|||||||
arduino-libraries/Ethernet
|
arduino-libraries/Ethernet
|
||||||
SPI
|
SPI
|
||||||
marcoschwartz/LiquidCrystal_I2C
|
marcoschwartz/LiquidCrystal_I2C
|
||||||
adafruit/Adafruit BusIO
|
Adafruit/Adafruit_BusIO
|
||||||
adafruit/Adafruit SSD1306
|
Adafruit/Adafruit_SSD1306
|
||||||
adafruit/Adafruit GFX Library
|
Adafruit/Adafruit-GFX-Library
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
monitor_flags = --echo
|
monitor_flags = --echo
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user