Wiznet W5500 driver and TCP/UDP loopback

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Basic I/O function

Basic I/O function
[WIZCHIP I/O functions]

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.
void WIZCHIP_WRITE (uint32_t AddrSel, uint8_t wb)
 It writes 1 byte value to a register.
void WIZCHIP_READ_BUF (uint32_t AddrSel, uint8_t *pBuf, uint16_t len)
 It reads sequence data from registers.
void WIZCHIP_WRITE_BUF (uint32_t AddrSel, uint8_t *pBuf, uint16_t len)
 It writes sequence data to registers.
void wiz_send_data (uint8_t sn, uint8_t *wizdata, uint16_t len)
 It copies data to internal TX memory.
void wiz_recv_data (uint8_t sn, uint8_t *wizdata, uint16_t len)
 It copies data to your buffer from internal RX memory.
void wiz_recv_ignore (uint8_t sn, uint16_t len)
 It discard the received data in RX memory.

Detailed Description

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


Function Documentation

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

It copies data to your buffer from internal RX memory.

This function read the Rx read pointer register and after that, it copies the received data from internal RX memory to wizdata(pointer variable) of the length of len(variable) bytes. This function is being called by recv() also.

Note:
User should read upper byte first and lower byte later to get proper value.
Parameters:
(uint8_t)snSocket number. It should be 0 ~ 7.
wizdataPointer buffer to read data
lenData length
See also:
wiz_send_data()

Definition at line 147 of file w5500.c.

void wiz_recv_ignore ( uint8_t  sn,
uint16_t  len 
)

It discard the received data in RX memory.

It discards the data of the length of len(variable) bytes in internal RX memory.

Parameters:
(uint8_t)snSocket number. It should be 0 ~ 7.
lenData length

Definition at line 163 of file w5500.c.

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

It copies data to internal TX memory.

This function reads the Tx write pointer register and after that, it copies the wizdata(pointer buffer) of the length of len(variable) bytes to internal TX memory and updates the Tx write pointer register. This function is being called by send() and sendto() function also.

Note:
User should read upper byte first and lower byte later to get proper value.
Parameters:
(uint8_t)snSocket number. It should be 0 ~ 7.
wizdataPointer buffer to write data
lenData length
See also:
wiz_recv_data()

Definition at line 132 of file w5500.c.

uint8_t WIZCHIP_READ ( uint32_t  AddrSel )

It reads 1 byte value from a register.

Parameters:
AddrSelRegister address
Returns:
The value of register

Definition at line 23 of file w5500.c.

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

It reads sequence data from registers.

Parameters:
AddrSelRegister address
pBufPointer buffer to read data
lenData length

Definition at line 58 of file w5500.c.

void WIZCHIP_WRITE ( uint32_t  AddrSel,
uint8_t  wb 
)

It writes 1 byte value to a register.

Parameters:
AddrSelRegister address
wbWrite data
Returns:
void

Definition at line 42 of file w5500.c.

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

It writes sequence data to registers.

Parameters:
AddrSelRegister address
pBufPointer buffer to write data
lenData length

Definition at line 77 of file w5500.c.