26 #if !defined(BOARD_ATTINY) 72 void addr(uint8_t ip[4], uint8_t subnet[4]);
89 bool begin_P(
const char* hostname, uint16_t timeout = 500);
92 return (
begin_P((
const char*) hostname, timeout));
104 uint16_t timeout = 500);
114 int bind(uint8_t ip[4], uint8_t subnet[4], uint8_t gateway[4] =
NULL);
170 } __attribute__((packed));
178 } __attribute__((packed));
186 } __attribute__((packed));
200 } __attribute__((packed));
214 } __attribute__((packed));
226 } __attribute__((packed));
278 } __attribute__((packed));
300 } __attribute__((packed));
316 } __attribute__((packed));
338 } __attribute__((packed));
381 virtual int available();
403 virtual int read(
void* buf,
size_t size);
422 virtual int open(
Protocol proto, uint16_t port, uint8_t flag);
442 virtual int listen();
453 virtual int accept();
464 virtual int connect(uint8_t addr[4], uint16_t port);
474 virtual int connect(
const char* hostname, uint16_t port);
483 virtual int is_connected();
491 virtual int disconnect();
502 virtual int datagram(uint8_t addr[4], uint16_t port);
515 virtual int recv(
void* buf,
size_t len);
530 virtual int recv(
void* buf,
size_t len,
531 uint8_t src[4], uint16_t& port);
560 int dev_read(
void* buf,
size_t len);
571 int dev_write(
const void* buf,
size_t len,
bool progmem);
595 virtual int write(
const void* buf,
size_t size,
bool progmem);
609 virtual int send(
const void* buf,
size_t len,
bool progmem);
625 virtual int send(
const void* buf,
size_t len,
626 uint8_t dest[4], uint16_t port,
631 static const uint8_t
MAC[6] PROGMEM;
653 } __attribute__((packed));
660 void write(uint16_t addr, uint8_t data)
662 write(addr, &data, 1);
672 void write(uint16_t addr,
const void* buf,
size_t len,
bool progmem =
false);
681 void write_P(uint16_t addr,
const void* buf,
size_t len)
683 write(addr, buf, len,
true);
690 uint8_t
read(uint16_t addr);
699 void read(uint16_t addr,
void* buf,
size_t len);
707 void issue(uint16_t addr, uint8_t cmd);
Mask PPPoE Connection Close.
uint16_t TX_FSR
TX Free Size Register.
static const uint16_t RX_MEMORY_BASE
static const uint16_t SOCKET_REGISTER_SIZE
static const uint16_t RX_MEMORY_MAX
void dns_addr(uint8_t ip[4])
Mask occurrence of Socket 3 Interrupt.
uint8_t PATR[2]
Authentication Type in PPPoE.
uint8_t PTIMER
PPP LCP Request Timer Register.
Occurrence of Socket 7 Interrupt.
virtual int write(const void *buf, size_t size)
Initiate socket according to MR.
virtual int read(void *buf, size_t size)
Occurrence of Socket 0 Interrupt.
uint16_t PORT
Source Port Register.
static const uint16_t TX_MEMORY_BASE
uint8_t reserved3[8]
Reserved.
TCP: Initiate client mode.
static const uint16_t COMMON_REGISTER_SIZE
uint8_t SUBR[4]
Subnet mask Address Register.
void issue(uint16_t addr, uint8_t cmd)
void addr(uint8_t ip[4], uint8_t subnet[4])
uint8_t IR
Interrupt Register.
uint16_t RX_WR
RX Write Pointer Register.
Occurrence of Socket 5 Interrupt.
bool begin_P(str_P hostname, uint16_t timeout=500)
uint16_t MSSR
Maximum Segment Size Register.
static const uint16_t COMMON_REGISTER_BASE
Occurrence of Socket 3 Interrupt.
uint8_t reserved1[2]
Reserved.
uint16_t RX_RSR
RX Received Size Register.
TCP: Disconnect server/client.
Mask occurrence of Socket 6 Interrupt.
Occurrence of Socket 6 Interrupt.
uint8_t RXMEM_SIZE
RX Memory Size Register.
uint8_t GAR[4]
Gateway Address Register.
uint8_t VERSIONR
Chip Version.
static const size_t BUF_MAX
uint16_t DPORT
Destination Port Register.
bool begin_P(const char *hostname, uint16_t timeout=500)
uint8_t PMAGIC
PPP LCP Magic number.
uint16_t TX_WR
TX Write Pointer Register.
static const uint8_t DNS_RETRY_MAX
uint8_t IMR
Interrupt Mask Register.
Mask occurrence of Socket 5 Interrupt.
int bind(uint8_t ip[4], uint8_t subnet[4], uint8_t gateway[4]=NULL)
uint8_t IMR
Interrupt Mask Register.
const class prog_str * str_P
uint8_t CR
Command Register.
uint8_t SHAR[6]
Source Hardware Address Register.
Occurrence of Socket 4 Interrupt.
uint8_t SR
Status Register.
Mask occurrence of Socket 7 Interrupt.
uint8_t PROTO
Protocol in IP Raw mode.
uint8_t RCR
Retry Count Register.
IOStream & flush(IOStream &outs)
uint8_t PSTATUS
Socket Interrupt Register.
uint8_t IMR2
Socket Interrupt Register Mask.
Occurrence of Socket 2 Interrupt.
uint8_t IR2
Socket Interrupt Register.
Mask occurrence of Socket 4 Interrupt.
void write_P(uint16_t addr, const void *buf, size_t len)
uint8_t SIPR[4]
Source IP Address Register.
Mask occurrence of Socket 0 Interrupt.
static const uint8_t MAC[6]
TCP: Check connection status.
uint16_t TX_RD
TX Read Pointer Register.
static const uint16_t TX_MEMORY_MAX
Mask occurrence of Socket 2 Interrupt.
static const uint8_t SOCK_MAX
static const uint16_t BUF_MASK
Socket * socket(Socket::Protocol proto, uint16_t port=0, uint8_t flag=0)
Occurrence of Socket 1 Interrupt.
uint16_t FRAG
Fragment Register.
Mask occurrence of Socket 1 Interrupt.
uint8_t read(uint16_t addr)
uint8_t reserved4[6]
Reserved.
uint16_t RTR
Retry Time Register.
uint8_t INTLEVEL[2]
Interrupt Low Level Timer.
uint8_t reserved2[2]
Reserved.
TCP: Initiate server mode.
Transmit data according to TX_WR.
uint16_t RX_RD
RX Read Pointer Register.
static const size_t MSG_MAX
uint8_t PPPALGO
Authentication Algorithm in PPPoE.
static const uint16_t SOCKET_REGISTER_BASE
bool begin(uint8_t ip[4]=NULL, uint8_t subnet[4]=NULL, uint16_t timeout=500)
uint8_t reserved5[2]
Reserved.
Receiving packet to RX_RD.
Send operation is completed.
uint8_t IR
Interrupt Register.
W5200(const uint8_t *mac=NULL, Board::DigitalPin csn=Board::D10)
void write(uint16_t addr, uint8_t data)
uint8_t TXMEM_SIZE
TX Memory Size Register.