Public Member Functions | |
void | init () |
void | read_data (SOCKET s, volatile uint8_t *src, volatile uint8_t *dst, uint16_t len) |
This function is being used for copy the data form Receive buffer of the chip to application buffer. | |
void | send_data_processing (SOCKET s, uint8_t *data, uint16_t len) |
This function is being called by send() and sendto() function also. | |
void | recv_data_processing (SOCKET s, uint8_t *data, uint16_t len, uint8_t peek=0) |
This function is being called by recv() also. | |
void | setGatewayIp (uint8_t *_addr) |
void | getGatewayIp (uint8_t *_addr) |
void | setSubnetMask (uint8_t *_addr) |
void | getSubnetMask (uint8_t *_addr) |
void | setMACAddress (uint8_t *addr) |
void | getMACAddress (uint8_t *addr) |
void | setIPAddress (uint8_t *addr) |
void | getIPAddress (uint8_t *addr) |
void | setRetransmissionTime (uint16_t timeout) |
void | setRetransmissionCount (uint8_t _retry) |
void | execCmdSn (SOCKET s, SockCMD _cmd) |
uint16_t | getTXFreeSize (SOCKET s) |
uint16_t | getRXReceivedSize (SOCKET s) |
__GP_REGISTER8 (MR, 0x0000) | |
__GP_REGISTER_N (GAR, 0x0001, 4) | |
__GP_REGISTER_N (SUBR, 0x0005, 4) | |
__GP_REGISTER_N (SHAR, 0x0009, 6) | |
__GP_REGISTER_N (SIPR, 0x000F, 4) | |
__GP_REGISTER8 (IR, 0x0015) | |
__GP_REGISTER8 (IMR, 0x0016) | |
__GP_REGISTER16 (RTR, 0x0017) | |
__GP_REGISTER8 (RCR, 0x0019) | |
__GP_REGISTER8 (RMSR, 0x001A) | |
__GP_REGISTER8 (TMSR, 0x001B) | |
__GP_REGISTER8 (PATR, 0x001C) | |
__GP_REGISTER8 (PTIMER, 0x0028) | |
__GP_REGISTER8 (PMAGIC, 0x0029) | |
__GP_REGISTER_N (UIPR, 0x002A, 4) | |
__GP_REGISTER16 (UPORT, 0x002E) | |
__SOCKET_REGISTER8 (SnMR, 0x0000) __SOCKET_REGISTER8(SnCR | |
__SOCKET_REGISTER8 (SnIR, 0x0002) __SOCKET_REGISTER8(SnSR | |
__SOCKET_REGISTER16 (SnPORT, 0x0004) __SOCKET_REGISTER_N(SnDHAR | |
__SOCKET_REGISTER_N (SnDIPR, 0x000C, 4) __SOCKET_REGISTER16(SnDPORT | |
__SOCKET_REGISTER16 (SnMSSR, 0x0012) __SOCKET_REGISTER8(SnPROTO | |
__SOCKET_REGISTER8 (SnTOS, 0x0015) __SOCKET_REGISTER8(SnTTL | |
__SOCKET_REGISTER16 (SnTX_FSR, 0x0020) __SOCKET_REGISTER16(SnTX_RD | |
__SOCKET_REGISTER16 (SnTX_WR, 0x0024) __SOCKET_REGISTER16(SnRX_RSR | |
__SOCKET_REGISTER16 (SnRX_RD, 0x0028) __SOCKET_REGISTER16(SnRX_WR | |
Static Public Attributes | |
static const uint16_t | SSIZE = 2048 |
void W5100Class::read_data | ( | SOCKET | s, |
volatile uint8_t * | src, | ||
volatile uint8_t * | dst, | ||
uint16_t | len | ||
) |
This function is being used for copy the data form Receive buffer of the chip to application buffer.
It calculate the actual physical address where one has to read the data from Receive buffer. Here also take care of the condition while it exceed the Rx memory uper-bound of socket.
void W5100Class::recv_data_processing | ( | SOCKET | s, |
uint8_t * | data, | ||
uint16_t | len, | ||
uint8_t | peek = 0 |
||
) |
void W5100Class::send_data_processing | ( | SOCKET | s, |
uint8_t * | data, | ||
uint16_t | len | ||
) |
This function is being called by send() and sendto() function also.
This function read the Tx write pointer register and after copy the data in buffer update the Tx write pointer register. User should read upper byte first and lower byte later to get proper value.