ESP8266
|
Public Member Functions | |
void | init () |
void | read_data (SOCKET s, volatile uint16_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. More... | |
void | send_data_processing (SOCKET s, const uint8_t *data, uint16_t len) |
This function is being called by send() and sendto() function also. More... | |
void | send_data_processing_offset (SOCKET s, uint16_t data_offset, const uint8_t *data, uint16_t len) |
A copy of send_data_processing that uses the provided ptr for the write offset. Only needed for the "streaming" UDP API, where a single UDP packet is built up over a number of calls to send_data_processing_ptr, because TX_WR doesn't seem to get updated correctly in those scenarios. More... | |
void | recv_data_processing (SOCKET s, uint8_t *data, uint16_t len, uint8_t peek=0) |
This function is being called by recv() also. More... | |
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) |
Static Public Member Functions | |
static void | writeMR (uint8_t _data) |
static uint8_t | readMR () |
static uint16_t | writeGAR (uint8_t *_buff) |
static uint16_t | readGAR (uint8_t *_buff) |
static uint16_t | writeSUBR (uint8_t *_buff) |
static uint16_t | readSUBR (uint8_t *_buff) |
static uint16_t | writeSHAR (uint8_t *_buff) |
static uint16_t | readSHAR (uint8_t *_buff) |
static uint16_t | writeSIPR (uint8_t *_buff) |
static uint16_t | readSIPR (uint8_t *_buff) |
static void | writeIR (uint8_t _data) |
static uint8_t | readIR () |
static void | writeIMR (uint8_t _data) |
static uint8_t | readIMR () |
static void | writeRTR (uint16_t _data) |
static uint16_t | readRTR () |
static void | writeRCR (uint8_t _data) |
static uint8_t | readRCR () |
static void | writeRMSR (uint8_t _data) |
static uint8_t | readRMSR () |
static void | writeTMSR (uint8_t _data) |
static uint8_t | readTMSR () |
static void | writePATR (uint8_t _data) |
static uint8_t | readPATR () |
static void | writePTIMER (uint8_t _data) |
static uint8_t | readPTIMER () |
static void | writePMAGIC (uint8_t _data) |
static uint8_t | readPMAGIC () |
static uint16_t | writeUIPR (uint8_t *_buff) |
static uint16_t | readUIPR (uint8_t *_buff) |
static void | writeUPORT (uint16_t _data) |
static uint16_t | readUPORT () |
static void | writeSnMR (SOCKET _s, uint8_t _data) |
static uint8_t | readSnMR (SOCKET _s) |
static void | writeSnCR (SOCKET _s, uint8_t _data) |
static uint8_t | readSnCR (SOCKET _s) |
static void | writeSnIR (SOCKET _s, uint8_t _data) |
static uint8_t | readSnIR (SOCKET _s) |
static void | writeSnSR (SOCKET _s, uint8_t _data) |
static uint8_t | readSnSR (SOCKET _s) |
static void | writeSnPORT (SOCKET _s, uint16_t _data) |
static uint16_t | readSnPORT (SOCKET _s) |
static uint16_t | writeSnDHAR (SOCKET _s, uint8_t *_buff) |
static uint16_t | readSnDHAR (SOCKET _s, uint8_t *_buff) |
static uint16_t | writeSnDIPR (SOCKET _s, uint8_t *_buff) |
static uint16_t | readSnDIPR (SOCKET _s, uint8_t *_buff) |
static void | writeSnDPORT (SOCKET _s, uint16_t _data) |
static uint16_t | readSnDPORT (SOCKET _s) |
static void | writeSnMSSR (SOCKET _s, uint16_t _data) |
static uint16_t | readSnMSSR (SOCKET _s) |
static void | writeSnPROTO (SOCKET _s, uint8_t _data) |
static uint8_t | readSnPROTO (SOCKET _s) |
static void | writeSnTOS (SOCKET _s, uint8_t _data) |
static uint8_t | readSnTOS (SOCKET _s) |
static void | writeSnTTL (SOCKET _s, uint8_t _data) |
static uint8_t | readSnTTL (SOCKET _s) |
static void | writeSnTX_FSR (SOCKET _s, uint16_t _data) |
static uint16_t | readSnTX_FSR (SOCKET _s) |
static void | writeSnTX_RD (SOCKET _s, uint16_t _data) |
static uint16_t | readSnTX_RD (SOCKET _s) |
static void | writeSnTX_WR (SOCKET _s, uint16_t _data) |
static uint16_t | readSnTX_WR (SOCKET _s) |
static void | writeSnRX_RSR (SOCKET _s, uint16_t _data) |
static uint16_t | readSnRX_RSR (SOCKET _s) |
static void | writeSnRX_RD (SOCKET _s, uint16_t _data) |
static uint16_t | readSnRX_RD (SOCKET _s) |
static void | writeSnRX_WR (SOCKET _s, uint16_t _data) |
static uint16_t | readSnRX_WR (SOCKET _s) |
Static Public Attributes | |
static const uint16_t | SSIZE = 2048 |
Static Private Member Functions | |
static uint8_t | write (uint16_t _addr, uint8_t _data) |
static uint16_t | write (uint16_t addr, const uint8_t *buf, uint16_t len) |
static uint8_t | read (uint16_t addr) |
static uint16_t | read (uint16_t addr, uint8_t *buf, uint16_t len) |
static uint8_t | readSn (SOCKET _s, uint16_t _addr) |
static uint8_t | writeSn (SOCKET _s, uint16_t _addr, uint8_t _data) |
static uint16_t | readSn (SOCKET _s, uint16_t _addr, uint8_t *_buf, uint16_t len) |
static uint16_t | writeSn (SOCKET _s, uint16_t _addr, uint8_t *_buf, uint16_t len) |
static void | initSS () |
static void | setSS () |
static void | resetSS () |
Private Attributes | |
uint16_t | SBASE [SOCKETS] |
uint16_t | RBASE [SOCKETS] |
Static Private Attributes | |
static const uint16_t | CH_BASE = 0x0400 |
static const uint16_t | CH_SIZE = 0x0100 |
static const uint8_t | RST = 7 |
static const int | SOCKETS = 4 |
static const uint16_t | SMASK = 0x07FF |
static const uint16_t | RMASK = 0x07FF |
static const uint16_t | RSIZE = 2048 |
void W5100Class::execCmdSn | ( | SOCKET | s, |
SockCMD | _cmd | ||
) |
void W5100Class::getGatewayIp | ( | uint8_t * | _addr | ) |
void W5100Class::getIPAddress | ( | uint8_t * | addr | ) |
void W5100Class::getMACAddress | ( | uint8_t * | addr | ) |
uint16_t W5100Class::getRXReceivedSize | ( | SOCKET | s | ) |
void W5100Class::getSubnetMask | ( | uint8_t * | _addr | ) |
uint16_t W5100Class::getTXFreeSize | ( | SOCKET | s | ) |
void W5100Class::init | ( | void | ) |
|
staticprivate |
|
staticprivate |
|
staticprivate |
void W5100Class::read_data | ( | SOCKET | s, |
volatile uint16_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.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
staticprivate |
|
staticprivate |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
void W5100Class::recv_data_processing | ( | SOCKET | s, |
uint8_t * | data, | ||
uint16_t | len, | ||
uint8_t | peek = 0 |
||
) |
This function is being called by recv() also.
This function read the Rx read pointer register and after copy the data from receive buffer update the Rx write pointer register. User should read upper byte first and lower byte later to get proper value.
|
staticprivate |
void W5100Class::send_data_processing | ( | SOCKET | s, |
const 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.
void W5100Class::send_data_processing_offset | ( | SOCKET | s, |
uint16_t | data_offset, | ||
const uint8_t * | data, | ||
uint16_t | len | ||
) |
A copy of send_data_processing that uses the provided ptr for the write offset. Only needed for the "streaming" UDP API, where a single UDP packet is built up over a number of calls to send_data_processing_ptr, because TX_WR doesn't seem to get updated correctly in those scenarios.
ptr | value to use in place of TX_WR. If 0, then the value is read in from TX_WR |
void W5100Class::setGatewayIp | ( | uint8_t * | _addr | ) |
void W5100Class::setIPAddress | ( | uint8_t * | addr | ) |
void W5100Class::setMACAddress | ( | uint8_t * | addr | ) |
void W5100Class::setRetransmissionCount | ( | uint8_t | _retry | ) |
void W5100Class::setRetransmissionTime | ( | uint16_t | timeout | ) |
|
staticprivate |
void W5100Class::setSubnetMask | ( | uint8_t * | _addr | ) |
|
staticprivate |
|
staticprivate |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
staticprivate |
|
staticprivate |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
staticprivate |
|
staticprivate |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
staticprivate |
|
staticprivate |
|
static |