Skip to content

Commit

Permalink
Ethernet2にも対応できるように
Browse files Browse the repository at this point in the history
  • Loading branch information
rin1024 committed Sep 19, 2021
1 parent d772efe commit c65b2d6
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Artnet.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@ THE SOFTWARE.
#elif defined(ESP32)
#include <WiFi.h>
#include <WiFiUdp.h>
#else
#elif defined(ARDUINO_AVR_MEGA) || defined(ARDUINO_AVR_MEGA2560) // W5500??Arduino uno?ʤΤǤ????Dz????Ǥ????Ϥ?
#include <Ethernet.h>
#include <EthernetUdp.h>
#else
#include <Ethernet2.h>
#include <EthernetUdp2.h>
#endif

// UDP specific
Expand Down Expand Up @@ -150,14 +153,14 @@ class Artnet
private:
uint8_t node_ip_address[4];
uint8_t id[8];
#if defined(ARDUINO_SAMD_ZERO) || defined(ESP8266) || defined(ESP32)
WiFiUDP Udp;
#else

#if !defined(ARDUINO_SAMD_ZERO) && !defined(ESP8266) && !defined(ESP32)
EthernetUDP Udp;
#else
WiFiUDP Udp;
#endif
struct artnet_reply_s ArtPollReply;


uint8_t artnetPacket[MAX_BUFFER_ARTNET];
uint16_t packetSize;
IPAddress broadcast;
Expand Down

0 comments on commit c65b2d6

Please sign in to comment.