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);
166 } __attribute__((packed));
179 } __attribute__((packed));
192 } __attribute__((packed));
202 } __attribute__((packed));
231 uint8_t reserved3[212];
250 } __attribute__((packed));
265 } __attribute__((packed));
276 } __attribute__((packed));
298 } __attribute__((packed));
343 virtual int available();
365 virtual int read(
void* buf,
size_t size);
384 virtual int open(
Protocol proto, uint16_t port, uint8_t flag);
404 virtual int listen();
415 virtual int accept();
426 virtual int connect(uint8_t addr[4], uint16_t port);
436 virtual int connect(
const char* hostname, uint16_t port);
445 virtual int is_connected();
453 virtual int disconnect();
464 virtual int datagram(uint8_t addr[4], uint16_t port);
477 virtual int recv(
void* buf,
size_t len);
492 virtual int recv(
void* buf,
size_t len,
493 uint8_t src[4], uint16_t& port);
522 int dev_read(
void* buf,
size_t len);
533 int dev_write(
const void* buf,
size_t len,
bool progmem);
557 virtual int write(
const void* buf,
size_t size,
bool progmem);
571 virtual int send(
const void* buf,
size_t len,
bool progmem);
587 virtual int send(
const void* buf,
size_t len,
588 uint8_t dest[4], uint16_t port,
593 static const uint8_t
MAC[6] PROGMEM;
615 } __attribute__((packed));
622 void write(uint16_t addr, uint8_t data)
624 write(addr, &data, 1);
634 void write(uint16_t addr,
const void* buf,
size_t len,
bool progmem=
false);
643 void write_P(uint16_t addr,
const void* buf,
size_t len)
645 write(addr, buf, len,
true);
652 uint8_t
read(uint16_t addr);
661 void read(uint16_t addr,
void* buf,
size_t len);
669 void issue(uint16_t addr, uint8_t cmd);
uint8_t IMR
Interrupt Mask Register.
Transmit data according to TX_WR.
uint8_t SR
Status Register.
uint16_t DPORT
Destination Port Register.
uint8_t UIPR[4]
Unreachable IP Address Register.
static const uint16_t COMMON_REGISTER_BASE
uint16_t RTR
Retry Time Register.
uint8_t reserved1[2]
Reserved.
Mask occurrence of Socket 3 Interrupt.
void addr(uint8_t ip[4], uint8_t subnet[4])
static const uint16_t SOCKET_REGISTER_BASE
uint8_t RCR
Retry Count Register.
void dns_addr(uint8_t ip[4])
static const size_t BUF_MAX
virtual int write(const void *buf, size_t size)
virtual int read(void *buf, size_t size)
uint8_t SIPR[4]
Source IP Address Register.
uint8_t read(uint16_t addr)
bool begin_P(str_P hostname, uint16_t timeout=500)
uint8_t PTIMER
PPP LCP Request Timer Register.
Occurrence of Socket 0 Interrupt.
uint8_t RMSR
RX Memory Size Register.
uint8_t GAR[4]
Gateway Address Register.
Send operation is completed.
uint8_t reserved2[10]
Reserved.
static const uint8_t RX_MEMORY_SIZE
static const size_t MSG_MAX
static const uint16_t SOCKET_REGISTER_SIZE
static const uint16_t COMMON_REGISTER_SIZE
TCP: Initiate client mode.
uint16_t UPORT
Unreachable Port Register.
uint8_t SUBR[4]
Subnet mask Address Register.
uint16_t PORT
Source Port Register.
uint16_t MSSR
Maximum Segment Size Register.
Mask PPPoE Connection Close.
uint8_t IR
Interrupt Register.
uint8_t TMSR
TX Memory Size Register.
uint16_t TX_FSR
TX Free Size Register.
uint16_t TX_RD
TX Read Pointer Register.
uint16_t TX_WR
TX Write Pointer Register.
void write(uint16_t addr, uint8_t data)
Socket 0 memory size position.
static const uint8_t MAC[6]
Occurrence of Socket 2 Interrupt.
uint16_t RX_RD
RX Read Pointer Register.
uint8_t SHAR[6]
Source Hardware Address Register.
bool begin(uint8_t ip[4]=NULL, uint8_t subnet[4]=NULL, uint16_t timeout=500)
Socket * socket(Socket::Protocol proto, uint16_t port=0, uint8_t flag=0)
const class prog_str * str_P
static const uint8_t TX_MEMORY_SIZE
static const uint16_t TX_MEMORY_BASE
Receiving packet to RX_RD.
uint16_t RX_RSR
RX Received Size Register.
Occurrence of Socket 3 Interrupt.
void issue(uint16_t addr, uint8_t cmd)
TCP: Disconnect server/client.
IOStream & flush(IOStream &outs)
int bind(uint8_t ip[4], uint8_t subnet[4], uint8_t gateway[4]=NULL)
uint8_t PROTO
Protocol in IP Raw mode.
uint8_t CR
Command Register.
uint8_t PATR[2]
Authentication Type in PPPoE.
static const uint8_t SOCK_MAX
static const uint16_t TX_MEMORY_MAX
void write_P(uint16_t addr, const void *buf, size_t len)
Mask Destination unreachable.
static const uint8_t DNS_RETRY_MAX
static const uint16_t BUF_MASK
Mask occurrence of Socket 2 Interrupt.
Socket 3 memory size position.
static const uint16_t RX_MEMORY_BASE
Mask occurrence of Socket 1 Interrupt.
uint8_t IR
Interrupt Register.
static const uint16_t RX_MEMORY_MAX
TCP: Check connection status.
W5100(const uint8_t *mac=NULL, Board::DigitalPin csn=Board::D10)
bool begin_P(const char *hostname, uint16_t timeout=500)
Occurrence of Socket 1 Interrupt.
Mask occurrence of Socket 0 Interrupt.
TCP: Initiate server mode.
Initiate socket according to MR.
uint8_t PMAGIC
PPP LCP Magic number.