mirror of
https://github.com/Show-maket/EthernetMaket.git
synced 2025-05-03 14:50:22 +00:00
docs
This commit is contained in:
parent
10a6adea0d
commit
b374b5a260
@ -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`) в зависимости от вашей конфигурации.
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user