io6Library
WIZnet Dual Stack TCP/IP Ethernet Controller Driver
Functions
Basic I/O function

These are basic input/output functions to read values from register or write values to register. More...

Functions

uint8_t WIZCHIP_READ (uint32_t AddrSel)
 It reads 1 byte value from a register. More...
 
void WIZCHIP_WRITE (uint32_t AddrSel, uint8_t wb)
 It writes 1 byte value to a register. More...
 
void WIZCHIP_READ_BUF (uint32_t AddrSel, uint8_t *pBuf, datasize_t len)
 It reads sequentail data from registers. More...
 
void WIZCHIP_WRITE_BUF (uint32_t AddrSel, uint8_t *pBuf, datasize_t len)
 It writes sequential data to registers. More...
 
void wiz_send_data (uint8_t sn, uint8_t *wizdata, datasize_t len)
 It saves data to be sent in the SOCKETn TX buffer. More...
 
void wiz_recv_data (uint8_t sn, uint8_t *wizdata, datasize_t len)
 It reads the received data from the SOCKETn RX buffer and copies the data to your system memory specified by wizdata. More...
 
void wiz_recv_ignore (uint8_t sn, datasize_t len)
 It discards the received data in the SOCKETn RX buffer. More...
 

Detailed Description

These are basic input/output functions to read values from register or write values to register.

Function Documentation

◆ WIZCHIP_READ()

uint8_t WIZCHIP_READ ( uint32_t  AddrSel)

It reads 1 byte value from a register.

Parameters
AddrSelRegister address
Returns
The value of register
See also
WIZCHIP_READ_BUF(), reg_wizchip_bus_cbfunc(), reg_wizchip_spi_cbfunc(), WIZCHIP_WRITE()

Referenced by peeksockmsg().

◆ WIZCHIP_WRITE()

void WIZCHIP_WRITE ( uint32_t  AddrSel,
uint8_t  wb 
)

It writes 1 byte value to a register.

Parameters
AddrSelRegister address
wbWrite data
Returns
void
See also
WIZCHIP_WRITE_BUF(), reg_wizchip_bus_cbfunc(), reg_wizchip_spi_cbfunc(), WIZCHIP_READ()

Referenced by DHCP_run(), and DHCP_run2().

◆ WIZCHIP_READ_BUF()

void WIZCHIP_READ_BUF ( uint32_t  AddrSel,
uint8_t *  pBuf,
datasize_t  len 
)

It reads sequentail data from registers.

Parameters
AddrSelRegister address
pBufPointer buffer to read data
lenData length
Returns
void
See also
WIZCHIP_WRITE_BUF(), reg_wizchip_bus_cbfunc(), reg_wizchip_spi_cbfunc(), WIZCHIP_READ()

◆ WIZCHIP_WRITE_BUF()

void WIZCHIP_WRITE_BUF ( uint32_t  AddrSel,
uint8_t *  pBuf,
datasize_t  len 
)

It writes sequential data to registers.

Parameters
AddrSelRegister address
pBufPointer buffer to write data
lenData length
Returns
void
See also
WIZCHIP_READ_BUF(), reg_wizchip_bus_cbfunc(), reg_wizchip_spi_cbfunc(), WIZCHIP_WRITE()

◆ wiz_send_data()

void wiz_send_data ( uint8_t  sn,
uint8_t *  wizdata,
datasize_t  len 
)

It saves data to be sent in the SOCKETn TX buffer.

This function reads first _Sn_TX_WR_
and starts to copy wizdata from _Sn_TX_WR_ address of SOCKETn TX buffer as many as len.
After it is completed to copy <wizdata,
It increases _Sn_TX_WR_ as many as len.

Parameters
snSOCKETn. It should be 0 ~ _WIZCHIP_SOCK_NUM_.
wizdataPointer buffer to write data
lenData length
See also
wiz_recv_data()

◆ wiz_recv_data()

void wiz_recv_data ( uint8_t  sn,
uint8_t *  wizdata,
datasize_t  len 
)

It reads the received data from the SOCKETn RX buffer and copies the data to your system memory specified by wizdata.

This function reads first _Sn_RX_RD_
and starts to copy the received data to wizdata as many as len.
After it is completed to copy the received data,
It increases _Sn_RX_RD_ as many as len.

Parameters
snSOCKETn. It should be 0 ~ _WIZCHIP_SOCK_NUM_.
wizdataPointer buffer to read data
lenData length
See also
wiz_send_data()

◆ wiz_recv_ignore()

void wiz_recv_ignore ( uint8_t  sn,
datasize_t  len 
)

It discards the received data in the SOCKETn RX buffer.

This function discards the received data by increasing _Sn_RX_RD_ as manay as len without coping the data.

Parameters
snSOCKETn. It should be 0 ~ _WIZCHIP_SOCK_NUM_.
lenData length