1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-22 15:46:14 +01:00

make it compile on all default platforms

This commit is contained in:
Harald Barth 2024-11-10 21:11:40 +01:00
parent 001c4664c1
commit 1235c288dc
4 changed files with 11 additions and 3 deletions

View File

@ -20,6 +20,7 @@
#include <Arduino.h>
#include "EthernetInterface.h"
#ifdef DO_MDNS
#include "EXmDNS.h"
// fixed values for mDNS
@ -193,3 +194,4 @@ void MDNS::run() {
_udp->flush();
//
}
#endif //DO_MDNS

View File

@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with CommandStation. If not, see <https://www.gnu.org/licenses/>.
*/
#ifdef DO_MDNS
#define BROADCASTTIME 15 //seconds
typedef enum _MDNSServiceProtocol_t
@ -41,3 +41,4 @@ private:
char* _serviceProto;
int _servicePort;
};
#endif //DO_MDNS

View File

@ -32,10 +32,11 @@
#include "WiThrottle.h"
#include "DCCTimer.h"
#ifdef DO_MDNS
#include "EXmDNS.h"
#define DO_MDNS
EthernetUDP udp;
MDNS mdns(udp);
#endif
//extern void looptimer(unsigned long timeout, const FSH* message);
#define looptimer(a,b)

View File

@ -31,13 +31,16 @@
#define EthernetInterface_h
#include "defines.h"
#if ETHERNET_ON == true
#include "DCCEXParser.h"
#include <Arduino.h>
//#include <avr/pgmspace.h>
#if defined (ARDUINO_TEENSY41)
#include <NativeEthernet.h> //TEENSY Ethernet Treiber
#include <NativeEthernetUdp.h>
#ifndef MAX_SOCK_NUM
#define MAX_SOCK_NUM 4
#endif
#elif defined (ARDUINO_NUCLEO_F429ZI) || defined (ARDUINO_NUCLEO_F439ZI) || defined (ARDUINO_NUCLEO_F4X9ZI)
#include <LwIP.h>
// #include "STM32lwipopts.h"
@ -46,6 +49,7 @@
extern "C" struct netif gnetif;
#define STM32_ETHERNET
#define MAX_SOCK_NUM MAX_NUM_TCP_CLIENTS
#define DO_MDNS
#else
#include "Ethernet.h"
#endif
@ -77,5 +81,5 @@ class EthernetInterface {
static void dropClient(byte socketnum);
};
#endif // ETHERNET_ON
#endif