Socket APIs
|
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, uint16_t len) |
It reads sequence data from registers. More... | |
void | WIZCHIP_WRITE_BUF (uint32_t AddrSel, uint8_t *pBuf, uint16_t len) |
It writes sequence data to registers. More... | |
void | wiz_send_data (uint8_t sn, uint8_t *wizdata, uint16_t len) |
It copies data to internal TX memory. More... | |
void | wiz_recv_data (uint8_t sn, uint8_t *wizdata, uint16_t len) |
It copies data to your buffer from internal RX memory. More... | |
void | wiz_recv_ignore (uint8_t sn, uint16_t len) |
It discard the received data in RX memory. More... | |
These are basic input/output functions to read values from register or write values to register.
uint8_t WIZCHIP_READ | ( | uint32_t | AddrSel) |
It reads 1 byte value from a register.
AddrSel | Register address |
Definition at line 61 of file w5500.c.
References __WIZCHIP::_CS::_deselect, __WIZCHIP::_IF::_read_byte, __WIZCHIP::_CS::_select, _W5500_SPI_FDM_OP_LEN1_, _W5500_SPI_READ_, _W5500_SPI_VDM_OP_, __WIZCHIP::_IF::_write_byte, __WIZCHIP::CS, __WIZCHIP::IF, __WIZCHIP::_IF::SPI, WIZCHIP, WIZCHIP_CRITICAL_ENTER, and WIZCHIP_CRITICAL_EXIT.
Referenced by getSn_RX_RSR(), and getSn_TX_FSR().
void WIZCHIP_WRITE | ( | uint32_t | AddrSel, |
uint8_t | wb | ||
) |
It writes 1 byte value to a register.
AddrSel | Register address |
wb | Write data |
Definition at line 101 of file w5500.c.
References __WIZCHIP::_CS::_deselect, __WIZCHIP::_CS::_select, _W5500_SPI_FDM_OP_LEN1_, _W5500_SPI_VDM_OP_, _W5500_SPI_WRITE_, __WIZCHIP::_IF::_write_byte, __WIZCHIP::CS, __WIZCHIP::IF, __WIZCHIP::_IF::SPI, WIZCHIP, WIZCHIP_CRITICAL_ENTER, and WIZCHIP_CRITICAL_EXIT.
void WIZCHIP_READ_BUF | ( | uint32_t | AddrSel, |
uint8_t * | pBuf, | ||
uint16_t | len | ||
) |
It reads sequence data from registers.
AddrSel | Register address |
pBuf | Pointer buffer to read data |
len | Data length |
Definition at line 138 of file w5500.c.
References __WIZCHIP::_CS::_deselect, __WIZCHIP::_IF::_read_byte, __WIZCHIP::_CS::_select, _W5500_SPI_FDM_OP_LEN4_, _W5500_SPI_READ_, _W5500_SPI_VDM_OP_, __WIZCHIP::_IF::_write_byte, __WIZCHIP::CS, __WIZCHIP::IF, __WIZCHIP::_IF::SPI, WIZCHIP, WIZCHIP_CRITICAL_ENTER, WIZCHIP_CRITICAL_EXIT, and WIZCHIP_OFFSET_INC.
Referenced by wiz_recv_data().
void WIZCHIP_WRITE_BUF | ( | uint32_t | AddrSel, |
uint8_t * | pBuf, | ||
uint16_t | len | ||
) |
It writes sequence data to registers.
AddrSel | Register address |
pBuf | Pointer buffer to write data |
len | Data length |
Definition at line 215 of file w5500.c.
References __WIZCHIP::_CS::_deselect, __WIZCHIP::_CS::_select, _W5500_SPI_FDM_OP_LEN4_, _W5500_SPI_VDM_OP_, _W5500_SPI_WRITE_, __WIZCHIP::_IF::_write_byte, __WIZCHIP::CS, __WIZCHIP::IF, __WIZCHIP::_IF::SPI, WIZCHIP, WIZCHIP_CRITICAL_ENTER, WIZCHIP_CRITICAL_EXIT, and WIZCHIP_OFFSET_INC.
Referenced by wiz_send_data().
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.
(uint8_t)sn | Socket number. It should be 0 ~ 7. |
wizdata | Pointer buffer to write data |
len | Data length |
Definition at line 326 of file w5500.c.
References getSn_TX_WR, setSn_TX_WR, WIZCHIP_TXBUF_BLOCK, and WIZCHIP_WRITE_BUF().
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.
(uint8_t)sn | Socket number. It should be 0 ~ 7. |
wizdata | Pointer buffer to read data |
len | Data length |
Definition at line 342 of file w5500.c.
References getSn_RX_RD, setSn_RX_RD, WIZCHIP_READ_BUF(), and WIZCHIP_RXBUF_BLOCK.
Referenced by recv(), and recvfrom().
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.
(uint8_t)sn | Socket number. It should be 0 ~ 7. |
len | Data length |
Definition at line 360 of file w5500.c.
References getSn_RX_RD, and setSn_RX_RD.
Referenced by recvfrom().