platformio

This commit is contained in:
iranl
2024-04-23 20:38:15 +02:00
parent 3d211c64b4
commit d50520aac7
13 changed files with 170 additions and 1639 deletions

View File

@@ -332,7 +332,7 @@ void setup() {
Serial.begin(9600);
// start the Ethernet connection:
if (Ethernet.begin(mac) == 0) {
Serial.println("Failure to configure Ethernet using DHCP");
Serial.println("Failed to configure Ethernet using DHCP");
// no point in carrying on, so do nothing forevermore:
for(;;)
;

View File

@@ -1,5 +1,5 @@
name=Ethernet
version=2.0.0
version=2.0.2
author=Various (see AUTHORS file for details)
maintainer=Arduino <info@arduino.cc>
sentence=Enables network connection (local and Internet) using the Arduino Ethernet Board or Shield.
@@ -7,4 +7,4 @@ paragraph=With this library you can use the Arduino Ethernet (shield or board) t
category=Communication
url=https://www.arduino.cc/en/Reference/Ethernet
architectures=*
includes=Ethernet.h
includes=Ethernet.h

View File

@@ -32,6 +32,7 @@ void DhcpClass::reset_DHCP_lease()
memset(_dhcpDhcpServerIp, 0, sizeof(_dhcpDhcpServerIp));
memset(_dhcpDnsServerIp, 0, sizeof(_dhcpDnsServerIp));
}
//return:0 on error, 1 if request is sent and response is received
int DhcpClass::request_DHCP_lease()
{
@@ -433,4 +434,4 @@ void DhcpClass::printByte(char * buf, uint8_t n )
char c = m - 16 * n;
*str-- = c < 10 ? c + '0' : c + 'A' - 10;
} while(n);
}
}

View File

@@ -87,14 +87,10 @@ void EthernetClass::begin(uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress g
W5100.setIPAddress(&ip[0]);
W5100.setGatewayIp(&gateway[0]);
W5100.setSubnetMask(&subnet[0]);
#elif ARDUINO > 106 || TEENSYDUINO > 121
W5100.setIPAddress(ip._address.bytes);
W5100.setGatewayIp(gateway._address.bytes);
W5100.setSubnetMask(subnet._address.bytes);
#else
W5100.setIPAddress(ip._address);
W5100.setGatewayIp(gateway._address);
W5100.setSubnetMask(subnet._address);
W5100.setIPAddress(ip.raw_address());
W5100.setGatewayIp(gateway.raw_address());
W5100.setSubnetMask(subnet.raw_address());
#endif
SPI.endTransaction();
_dnsServerAddress = dns;
@@ -244,4 +240,4 @@ void EthernetClass::setRetransmissionCount(uint8_t num)
EthernetClass Ethernet;
EthernetClass Ethernet;