43 #if (_WIZCHIP_ == 5200)
52 #if( (_WIZCHIP_IO_MODE_ & _WIZCHIP_IO_MODE_SPI_))
59 #elif ( (_WIZCHIP_IO_MODE_ & _WIZCHIP_IO_MODE_BUS_) )
71 #error "Unknown _WIZCHIP_IO_MODE_ in W5200. !!!"
87 #if( (_WIZCHIP_IO_MODE_ & _WIZCHIP_IO_MODE_SPI_))
94 #elif ( (_WIZCHIP_IO_MODE_ & _WIZCHIP_IO_MODE_BUS_) )
106 #error "Unknown _WIZCHIP_IO_MODE_ in W5200. !!!"
124 #if( (_WIZCHIP_IO_MODE_ & _WIZCHIP_IO_MODE_SPI_))
129 for(i = 0; i < len; i++)
132 #elif ( (_WIZCHIP_IO_MODE_ & _WIZCHIP_IO_MODE_BUS_) )
145 for(i = 0 ; i < len; i++)
149 #error "Unknown _WIZCHIP_IO_MODE_ in W5200. !!!!"
165 #if( (_WIZCHIP_IO_MODE_ & _WIZCHIP_IO_MODE_SPI_))
170 for(i = 0; i < len; i++)
173 #elif ( (_WIZCHIP_IO_MODE_ & _WIZCHIP_IO_MODE_BUS_) )
186 for(i = 0 ; i < len; i++)
190 #error "Unknown _WIZCHIP_IO_MODE_ in W5200. !!!!"
203 uint16_t val=0,val1=0;
213 }
while (val != val1);
220 uint16_t val=0,val1=0;
230 }
while (val != val1);
242 for(i = 0; i < sn; i++)
251 for(i = 0; i < sn; i++)
268 void wiz_send_data(uint8_t sn, uint8_t *wizdata, uint16_t len)
280 dst_ptr = (uint8_t*)((uint32_t)
getSn_TxBASE(sn) + dst_mask);
312 void wiz_recv_data(uint8_t sn, uint8_t *wizdata, uint16_t len)
322 src_ptr = (uint8_t *)((uint32_t)
getSn_RxBASE(sn) + src_mask);
uint32_t getSn_TxBASE(uint8_t sn)
Get the base address of socket sn TX buffer.
uint8_t(* _read_byte)(void)
void wiz_recv_ignore(uint8_t sn, uint16_t len)
It discard the received data in RX memory.
void(* _write_data)(uint32_t AddrSel, iodata_t wb)
uint16_t getSn_RX_RSR(uint8_t sn)
Get Sn_RX_RSR register.
void(* _select)(void)
_WIZCHIP_ selected
void WIZCHIP_READ_BUF(uint32_t AddrSel, uint8_t *pBuf, uint16_t len)
It reads sequence data from registers.
#define MR
Mode Register address(R/W) MR is used for S/W reset, ping block mode, PPPoE mode and etc...
#define getSn_RxMASK(sn)
Get the mask of socket sn RX buffer.
#define getSn_TxMAX(sn)
Get the max TX buffer size of socket sn.
void wiz_recv_data(uint8_t sn, uint8_t *wizdata, uint16_t len)
It copies data to your buffer from internal RX memory.
uint8_t WIZCHIP_READ(uint32_t AddrSel)
It reads 1 byte value from a register.
void wiz_send_data(uint8_t sn, uint8_t *wizdata, uint16_t len)
It copies data to internal TX memory.
uint16_t getSn_TX_FSR(uint8_t sn)
Get Sn_TX_FSR register.
uint32_t getSn_RxBASE(uint8_t sn)
Get the base address of socket sn RX buffer.
void(* _deselect)(void)
_WIZCHIP_ deselected
void(* _write_byte)(uint8_t wb)
#define MR_AI
Address Auto-Increment in Indirect Bus Interface.
#define WIZCHIP_CRITICAL_ENTER()
Enter a critical section.
iodata_t(* _read_data)(uint32_t AddrSel)
#define WIZCHIP_OFFSET_INC(ADDR, N)
Increase offset address.
struct __WIZCHIP::_IF::@1 SPI
#define setMR(mr)
Set Mode Register.
#define getSn_TX_WR(sn)
Get Sn_TX_WR register.
#define _W5200_SPI_READ_
SPI interface Read operation in Control Phase.
#define getSn_RxMAX(sn)
Get the max RX buffer size of socket sn.
#define Sn_TX_FSR(sn)
Transmit free memory size register(R)
void WIZCHIP_WRITE_BUF(uint32_t AddrSel, uint8_t *pBuf, uint16_t len)
It writes sequence data to registers.
#define _WIZCHIP_IO_RXBUF_
#define _W5200_SPI_WRITE_
SPI interface Write operation in Control Phase.
#define Sn_RX_RSR(sn)
Received data size register(R)
void WIZCHIP_WRITE(uint32_t AddrSel, uint8_t wb)
It writes 1 byte value to a register.
#define setSn_TX_WR(sn, txwr)
Set Sn_TX_WR register.
#define WIZCHIP_CRITICAL_EXIT()
Exit a critical section.
#define getSn_TxMASK(sn)
Get the mask of socket sn TX buffer.
struct __WIZCHIP::_IF::@0 BUS
#define _WIZCHIP_IO_TXBUF_
#define setSn_RX_RD(sn, rxrd)
Set Sn_RX_RD register.
#define getSn_RX_RD(sn)
Get Sn_RX_RD register.