This commit is contained in:
DashyFox 2024-10-29 16:59:54 +03:00
parent 10a6adea0d
commit b374b5a260

View File

@ -8,7 +8,6 @@
```cpp
class EthernetClient : public Client {
// ...
protected: // <--- замените 'private' на 'protected'
static uint16_t _srcport;
uint8_t _sock;
@ -32,12 +31,11 @@ protected: // <--- замените 'private' на 'protected'
В файле `EthernetServer.h` также замените доступ к переменным с `private` на `protected`:
```cpp
class EthernetServer :
public Server {
class EthernetServer : public Server {
protected: // <--- замените 'private' на 'protected'
uint16_t _port;
void accept();
//...
//...
};
```
@ -52,10 +50,9 @@ void setup() {
// ...
Ethernet.setCsPin(W5500_CS_PIN);
Ethernet.init();
Ethernet.begin(mac, localIP, gateway, gateway, subnet);
Ethernet.begin(mac, localIP, subnet, gateway, gateway);
// ...
}
```
Не забудьте правильно настроить `W5500_CS_PIN` и сетевые параметры (`mac`, `localIP`, `gateway`, `subnet`) в зависимости от вашей конфигурации.
```