agileRTOS (zrtos)  Version 0.8.0 (ghostbuster)
lib/w5500.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  zrtos_vfs_module_w5500_register_t {
  ZRTOS_VFS_MODULE_W5500_REGISTER__MR = 0x0000,
  ZRTOS_VFS_MODULE_W5500_REGISTER__GAR = 0x0001,
  ZRTOS_VFS_MODULE_W5500_REGISTER__SUBR = 0x0005,
  ZRTOS_VFS_MODULE_W5500_REGISTER__SHAR = 0x0009,
  ZRTOS_VFS_MODULE_W5500_REGISTER__SIPR = 0x000F,
  ZRTOS_VFS_MODULE_W5500_REGISTER__INTLEVEL = 0x0013,
  ZRTOS_VFS_MODULE_W5500_REGISTER__IR = 0x0015,
  ZRTOS_VFS_MODULE_W5500_REGISTER___IMR_ = 0x0016,
  ZRTOS_VFS_MODULE_W5500_REGISTER__SIR = 0x0017,
  ZRTOS_VFS_MODULE_W5500_REGISTER__SIMR = 0x0018,
  ZRTOS_VFS_MODULE_W5500_REGISTER___RTR_ = 0x0019,
  ZRTOS_VFS_MODULE_W5500_REGISTER___RCR_ = 0x001B,
  ZRTOS_VFS_MODULE_W5500_REGISTER__PTIMER = 0x001C,
  ZRTOS_VFS_MODULE_W5500_REGISTER__PMAGIC = 0x001D,
  ZRTOS_VFS_MODULE_W5500_REGISTER__PHAR = 0x001E,
  ZRTOS_VFS_MODULE_W5500_REGISTER__PSID = 0x0024,
  ZRTOS_VFS_MODULE_W5500_REGISTER__PMRU = 0x0026,
  ZRTOS_VFS_MODULE_W5500_REGISTER__UIPR = 0x0028,
  ZRTOS_VFS_MODULE_W5500_REGISTER__UPORTR = 0x002C,
  ZRTOS_VFS_MODULE_W5500_REGISTER__PHYCFGR = 0x002E,
  ZRTOS_VFS_MODULE_W5500_REGISTER__VERSIONR = 0x0039
}
 
enum  zrtos_vfs_module_w5500_socket_register_t {
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__MR = 0x0000,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__CR = 0x0001,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__IR = 0x0002,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__SR = 0x0003,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__PORT = 0x0004,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__DHAR = 0x0006,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__DIPR = 0x000C,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__DPORT = 0x0010,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__MSSR = 0x0012,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__TOS = 0x0015,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__TTL = 0x0016,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__RXBUF_SIZE = 0x001E,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__TXBUF_SIZE = 0x001F,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__TX_FSR = 0x0020,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__TX_RD = 0x0022,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__TX_WR = 0x0024,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__RX_RSR = 0x0026,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__RX_RD = 0x0028,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__RX_WR = 0x002A,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__IMR = 0x002C,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__FRAG = 0x002D,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__KPALVTR = 0x002F
}
 
enum  zrtos_vfs_module_w5500_register_mode_t {
  ZRTOS_VFS_MODULE_W5500_REGISTER_MODE__RST = 0x80,
  ZRTOS_VFS_MODULE_W5500_REGISTER_MODE__WOL = 0x20,
  ZRTOS_VFS_MODULE_W5500_REGISTER_MODE__PB = 0x10,
  ZRTOS_VFS_MODULE_W5500_REGISTER_MODE__PPPOE = 0x08,
  ZRTOS_VFS_MODULE_W5500_REGISTER_MODE__FARP = 0x02
}
 
enum  zrtos_vfs_module_w5500_register_interrupt_t {
  ZRTOS_VFS_MODULE_W5500_REGISTER_INTERRUPT__CONFLICT = 0x80,
  ZRTOS_VFS_MODULE_W5500_REGISTER_INTERRUPT__UNREACH = 0x40,
  ZRTOS_VFS_MODULE_W5500_REGISTER_INTERRUPT__PPPoE = 0x20,
  ZRTOS_VFS_MODULE_W5500_REGISTER_INTERRUPT__MP = 0x10
}
 
enum  zrtos_vfs_module_w5500_register_phy_config_t {
  ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__RST = ~(1<<7),
  ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__OPMD = (1<<6),
  ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__OPMDC_ALLA = (7<<3),
  ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__OPMDC_PDOWN = (6<<3),
  ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__OPMDC_NA = (5<<3),
  ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__OPMDC_100FA = (4<<3),
  ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__OPMDC_100F = (3<<3),
  ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__OPMDC_100H = (2<<3),
  ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__OPMDC_10F = (1<<3),
  ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__OPMDC_10H = (0<<3),
  ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__DPX_FULL = (1<<2),
  ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__DPX_HALF = (0<<2),
  ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__SPD_100 = (1<<1),
  ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__SPD_10 = (0<<1),
  ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__LNK_ON = (1<<0),
  ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__LNK_OFF = (0<<0)
}
 
enum  zrtos_vfs_module_w5500_register_imr_t {
  ZRTOS_VFS_MODULE_W5500_REGISTER_IMR__IR7 = 0x80,
  ZRTOS_VFS_MODULE_W5500_REGISTER_IMR__IR6 = 0x40,
  ZRTOS_VFS_MODULE_W5500_REGISTER_IMR__IR5 = 0x20,
  ZRTOS_VFS_MODULE_W5500_REGISTER_IMR__IR4 = 0x10
}
 
enum  zrtos_vfs_module_w5500_socket_register_mode_t {
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__MULTI = 0x80,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__BCASTB = 0x40,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__ND = 0x20,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__UCASTB = 0x10,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__MACRAW = 0x04,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__IPRAW = 0x03,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__UDP = 0x02,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__TCP = 0x01,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__CLOSE = 0x00,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__MFEN = ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__MULTI,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__MMB = ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__ND,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__MIP6B = ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__UCASTB,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__MC = ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__ND,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__STREAM = ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__TCP,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__DGRAM = ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__UDP
}
 
enum  zrtos_vfs_module_w5500_socket_register_command_t {
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_COMMAND__OPEN = 0x01,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_COMMAND__LISTEN = 0x02,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_COMMAND__CONNECT = 0x04,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_COMMAND__DISCON = 0x08,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_COMMAND__CLOSE = 0x10,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_COMMAND__SEND = 0x20,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_COMMAND__SEND_MAC = 0x21,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_COMMAND__SEND_KEEP = 0x22,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_COMMAND__RECV = 0x40
}
 
enum  zrtos_vfs_module_w5500_socket_register_interrupt_t {
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_INTERRUPT__SENDOK = 0x10,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_INTERRUPT__TIMEOUT = 0x08,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_INTERRUPT__RECV = 0x04,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_INTERRUPT__DISCON = 0x02,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_INTERRUPT__CON = 0x01
}
 
enum  zrtos_vfs_module_w5500_socket_register_status_t {
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__CLOSED = 0x00,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__INIT = 0x13,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__LISTEN = 0x14,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__SYNSENT = 0x15,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__SYNRECV = 0x16,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__ESTABLISHED = 0x17,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__FIN_WAIT = 0x18,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__CLOSING = 0x1A,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__TIME_WAIT = 0x1B,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__CLOSE_WAIT = 0x1C,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__LAST_ACK = 0x1D,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__UDP = 0x22,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__IPRAW = 0x32,
  ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__MACRAW = 0x42
}
 
enum  zrtos_vfs_module_w5500_ipproto_t {
  ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_IP = 0,
  ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_ICMP = 1,
  ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_IGMP = 2,
  ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_GGP = 3,
  ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_TCP = 6,
  ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_PUP = 12,
  ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_UDP = 17,
  ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_IDP = 22,
  ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_ND = 77,
  ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_RAW = 255
}
 

Enumeration Type Documentation

◆ zrtos_vfs_module_w5500_ipproto_t

Enumerator
ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_IP 
ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_ICMP 
ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_IGMP 
ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_GGP 
ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_TCP 
ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_PUP 
ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_UDP 
ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_IDP 
ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_ND 
ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_RAW 

Definition at line 1168 of file lib/w5500.h.

1168  {
1169  ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_IP = 0 //< Dummy for IP
1170  ,ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_ICMP = 1 //< Control message protocol
1171  ,ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_IGMP = 2 //< Internet group management protocol
1172  ,ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_GGP = 3 //< Gateway^2 (deprecated)
1177  ,ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_ND = 77 //< UNOFFICIAL net disk protocol
1178  ,ZRTOS_VFS_MODULE_W5500_IPPROTO__IPPROTO_RAW = 255 //< Raw IP packet
zrtos_vfs_module_w5500_ipproto_t
Definition: lib/w5500.h:1168

◆ zrtos_vfs_module_w5500_register_imr_t

Enumerator
ZRTOS_VFS_MODULE_W5500_REGISTER_IMR__IR7 

IP Conflict Interrupt Mask.

0: Disable IP Conflict Interrupt
1: Enable IP Conflict Interrupt

ZRTOS_VFS_MODULE_W5500_REGISTER_IMR__IR6 
ZRTOS_VFS_MODULE_W5500_REGISTER_IMR__IR5 
ZRTOS_VFS_MODULE_W5500_REGISTER_IMR__IR4 

Definition at line 783 of file lib/w5500.h.

783  {
784  /**
785  * @brief IP Conflict Interrupt Mask.
786  * @details 0: Disable IP Conflict Interrupt\n
787  * 1: Enable IP Conflict Interrupt
788  */
790 
791  /**
792  * @brief Destination unreachable Interrupt Mask.
793  * @details 0: Disable Destination unreachable Interrupt\n
794  * 1: Enable Destination unreachable Interrupt
795  */
797 
798  /**
799  * @brief PPPoE Close Interrupt Mask.
800  * @details 0: Disable PPPoE Close Interrupt\n
801  * 1: Enable PPPoE Close Interrupt
802  */
804 
805  /**
806  * @brief Magic Packet Interrupt Mask.
807  * @details 0: Disable Magic Packet Interrupt\n
808  * 1: Enable Magic Packet Interrupt
809  */
IP Conflict Interrupt Mask.
Definition: lib/w5500.h:789
zrtos_vfs_module_w5500_register_imr_t
Definition: lib/w5500.h:783

◆ zrtos_vfs_module_w5500_register_interrupt_t

Enumerator
ZRTOS_VFS_MODULE_W5500_REGISTER_INTERRUPT__CONFLICT 

Check IP conflict.

Bit is set as when own source IP address is same with the sender IP address in the received ARP request.

ZRTOS_VFS_MODULE_W5500_REGISTER_INTERRUPT__UNREACH 
ZRTOS_VFS_MODULE_W5500_REGISTER_INTERRUPT__PPPoE 
ZRTOS_VFS_MODULE_W5500_REGISTER_INTERRUPT__MP 

Definition at line 735 of file lib/w5500.h.

735  {
736  /**
737  * @brief Check IP conflict.
738  * @details Bit is set as when own source IP address is same with the sender IP address in the received ARP request.
739  */
741 
742  /**
743  * @brief Get the destination unreachable message in UDP sending.
744  * @details When receiving the ICMP (Destination port unreachable) packet, this bit is set as
745  * When this bit is Destination Information such as IP address and Port number may be checked with the corresponding @ref UIPR & @ref UPORTR.
746  */
748 
749  /**
750  * @brief Get the PPPoE close message.
751  * @details When PPPoE is disconnected during PPPoE mode, this bit is set.
752  */
754 
755  /**
756  * @brief Get the magic packet interrupt.
757  * @details When WOL mode is enabled and receives the magic packet over UDP, this bit is set.
758  */
zrtos_vfs_module_w5500_register_interrupt_t
Definition: lib/w5500.h:735

◆ zrtos_vfs_module_w5500_register_mode_t

Enumerator
ZRTOS_VFS_MODULE_W5500_REGISTER_MODE__RST 

Reset.

If this bit is All internal registers will be initialized. It will be automatically cleared as after S/W reset.

ZRTOS_VFS_MODULE_W5500_REGISTER_MODE__WOL 
ZRTOS_VFS_MODULE_W5500_REGISTER_MODE__PB 
ZRTOS_VFS_MODULE_W5500_REGISTER_MODE__PPPOE 
ZRTOS_VFS_MODULE_W5500_REGISTER_MODE__FARP 

Definition at line 691 of file lib/w5500.h.

691  {
692  /**
693  * @brief Reset
694  * @details If this bit is All internal registers will be initialized. It will be automatically cleared as after S/W reset.
695  */
697 
698  /**
699  * @brief Wake on LAN
700  * @details 0 : Disable WOL mode\n
701  * 1 : Enable WOL mode\n
702  * If WOL mode is enabled and the received magic packet over UDP has been normally processed, the Interrupt PIN (INTn) asserts to low.
703  * When using WOL mode, the UDP Socket should be opened with any source port number. (Refer to Socket n Mode Register (@ref Sn_MR) for opening Socket.)
704  * @note The magic packet over UDP supported by W5500 consists of 6 bytes synchronization stream (xFFFFFFFFFFFF and
705  * 16 times Target MAC address stream in UDP payload. The options such like password are ignored. You can use any UDP source port number for WOL mode.
706  */
708 
709  /**
710  * @brief Ping block
711  * @details 0 : Disable Ping block\n
712  * 1 : Enable Ping block\n
713  * If the bit is it blocks the response to a ping request.
714  */
716 
717  /**
718  * @brief Enable PPPoE
719  * @details 0 : DisablePPPoE mode\n
720  * 1 : EnablePPPoE mode\n
721  * If you use ADSL, this bit should be
722  */
724 
725  /**
726  * @brief Enable UDP_FORCE_ARP CHECHK
727  * @details 0 : Disable Force ARP mode\n
728  * 1 : Enable Force ARP mode\n
729  * In Force ARP mode, It forces on sending ARP Request whenever data is sent.
730  */
zrtos_vfs_module_w5500_register_mode_t
Definition: lib/w5500.h:691

◆ zrtos_vfs_module_w5500_register_phy_config_t

Enumerator
ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__RST 
ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__OPMD 
ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__OPMDC_ALLA 
ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__OPMDC_PDOWN 
ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__OPMDC_NA 
ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__OPMDC_100FA 
ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__OPMDC_100F 
ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__OPMDC_100H 
ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__OPMDC_10F 
ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__OPMDC_10H 
ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__DPX_FULL 
ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__DPX_HALF 
ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__SPD_100 
ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__SPD_10 
ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__LNK_ON 
ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__LNK_OFF 

Definition at line 763 of file lib/w5500.h.

763  {
764  ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__RST = ~(1<<7) //< For PHY reset, must operate AND mask.
765  ,ZRTOS_VFS_MODULE_W5500_REGISTER_PHY__OPMD = (1<<6) // Configre PHY with OPMDC value
zrtos_vfs_module_w5500_register_phy_config_t
Definition: lib/w5500.h:763

◆ zrtos_vfs_module_w5500_register_t

Enumerator
ZRTOS_VFS_MODULE_W5500_REGISTER__MR 

Mode Register address(R/W)
MR is used for S/W reset, ping block mode, PPPoE mode and etc.

Each bit of MR defined as follows.

7 6 5 4 3 2 1 0
RST Reserved WOL PB PPPoE Reserved FARP Reserved
  • MR_RST : Reset
  • MR_WOL : Wake on LAN
  • MR_PB : Ping block
  • MR_PPPOE : PPPoE mode
  • MR_FARP : Force ARP mode
ZRTOS_VFS_MODULE_W5500_REGISTER__GAR 
ZRTOS_VFS_MODULE_W5500_REGISTER__SUBR 
ZRTOS_VFS_MODULE_W5500_REGISTER__SHAR 
ZRTOS_VFS_MODULE_W5500_REGISTER__SIPR 
ZRTOS_VFS_MODULE_W5500_REGISTER__INTLEVEL 
ZRTOS_VFS_MODULE_W5500_REGISTER__IR 
ZRTOS_VFS_MODULE_W5500_REGISTER___IMR_ 
ZRTOS_VFS_MODULE_W5500_REGISTER__SIR 
ZRTOS_VFS_MODULE_W5500_REGISTER__SIMR 
ZRTOS_VFS_MODULE_W5500_REGISTER___RTR_ 
ZRTOS_VFS_MODULE_W5500_REGISTER___RCR_ 
ZRTOS_VFS_MODULE_W5500_REGISTER__PTIMER 
ZRTOS_VFS_MODULE_W5500_REGISTER__PMAGIC 
ZRTOS_VFS_MODULE_W5500_REGISTER__PHAR 
ZRTOS_VFS_MODULE_W5500_REGISTER__PSID 
ZRTOS_VFS_MODULE_W5500_REGISTER__PMRU 
ZRTOS_VFS_MODULE_W5500_REGISTER__UIPR 
ZRTOS_VFS_MODULE_W5500_REGISTER__UPORTR 
ZRTOS_VFS_MODULE_W5500_REGISTER__PHYCFGR 
ZRTOS_VFS_MODULE_W5500_REGISTER__VERSIONR 

Definition at line 194 of file lib/w5500.h.

194  {
195  /**
196  * @ingroup Common_register_group
197  * @brief Mode Register address(R/W)\n
198  * @ref MR is used for S/W reset, ping block mode, PPPoE mode and etc.
199  * @details Each bit of @ref MR defined as follows.
200  * <table>
201  * <tr> <td>7</td> <td>6</td> <td>5</td> <td>4</td> <td>3</td> <td>2</td> <td>1</td> <td>0</td> </tr>
202  * <tr> <td>RST</td> <td>Reserved</td> <td>WOL</td> <td>PB</td> <td>PPPoE</td> <td>Reserved</td> <td>FARP</td> <td>Reserved</td> </tr>
203  * </table>
204  * - \ref MR_RST : Reset
205  * - \ref MR_WOL : Wake on LAN
206  * - \ref MR_PB : Ping block
207  * - \ref MR_PPPOE : PPPoE mode
208  * - \ref MR_FARP : Force ARP mode
209  */
211 
212  /**
213  * @ingroup Common_register_group
214  * @brief Gateway IP Register address(R/W)
215  * @details @ref GAR configures the default gateway address.
216  */
218 
219  /**
220  * @ingroup Common_register_group
221  * @brief Subnet mask Register address(R/W)
222  * @details @ref SUBR configures the subnet mask address.
223  */
225 
226  /**
227  * @ingroup Common_register_group
228  * @brief Source MAC Register address(R/W)
229  * @details @ref SHAR configures the source hardware address.
230  */
232 
233  /**
234  * @ingroup Common_register_group
235  * @brief Source IP Register address(R/W)
236  * @details @ref SIPR configures the source IP address.
237  */
239 
240  /**
241  * @ingroup Common_register_group
242  * @brief Set Interrupt low level timer register address(R/W)
243  * @details @ref INTLEVEL configures the Interrupt Assert Time.
244  */
246 
247  /**
248  * @ingroup Common_register_group
249  * @brief Interrupt Register(R/W)
250  * @details @ref IR indicates the interrupt status. Each bit of @ref IR will be still until the bit will be written to by the host.
251  * If @ref IR is not equal to x00 INTn PIN is asserted to low until it is x00\n\n
252  * Each bit of @ref IR defined as follows.
253  * <table>
254  * <tr> <td>7</td> <td>6</td> <td>5</td> <td>4</td> <td>3</td> <td>2</td> <td>1</td> <td>0</td> </tr>
255  * <tr> <td>CONFLICT</td> <td>UNREACH</td> <td>PPPoE</td> <td>MP</td> <td>Reserved</td> <td>Reserved</td> <td>Reserved</td> <td>Reserved</td> </tr>
256  * </table>
257  * - \ref IR_CONFLICT : IP conflict
258  * - \ref IR_UNREACH : Destination unreachable
259  * - \ref IR_PPPoE : PPPoE connection close
260  * - \ref IR_MP : Magic packet
261  */
263 
264  /**
265  * @ingroup Common_register_group
266  * @brief Interrupt mask register(R/W)
267  * @details @ref _IMR_ is used to mask interrupts. Each bit of @ref _IMR_ corresponds to each bit of @ref IR.
268  * When a bit of @ref _IMR_ is and the corresponding bit of @ref IR is an interrupt will be issued. In other words,
269  * if a bit of @ref _IMR_ is an interrupt will not be issued even if the corresponding bit of @ref IR is \n\n
270  * Each bit of @ref _IMR_ defined as the following.
271  * <table>
272  * <tr> <td>7</td> <td>6</td> <td>5</td> <td>4</td> <td>3</td> <td>2</td> <td>1</td> <td>0</td> </tr>
273  * <tr> <td>IM_IR7</td> <td>IM_IR6</td> <td>IM_IR5</td> <td>IM_IR4</td> <td>Reserved</td> <td>Reserved</td> <td>Reserved</td> <td>Reserved</td> </tr>
274  * </table>
275  * - \ref IM_IR7 : IP Conflict Interrupt Mask
276  * - \ref IM_IR6 : Destination unreachable Interrupt Mask
277  * - \ref IM_IR5 : PPPoE Close Interrupt Mask
278  * - \ref IM_IR4 : Magic Packet Interrupt Mask
279  */
280  //M20150401 : Rename SYMBOE ( Re-define error in a compile)
281  //,ZRTOS_VFS_MODULE_W5500_REGISTER__IMR = 0x0016
283 
284  /**
285  * @ingroup Common_register_group
286  * @brief Socket Interrupt Register(R/W)
287  * @details @ref SIR indicates the interrupt status of Socket.\n
288  * Each bit of @ref SIR be still until @ref Sn_IR is cleared by the host.\n
289  * If @ref Sn_IR is not equal to x00 the n-th bit of @ref SIR is and INTn PIN is asserted until @ref SIR is x00 */
291 
292  /**
293  * @ingroup Common_register_group
294  * @brief Socket Interrupt Mask Register(R/W)
295  * @details Each bit of @ref SIMR corresponds to each bit of @ref SIR.
296  * When a bit of @ref SIMR is and the corresponding bit of @ref SIR is Interrupt will be issued.
297  * In other words, if a bit of @ref SIMR is an interrupt will be not issued even if the corresponding bit of @ref SIR is
298  */
300 
301  /**
302  * @ingroup Common_register_group
303  * @brief Timeout register address( 1 is 100us )(R/W)
304  * @details @ref _RTR_ configures the retransmission timeout period. The unit of timeout period is 100us and the default of @ref _RTR_ is x07D0.
305  * And so the default timeout period is 200ms(100us X 2000). During the time configured by @ref _RTR_, W5500 waits for the peer response
306  * to the packet that is transmitted by \ref Sn_CR (CONNECT, DISCON, CLOSE, SEND, SEND_MAC, SEND_KEEP command).
307  * If the peer does not respond within the @ref _RTR_ time, W5500 retransmits the packet or issues timeout.
308  */
309  //M20150401 : Rename SYMBOE ( Re-define error in a compile)
310  //,ZRTOS_VFS_MODULE_W5500_REGISTER__RTR = 0x0019
312 
313  /**
314  * @ingroup Common_register_group
315  * @brief Retry count register(R/W)
316  * @details @ref _RCR_ configures the number of time of retransmission.
317  * When retransmission occurs as many as ref _RCR_+1 Timeout interrupt is issued (@ref Sn_IR_TIMEOUT = '1').
318  */
319  //M20150401 : Rename SYMBOE ( Re-define error in a compile)
320  //,ZRTOS_VFS_MODULE_W5500_REGISTER__RCR = 0x001B
322 
323  /**
324  * @ingroup Common_register_group
325  * @brief PPP LCP Request Timer register in PPPoE mode(R/W)
326  * @details @ref PTIMER configures the time for sending LCP echo request. The unit of time is 25ms.
327  */
329 
330  /**
331  * @ingroup Common_register_group
332  * @brief PPP LCP Magic number register in PPPoE mode(R/W)
333  * @details @ref PMAGIC configures the 4bytes magic number to be used in LCP negotiation.
334  */
336 
337  /**
338  * @ingroup Common_register_group
339  * @brief PPP Destination MAC Register address(R/W)
340  * @details @ref PHAR configures the PPPoE server hardware address that is acquired during PPPoE connection process.
341  */
343 
344  /**
345  * @ingroup Common_register_group
346  * @brief PPP Session Identification Register(R/W)
347  * @details @ref PSID configures the PPPoE sever session ID acquired during PPPoE connection process.
348  */
350 
351  /**
352  * @ingroup Common_register_group
353  * @brief PPP Maximum Segment Size(MSS) register(R/W)
354  * @details @ref PMRU configures the maximum receive unit of PPPoE.
355  */
357 
358  /**
359  * @ingroup Common_register_group
360  * @brief Unreachable IP register address in UDP mode(R)
361  * @details W5500 receives an ICMP packet(Destination port unreachable) when data is sent to a port number
362  * which socket is not open and @ref IR_UNREACH bit of @ref IR becomes and @ref UIPR & @ref UPORTR indicates
363  * the destination IP address & port number respectively.
364  */
366 
367  /**
368  * @ingroup Common_register_group
369  * @brief Unreachable Port register address in UDP mode(R)
370  * @details W5500 receives an ICMP packet(Destination port unreachable) when data is sent to a port number
371  * which socket is not open and @ref IR_UNREACH bit of @ref IR becomes and @ref UIPR & @ref UPORTR
372  * indicates the destination IP address & port number respectively.
373  */
375 
376  /**
377  * @ingroup Common_register_group
378  * @brief PHY Status Register(R/W)
379  * @details @ref PHYCFGR configures PHY operation mode and resets PHY. In addition, @ref PHYCFGR indicates the status of PHY such as duplex, Speed, Link.
380  */
382 
383  // Reserved = 0x002F
384  // Reserved = 0x0030
385  // Reserved = 0x0031
386  // Reserved = 0x0032
387  // Reserved = 0x0033
388  // Reserved = 0x0034
389  // Reserved = 0x0035
390  // Reserved = 0x0036
391  // Reserved = 0x0037
392  // Reserved = 0x0038
393 
394  /**
395  * @ingroup Common_register_group
396  * @brief chip version register address(R)
397  * @details @ref VERSIONR always indicates the W5500 version as @b 0x04.
398  */
400 
Mode Register address(R/W) MR is used for S/W reset, ping block mode, PPPoE mode and etc...
Definition: lib/w5500.h:210
zrtos_vfs_module_w5500_register_t
Definition: lib/w5500.h:194

◆ zrtos_vfs_module_w5500_socket_register_command_t

Enumerator
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_COMMAND__OPEN 

Initialize or open socket.

Socket n is initialized and opened according to the protocol selected in Sn_MR(P3:P0). The table below shows the value of Sn_SR corresponding to Sn_MR.

Sn_MR (P[3:0]) Sn_SR
Sn_MR_CLOSE (000)
Sn_MR_TCP (001) SOCK_INIT (0x13)
Sn_MR_UDP (010) SOCK_UDP (0x22)
S0_MR_MACRAW (100) SOCK_MACRAW (0x02)
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_COMMAND__LISTEN 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_COMMAND__CONNECT 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_COMMAND__DISCON 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_COMMAND__CLOSE 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_COMMAND__SEND 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_COMMAND__SEND_MAC 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_COMMAND__SEND_KEEP 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_COMMAND__RECV 

Definition at line 931 of file lib/w5500.h.

931  {
932  /**
933  * @brief Initialize or open socket
934  * @details Socket n is initialized and opened according to the protocol selected in Sn_MR(P3:P0).
935  * The table below shows the value of @ref Sn_SR corresponding to @ref Sn_MR.\n
936  * <table>
937  * <tr> <td>\b Sn_MR (P[3:0])</td> <td>\b Sn_SR</td> </tr>
938  * <tr> <td>Sn_MR_CLOSE (000)</td> <td></td> </tr>
939  * <tr> <td>Sn_MR_TCP (001)</td> <td>SOCK_INIT (0x13)</td> </tr>
940  * <tr> <td>Sn_MR_UDP (010)</td> <td>SOCK_UDP (0x22)</td> </tr>
941  * <tr> <td>S0_MR_MACRAW (100)</td> <td>SOCK_MACRAW (0x02)</td> </tr>
942  * </table>
943  */
945 
946  /**
947  * @brief Wait connection request in TCP mode(Server mode)
948  * @details This is valid only in TCP mode (\ref Sn_MR(P3:P0) = \ref Sn_MR_TCP).
949  * In this mode, Socket n operates as a TCP serverand waits for connection-request (SYN packet) from any TCP client
950  * The @ref Sn_SR changes the state from \ref SOCK_INIT to \ref SOCKET_LISTEN.
951  * When a TCP clientconnection request is successfully established,
952  * the @ref Sn_SR changes from SOCK_LISTEN to SOCK_ESTABLISHED and the @ref Sn_IR(0) becomes
953  * But when a TCP clientconnection request is failed, @ref Sn_IR(3) becomes and the status of @ref Sn_SR changes to SOCK_CLOSED.
954  */
956 
957  /**
958  * @brief Send connection request in TCP mode(Client mode)
959  * @details To connect, a connect-request (SYN packet) is sent to <b>TCP server</b>configured by @ref Sn_DIPR & Sn_DPORT(destination address & port).
960  * If the connect-request is successful, the @ref Sn_SR is changed to @ref SOCK_ESTABLISHED and the Sn_IR(0) becomes \n\n
961  * The connect-request fails in the following three cases.\n
962  * 1. When a @b ARPTO occurs (@ref Sn_IR[3] = ) because destination hardware address is not acquired through the ARP-process.\n
963  * 2. When a @b SYN/ACK packet is not received and @b TCPTO (Sn_IR(3) = )\n
964  * 3. When a @b RST packet is received instead of a @b SYN/ACK packet. In these cases, @ref Sn_SR is changed to @ref SOCK_CLOSED.
965  * @note This is valid only in TCP mode and operates when Socket n acts as <b>TCP client</b>
966  */
968 
969  /**
970  * @brief Send closing request in TCP mode
971  * @details Regardless of <b>TCP server</b>or <b>TCP client</b> the DISCON command processes the disconnect-process (b>Active close</b>or <b>Passive close</b>.\n
972  * @par Active close
973  * it transmits disconnect-request(FIN packet) to the connected peer\n
974  * @par Passive close
975  * When FIN packet is received from peer, a FIN packet is replied back to the peer.\n
976  * @details When the disconnect-process is successful (that is, FIN/ACK packet is received successfully), @ref Sn_SR is changed to @ref SOCK_CLOSED.\n
977  * Otherwise, TCPTO occurs (\ref Sn_IR(3)='1') and then @ref Sn_SR is changed to @ref SOCK_CLOSED.
978  * @note Valid only in TCP mode.
979  */
981 
982  /**
983  * @brief Close socket
984  * @details Sn_SR is changed to @ref SOCK_CLOSED.
985  */
987 
988  /**
989  * @brief Update TX buffer pointer and send data
990  * @details SEND transmits all the data in the Socket n TX buffer.\n
991  * For more details, please refer to Socket n TX Free Size Register (@ref Sn_TX_FSR), Socket n,
992  * TX Write Pointer Register(@ref Sn_TX_WR), and Socket n TX Read Pointer Register(@ref Sn_TX_RD).
993  */
995 
996  /**
997  * @brief Send data with MAC address, so without ARP process
998  * @details The basic operation is same as SEND.\n
999  * Normally SEND transmits data after destination hardware address is acquired by the automatic ARP-process(Address Resolution Protocol).\n
1000  * But SEND_MAC transmits data without the automatic ARP-process.\n
1001  * In this case, the destination hardware address is acquired from @ref Sn_DHAR configured by host, instead of APR-process.
1002  * @note Valid only in UDP mode.
1003  */
1005 
1006  /**
1007  * @brief Send keep alive message
1008  * @details It checks the connection status by sending 1byte keep-alive packet.\n
1009  * If the peer can not respond to the keep-alive packet during timeout time, the connection is terminated and the timeout interrupt will occur.
1010  * @note Valid only in TCP mode.
1011  */
1013 
1014  /**
1015  * @brief Update RX buffer pointer and receive data
1016  * @details RECV completes the processing of the received data in Socket n RX Buffer by using a RX read pointer register (@ref Sn_RX_RD).\n
1017  * For more details, refer to Socket n RX Received Size Register (@ref Sn_RX_RSR), Socket n RX Write Pointer Register (@ref Sn_RX_WR),
1018  * and Socket n RX Read Pointer Register (@ref Sn_RX_RD).
1019  */
zrtos_vfs_module_w5500_socket_register_command_t
Definition: lib/w5500.h:931

◆ zrtos_vfs_module_w5500_socket_register_interrupt_t

Enumerator
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_INTERRUPT__SENDOK 

SEND_OK Interrupt.

This is issued when SEND command is completed.

ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_INTERRUPT__TIMEOUT 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_INTERRUPT__RECV 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_INTERRUPT__DISCON 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_INTERRUPT__CON 

Definition at line 1023 of file lib/w5500.h.

1023  {
1024  /* Sn_IR values */
1025  /**
1026  * @brief SEND_OK Interrupt
1027  * @details This is issued when SEND command is completed.
1028  */
1030 
1031  /**
1032  * @brief TIMEOUT Interrupt
1033  * @details This is issued when ARPTO or TCPTO occurs.
1034  */
1036 
1037  /**
1038  * @brief RECV Interrupt
1039  * @details This is issued whenever data is received from a peer.
1040  */
1042 
1043  /**
1044  * @brief DISCON Interrupt
1045  * @details This is issued when FIN or FIN/ACK packet is received from a peer.
1046  */
1048 
1049  /**
1050  * @brief CON Interrupt
1051  * @details This is issued one time when the connection with peer is successful and then @ref Sn_SR is changed to @ref SOCK_ESTABLISHED.
1052  */
zrtos_vfs_module_w5500_socket_register_interrupt_t
Definition: lib/w5500.h:1023

◆ zrtos_vfs_module_w5500_socket_register_mode_t

Enumerator
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__MULTI 

Support UDP Multicasting.

0 : disable Multicasting
1 : enable Multicasting
This bit is applied only during UDP mode(P[3:0] = 010.
To use multicasting, Sn_DIPR & Sn_DPORT should be respectively configured with the multicast group IP address & port number before Socket n is opened by OPEN command of Sn_CR.

ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__BCASTB 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__ND 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__UCASTB 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__MACRAW 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__IPRAW 

IP LAYER RAW SOCK.

ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__UDP 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__TCP 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__CLOSE 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__MFEN 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__MMB 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__MIP6B 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__MC 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__STREAM 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__DGRAM 

Definition at line 814 of file lib/w5500.h.

814  {
815  /**
816  * @brief Support UDP Multicasting
817  * @details 0 : disable Multicasting\n
818  * 1 : enable Multicasting\n
819  * This bit is applied only during UDP mode(P[3:0] = 010.\n
820  * To use multicasting, @ref Sn_DIPR & @ref Sn_DPORT should be respectively configured with the multicast group IP address & port number
821  * before Socket n is opened by OPEN command of @ref Sn_CR.
822  */
824 
825  /**
826  * @brief Broadcast block in UDP Multicasting.
827  * @details 0 : disable Broadcast Blocking\n
828  * 1 : enable Broadcast Blocking\n
829  * This bit blocks to receive broadcasting packet during UDP mode(P[3:0] = 010.\m
830  * In addition, This bit does when MACRAW mode(P[3:0] = 100
831  */
833 
834  /**
835  * @brief No Delayed Ack(TCP), Multicast flag
836  * @details 0 : Disable No Delayed ACK option\n
837  * 1 : Enable No Delayed ACK option\n
838  * This bit is applied only during TCP mode (P[3:0] = 001.\n
839  * When this bit is It sends the ACK packet without delay as soon as a Data packet is received from a peer.\n
840  * When this bit is It sends the ACK packet after waiting for the timeout time configured by @ref _RTR_.
841  */
843 
844  /**
845  * @brief Unicast Block in UDP Multicasting
846  * @details 0 : disable Unicast Blocking\n
847  * 1 : enable Unicast Blocking\n
848  * This bit blocks receiving the unicast packet during UDP mode(P[3:0] = 010 and MULTI =
849  */
851 
852  /**
853  * @brief MAC LAYER RAW SOCK
854  * @details This configures the protocol mode of Socket n.
855  * @note MACRAW mode should be only used in Socket 0.
856  */
858 
859  ,ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_MODE__IPRAW = 0x03 /**< IP LAYER RAW SOCK */
860 
861  /**
862  * @brief UDP
863  * @details This configures the protocol mode of Socket n.
864  */
866 
867  /**
868  * @brief TCP
869  * @details This configures the protocol mode of Socket n.
870  */
872 
873  /**
874  * @brief Unused socket
875  * @details This configures the protocol mode of Socket n.
876  */
878 
879  /* Sn_MR values used with Sn_MR_MACRAW */
880  /**
881  * @brief MAC filter enable in @ref Sn_MR_MACRAW mode
882  * @details 0 : disable MAC Filtering\n
883  * 1 : enable MAC Filtering\n
884  * This bit is applied only during MACRAW mode(P[3:0] = 100.\n
885  * When set as W5500 can only receive broadcasting packet or packet sent to itself.
886  * When this bit is W5500 can receive all packets on Ethernet.
887  * If user wants to implement Hybrid TCP/IP stack,
888  * it is recommended that this bit is set as for reducing host overhead to process the all received packets.
889  */
891 
892  /**
893  * @brief Multicast Blocking in @ref Sn_MR_MACRAW mode
894  * @details 0 : using IGMP version 2\n
895  * 1 : using IGMP version 1\n
896  * This bit is applied only during UDP mode(P[3:0] = 010 and MULTI =
897  * It configures the version for IGMP messages (Join/Leave/Report).
898  */
900 
901  /**
902  * @brief IPv6 packet Blocking in @ref Sn_MR_MACRAW mode
903  * @details 0 : disable IPv6 Blocking\n
904  * 1 : enable IPv6 Blocking\n
905  * This bit is applied only during MACRAW mode (P[3:0] = 100. It blocks to receiving the IPv6 packet.
906  */
908 
909  /* Sn_MR value used with Sn_MR_UDP & Sn_MR_MULTI */
910  /**
911  * @brief IGMP version used in UDP mulitcasting
912  * @details 0 : disable Multicast Blocking\n
913  * 1 : enable Multicast Blocking\n
914  * This bit is applied only when MACRAW mode(P[3:0] = 100. It blocks to receive the packet with multicast MAC address.
915  */
917 
918  /* Sn_MR alternate values */
919  /**
920  * @brief For Berkeley Socket API
921  */
923 
924  /**
925  * @brief For Berkeley Socket API
926  */
zrtos_vfs_module_w5500_socket_register_mode_t
Definition: lib/w5500.h:814

◆ zrtos_vfs_module_w5500_socket_register_status_t

Enumerator
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__CLOSED 

Closed.

This indicates that Socket n is released.
When DICON, CLOSE command is ordered, or when a timeout occurs, it is changed to SOCK_CLOSED regardless of previous status.

ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__INIT 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__LISTEN 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__SYNSENT 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__SYNRECV 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__ESTABLISHED 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__FIN_WAIT 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__CLOSING 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__TIME_WAIT 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__CLOSE_WAIT 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__LAST_ACK 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__UDP 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__IPRAW 

IP raw mode socket.

ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__MACRAW 

Definition at line 1057 of file lib/w5500.h.

1057  {
1058  /**
1059  * @brief Closed
1060  * @details This indicates that Socket n is released.\n
1061  * When DICON, CLOSE command is ordered, or when a timeout occurs, it is changed to @ref SOCK_CLOSED regardless of previous status.
1062  */
1064 
1065  /**
1066  * @brief Initiate state
1067  * @details This indicates Socket n is opened with TCP mode.\n
1068  * It is changed to @ref SOCK_INIT when @ref Sn_MR(P[3:0]) = 001 and OPEN command is ordered.\n
1069  * After @ref SOCK_INIT, user can use LISTEN /CONNECT command.
1070  */
1072 
1073  /**
1074  * @brief Listen state
1075  * @details This indicates Socket n is operating as <b>TCP server</b>mode and waiting for connection-request (SYN packet) from a peer <b>TCP client</b>.\n
1076  * It will change to @ref SOCK_ESTALBLISHED when the connection-request is successfully accepted.\n
1077  * Otherwise it will change to @ref SOCK_CLOSED after TCPTO @ref Sn_IR(TIMEOUT) = '1') is occurred.
1078  */
1080 
1081  /**
1082  * @brief Connection state
1083  * @details This indicates Socket n sent the connect-request packet (SYN packet) to a peer.\n
1084  * It is temporarily shown when @ref Sn_SR is changed from @ref SOCK_INIT to @ref SOCK_ESTABLISHED by CONNECT command.\n
1085  * If connect-accept(SYN/ACK packet) is received from the peer at SOCK_SYNSENT, it changes to @ref SOCK_ESTABLISHED.\n
1086  * Otherwise, it changes to @ref SOCK_CLOSED after TCPTO (@ref Sn_IR[TIMEOUT] = '1') is occurred.
1087  */
1089 
1090  /**
1091  * @brief Connection state
1092  * @details It indicates Socket n successfully received the connect-request packet (SYN packet) from a peer.\n
1093  * If socket n sends the response (SYN/ACK packet) to the peer successfully, it changes to @ref SOCK_ESTABLISHED. \n
1094  * If not, it changes to @ref SOCK_CLOSED after timeout (@ref Sn_IR[TIMEOUT] = '1') is occurred.
1095  */
1097 
1098  /**
1099  * @brief Success to connect
1100  * @details This indicates the status of the connection of Socket n.\n
1101  * It changes to @ref SOCK_ESTABLISHED when the <b>TCP SERVER</b>processed the SYN packet from the <b>TCP CLIENT</b>during @ref SOCK_LISTEN, or
1102  * when the CONNECT command is successful.\n
1103  * During @ref SOCK_ESTABLISHED, DATA packet can be transferred using SEND or RECV command.
1104  */
1106 
1107  /**
1108  * @brief Closing state
1109  * @details These indicate Socket n is closing.\n
1110  * These are shown in disconnect-process such as active-close and passive-close.\n
1111  * When Disconnect-process is successfully completed, or when timeout occurs, these change to @ref SOCK_CLOSED.
1112  */
1114 
1115  /**
1116  * @brief Closing state
1117  * @details These indicate Socket n is closing.\n
1118  * These are shown in disconnect-process such as active-close and passive-close.\n
1119  * When Disconnect-process is successfully completed, or when timeout occurs, these change to @ref SOCK_CLOSED.
1120  */
1122 
1123  /**
1124  * @brief Closing state
1125  * @details These indicate Socket n is closing.\n
1126  * These are shown in disconnect-process such as active-close and passive-close.\n
1127  * When Disconnect-process is successfully completed, or when timeout occurs, these change to @ref SOCK_CLOSED.
1128  */
1130 
1131  /**
1132  * @brief Closing state
1133  * @details This indicates Socket n received the disconnect-request (FIN packet) from the connected peer.\n
1134  * This is half-closing status, and data can be transferred.\n
1135  * For full-closing, DISCON command is used. But For just-closing, CLOSE command is used.
1136  */
1138 
1139  /**
1140  * @brief Closing state
1141  * @details This indicates Socket n is waiting for the response (FIN/ACK packet) to the disconnect-request (FIN packet) by passive-close.\n
1142  * It changes to @ref SOCK_CLOSED when Socket n received the response successfully, or when timeout(@ref Sn_IR[TIMEOUT] = '1') is occurred.
1143  */
1145 
1146  /**
1147  * @brief UDP socket
1148  * @details This indicates Socket n is opened in UDP mode(@ref Sn_MR(P[3:0]) = '010').\n
1149  * It changes to SOCK_UDP when @ref Sn_MR(P[3:0]) = '010' and @ref Sn_CR_OPEN command is ordered.\n
1150  * Unlike TCP mode, data can be transfered without the connection-process.
1151  */
1153 
1154  ,ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER_STATUS__IPRAW = 0x32 /**< IP raw mode socket */
1155 
1156  /**
1157  * @brief MAC raw mode socket
1158  * @details This indicates Socket 0 is opened in MACRAW mode (S0_MR(P[3:0]) = 100and is valid only in Socket 0.\n
1159  * It changes to SOCK_MACRAW when S0_MR(P[3:0] = 100and OPEN command is ordered.\n
1160  * Like UDP mode socket, MACRAW mode Socket 0 can transfer a MAC packet (Ethernet frame) without the connection-process.
1161  */
1163 
1164  //#define SOCK_PPPOE 0x5F
zrtos_vfs_module_w5500_socket_register_status_t
Definition: lib/w5500.h:1057

◆ zrtos_vfs_module_w5500_socket_register_t

Enumerator
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__MR 

socket Mode register(R/W)

Sn_MR configures the option or protocol type of Socket n.

Each bit of Sn_MR defined as the following.

7 6 5 4 3 2 1 0
MULTI/MFEN BCASTB ND/MC/MMB UCASTB/MIP6B Protocol[3] Protocol[2] Protocol[1] Protocol[0]
  • Sn_MR_MULTI : Support UDP Multicasting
  • Sn_MR_BCASTB : Broadcast block in UDP Multicasting
  • Sn_MR_ND : No Delayed Ack(TCP) flag
  • Sn_MR_MC : IGMP version used in UDP mulitcasting
  • Sn_MR_MMB : Multicast Blocking in Sn_MR_MACRAW mode
  • Sn_MR_UCASTB : Unicast Block in UDP Multicating
  • Sn_MR_MIP6B : IPv6 packet Blocking in Sn_MR_MACRAW mode
  • Protocol
    Protocol[3] Protocol[2] Protocol[1] Protocol[0] Meaning
    0 0 0 0 Closed
    0 0 0 1 TCP
    0 0 1 0 UDP
    0 1 0 0 MACRAW
    • Sn_MR_MACRAW : MAC LAYER RAW SOCK

Sn_MR_UDP : UDP

  • Sn_MR_TCP : TCP
  • Sn_MR_CLOSE : Unused socket
    Note
    MACRAW mode should be only used in Socket 0.
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__CR 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__IR 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__SR 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__PORT 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__DHAR 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__DIPR 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__DPORT 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__MSSR 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__TOS 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__TTL 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__RXBUF_SIZE 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__TXBUF_SIZE 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__TX_FSR 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__TX_RD 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__TX_WR 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__RX_RSR 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__RX_RD 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__RX_WR 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__IMR 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__FRAG 
ZRTOS_VFS_MODULE_W5500_SOCKET_REGISTER__KPALVTR 

Definition at line 404 of file lib/w5500.h.

404  {
405  /**
406  * @ingroup Socket_register_group
407  * @brief socket Mode register(R/W)
408  * @details @ref Sn_MR configures the option or protocol type of Socket n.\n\n
409  * Each bit of @ref Sn_MR defined as the following.
410  * <table>
411  * <tr> <td>7</td> <td>6</td> <td>5</td> <td>4</td> <td>3</td> <td>2</td> <td>1</td> <td>0</td> </tr>
412  * <tr> <td>MULTI/MFEN</td> <td>BCASTB</td> <td>ND/MC/MMB</td> <td>UCASTB/MIP6B</td> <td>Protocol[3]</td> <td>Protocol[2]</td> <td>Protocol[1]</td> <td>Protocol[0]</td> </tr>
413  * </table>
414  * - @ref Sn_MR_MULTI : Support UDP Multicasting
415  * - @ref Sn_MR_BCASTB : Broadcast block <b>in UDP Multicasting</b>
416  * - @ref Sn_MR_ND : No Delayed Ack(TCP) flag
417  * - @ref Sn_MR_MC : IGMP version used <b>in UDP mulitcasting</b>
418  * - @ref Sn_MR_MMB : Multicast Blocking <b>in @ref Sn_MR_MACRAW mode</b>
419  * - @ref Sn_MR_UCASTB : Unicast Block <b>in UDP Multicating</b>
420  * - @ref Sn_MR_MIP6B : IPv6 packet Blocking <b>in @ref Sn_MR_MACRAW mode</b>
421  * - <b>Protocol</b>
422  * <table>
423  * <tr> <td><b>Protocol[3]</b></td> <td><b>Protocol[2]</b></td> <td><b>Protocol[1]</b></td> <td><b>Protocol[0]</b></td> <td>@b Meaning</td> </tr>
424  * <tr> <td>0</td> <td>0</td> <td>0</td> <td>0</td> <td>Closed</td> </tr>
425  * <tr> <td>0</td> <td>0</td> <td>0</td> <td>1</td> <td>TCP</td> </tr>
426  * <tr> <td>0</td> <td>0</td> <td>1</td> <td>0</td> <td>UDP</td> </tr>
427  * <tr> <td>0</td> <td>1</td> <td>0</td> <td>0</td> <td>MACRAW</td> </tr>
428  * </table>
429  * - @ref Sn_MR_MACRAW : MAC LAYER RAW SOCK \n
430  * - @ref Sn_MR_UDP : UDP
431  * - @ref Sn_MR_TCP : TCP
432  * - @ref Sn_MR_CLOSE : Unused socket
433  * @note MACRAW mode should be only used in Socket 0.
434  */
436 
437  /**
438  * @ingroup Socket_register_group
439  * @brief Socket command register(R/W)
440  * @details This is used to set the command for Socket n such as OPEN, CLOSE, CONNECT, LISTEN, SEND, and RECEIVE.\n
441  * After W5500 accepts the command, the @ref Sn_CR register is automatically cleared to 0x00.
442  * Even though @ref Sn_CR is cleared to 0x00, the command is still being processed.\n
443  * To check whether the command is completed or not, please check the @ref Sn_IR or @ref Sn_SR.
444  * - @ref Sn_CR_OPEN : Initialize or open socket.
445  * - @ref Sn_CR_LISTEN : Wait connection request in TCP mode(<b>Server mode</b>)
446  * - @ref Sn_CR_CONNECT : Send connection request in TCP mode(<b>Client mode</b>)
447  * - @ref Sn_CR_DISCON : Send closing request in TCP mode.
448  * - @ref Sn_CR_CLOSE : Close socket.
449  * - @ref Sn_CR_SEND : Update TX buffer pointer and send data.
450  * - @ref Sn_CR_SEND_MAC : Send data with MAC address, so without ARP process.
451  * - @ref Sn_CR_SEND_KEEP : Send keep alive message.
452  * - @ref Sn_CR_RECV : Update RX buffer pointer and receive data.
453  */
455 
456  /**
457  * @ingroup Socket_register_group
458  * @brief Socket interrupt register(R)
459  * @details @ref Sn_IR indicates the status of Socket Interrupt such as establishment, termination, receiving data, timeout).\n
460  * When an interrupt occurs and the corresponding bit of @ref Sn_IMR is the corresponding bit of @ref Sn_IR becomes \n
461  * In order to clear the @ref Sn_IR bit, the host should write the bit to \n
462  * <table>
463  * <tr> <td>7</td> <td>6</td> <td>5</td> <td>4</td> <td>3</td> <td>2</td> <td>1</td> <td>0</td> </tr>
464  * <tr> <td>Reserved</td> <td>Reserved</td> <td>Reserved</td> <td>SEND_OK</td> <td>TIMEOUT</td> <td>RECV</td> <td>DISCON</td> <td>CON</td> </tr>
465  * </table>
466  * - \ref Sn_IR_SENDOK : <b>SEND_OK Interrupt</b>
467  * - \ref Sn_IR_TIMEOUT : <b>TIMEOUT Interrupt</b>
468  * - \ref Sn_IR_RECV : <b>RECV Interrupt</b>
469  * - \ref Sn_IR_DISCON : <b>DISCON Interrupt</b>
470  * - \ref Sn_IR_CON : <b>CON Interrupt</b>
471  */
473 
474  /**
475  * @ingroup Socket_register_group
476  * @brief Socket status register(R)
477  * @details @ref Sn_SR indicates the status of Socket n.\n
478  * The status of Socket n is changed by @ref Sn_CR or some special control packet as SYN, FIN packet in TCP.
479  * @par Normal status
480  * - @ref SOCK_CLOSED : Closed
481  * - @ref SOCK_INIT : Initiate state
482  * - @ref SOCK_LISTEN : Listen state
483  * - @ref SOCK_ESTABLISHED : Success to connect
484  * - @ref SOCK_CLOSE_WAIT : Closing state
485  * - @ref SOCK_UDP : UDP socket
486  * - @ref SOCK_MACRAW : MAC raw mode socket
487  *@par Temporary status during changing the status of Socket n.
488  * - @ref SOCK_SYNSENT : This indicates Socket n sent the connect-request packet (SYN packet) to a peer.
489  * - @ref SOCK_SYNRECV : It indicates Socket n successfully received the connect-request packet (SYN packet) from a peer.
490  * - @ref SOCK_FIN_WAIT : Connection state
491  * - @ref SOCK_CLOSING : Closing state
492  * - @ref SOCK_TIME_WAIT : Closing state
493  * - @ref SOCK_LAST_ACK : Closing state
494  */
496 
497  /**
498  * @ingroup Socket_register_group
499  * @brief source port register(R/W)
500  * @details @ref Sn_PORT configures the source port number of Socket n.
501  * It is valid when Socket n is used in TCP/UDP mode. It should be set before OPEN command is ordered.
502  */
504 
505  /**
506  * @ingroup Socket_register_group
507  * @brief Peer MAC register address(R/W)
508  * @details @ref Sn_DHAR configures the destination hardware address of Socket n when using SEND_MAC command in UDP mode or
509  * it indicates that it is acquired in ARP-process by CONNECT/SEND command.
510  */
512 
513  /**
514  * @ingroup Socket_register_group
515  * @brief Peer IP register address(R/W)
516  * @details @ref Sn_DIPR configures or indicates the destination IP address of Socket n. It is valid when Socket n is used in TCP/UDP mode.
517  * In TCP client mode, it configures an IP address of TCP serverbefore CONNECT command.
518  * In TCP server mode, it indicates an IP address of TCP clientafter successfully establishing connection.
519  * In UDP mode, it configures an IP address of peer to be received the UDP packet by SEND or SEND_MAC command.
520  */
522 
523  /**
524  * @ingroup Socket_register_group
525  * @brief Peer port register address(R/W)
526  * @details @ref Sn_DPORT configures or indicates the destination port number of Socket n. It is valid when Socket n is used in TCP/UDP mode.
527  * In TCP clientmode, it configures the listen port number of TCP serverbefore CONNECT command.
528  * In TCP Servermode, it indicates the port number of TCP client after successfully establishing connection.
529  * In UDP mode, it configures the port number of peer to be transmitted the UDP packet by SEND/SEND_MAC command.
530  */
532 
533  /**
534  * @ingroup Socket_register_group
535  * @brief Maximum Segment Size(Sn_MSSR0) register address(R/W)
536  * @details @ref Sn_MSSR configures or indicates the MTU(Maximum Transfer Unit) of Socket n.
537  */
539 
540  // Reserved 0x0014
541 
542  /**
543  * @ingroup Socket_register_group
544  * @brief IP Type of Service(TOS) Register(R/W)
545  * @details @ref Sn_TOS configures the TOS(Type Of Service field in IP Header) of Socket n.
546  * It is set before OPEN command.
547  */
549  /**
550  * @ingroup Socket_register_group
551  * @brief IP Time to live(TTL) Register(R/W)
552  * @details @ref Sn_TTL configures the TTL(Time To Live field in IP header) of Socket n.
553  * It is set before OPEN command.
554  */
556  // Reserved 0x0017
557  // Reserved 0x0018
558  // Reserved 0x0019
559  // Reserved 0x001A
560  // Reserved 0x001B
561  // Reserved 0x001C
562  // Reserved 0x001D
563 
564  /**
565  * @ingroup Socket_register_group
566  * @brief Receive memory size register(R/W)
567  * @details @ref Sn_RXBUF_SIZE configures the RX buffer block size of Socket n.
568  * Socket n RX Buffer Block size can be configured with 1,2,4,8, and 16 Kbytes.
569  * If a different size is configured, the data cannot be normally received from a peer.
570  * Although Socket n RX Buffer Block size is initially configured to 2Kbytes,
571  * user can re-configure its size using @ref Sn_RXBUF_SIZE. The total sum of @ref Sn_RXBUF_SIZE can not be exceed 16Kbytes.
572  * When exceeded, the data reception error is occurred.
573  */
575 
576  /**
577  * @ingroup Socket_register_group
578  * @brief Transmit memory size register(R/W)
579  * @details @ref Sn_TXBUF_SIZE configures the TX buffer block size of Socket n. Socket n TX Buffer Block size can be configured with 1,2,4,8, and 16 Kbytes.
580  * If a different size is configured, the data can�t be normally transmitted to a peer.
581  * Although Socket n TX Buffer Block size is initially configured to 2Kbytes,
582  * user can be re-configure its size using @ref Sn_TXBUF_SIZE. The total sum of @ref Sn_TXBUF_SIZE can not be exceed 16Kbytes.
583  * When exceeded, the data transmission error is occurred.
584  */
586 
587  /**
588  * @ingroup Socket_register_group
589  * @brief Transmit free memory size register(R)
590  * @details @ref Sn_TX_FSR indicates the free size of Socket n TX Buffer Block. It is initialized to the configured size by @ref Sn_TXBUF_SIZE.
591  * Data bigger than @ref Sn_TX_FSR should not be saved in the Socket n TX Buffer because the bigger data overwrites the previous saved data not yet sent.
592  * Therefore, check before saving the data to the Socket n TX Buffer, and if data is equal or smaller than its checked size,
593  * transmit the data with SEND/SEND_MAC command after saving the data in Socket n TX buffer. But, if data is bigger than its checked size,
594  * transmit the data after dividing into the checked size and saving in the Socket n TX buffer.
595  */
597 
598  /**
599  * @ingroup Socket_register_group
600  * @brief Transmit memory read pointer register address(R)
601  * @details @ref Sn_TX_RD is initialized by OPEN command. However, if Sn_MR(P[3:0]) is TCP mode(001, it is re-initialized while connecting with TCP.
602  * After its initialization, it is auto-increased by SEND command.
603  * SEND command transmits the saved data from the current @ref Sn_TX_RD to the @ref Sn_TX_WR in the Socket n TX Buffer.
604  * After transmitting the saved data, the SEND command increases the @ref Sn_TX_RD as same as the @ref Sn_TX_WR.
605  * If its increment value exceeds the maximum value 0xFFFF, (greater than 0x10000 and the carry bit occurs),
606  * then the carry bit is ignored and will automatically update with the lower 16bits value.
607  */
609 
610  /**
611  * @ingroup Socket_register_group
612  * @brief Transmit memory write pointer register address(R/W)
613  * @details @ref Sn_TX_WR is initialized by OPEN command. However, if Sn_MR(P[3:0]) is TCP mode(001, it is re-initialized while connecting with TCP.\n
614  * It should be read or be updated like as follows.\n
615  * 1. Read the starting address for saving the transmitting data.\n
616  * 2. Save the transmitting data from the starting address of Socket n TX buffer.\n
617  * 3. After saving the transmitting data, update @ref Sn_TX_WR to the increased value as many as transmitting data size.
618  * If the increment value exceeds the maximum value 0xFFFF(greater than 0x10000 and the carry bit occurs),
619  * then the carry bit is ignored and will automatically update with the lower 16bits value.\n
620  * 4. Transmit the saved data in Socket n TX Buffer by using SEND/SEND command
621  */
623 
624  /**
625  * @ingroup Socket_register_group
626  * @brief Received data size register(R)
627  * @details @ref Sn_RX_RSR indicates the data size received and saved in Socket n RX Buffer.
628  * @ref Sn_RX_RSR does not exceed the @ref Sn_RXBUF_SIZE and is calculated as the difference between
629  * �Socket n RX Write Pointer (@ref Sn_RX_WR)and �Socket n RX Read Pointer (@ref Sn_RX_RD)
630  */
632 
633  /**
634  * @ingroup Socket_register_group
635  * @brief Read point of Receive memory(R/W)
636  * @details @ref Sn_RX_RD is initialized by OPEN command. Make sure to be read or updated as follows.\n
637  * 1. Read the starting save address of the received data.\n
638  * 2. Read data from the starting address of Socket n RX Buffer.\n
639  * 3. After reading the received data, Update @ref Sn_RX_RD to the increased value as many as the reading size.
640  * If the increment value exceeds the maximum value 0xFFFF, that is, is greater than 0x10000 and the carry bit occurs,
641  * update with the lower 16bits value ignored the carry bit.\n
642  * 4. Order RECV command is for notifying the updated @ref Sn_RX_RD to W5500.
643  */
645 
646  /**
647  * @ingroup Socket_register_group
648  * @brief Write point of Receive memory(R)
649  * @details @ref Sn_RX_WR is initialized by OPEN command and it is auto-increased by the data reception.
650  * If the increased value exceeds the maximum value 0xFFFF, (greater than 0x10000 and the carry bit occurs),
651  * then the carry bit is ignored and will automatically update with the lower 16bits value.
652  */
654 
655  /**
656  * @ingroup Socket_register_group
657  * @brief socket interrupt mask register(R)
658  * @details @ref Sn_IMR masks the interrupt of Socket n.
659  * Each bit corresponds to each bit of @ref Sn_IR. When a Socket n Interrupt is occurred and the corresponding bit of @ref Sn_IMR is
660  * the corresponding bit of @ref Sn_IR becomes When both the corresponding bit of @ref Sn_IMR and @ref Sn_IR are and the n-th bit of @ref IR is
661  * Host is interrupted by asserted INTn PIN to low.
662  */
664 
665  /**
666  * @ingroup Socket_register_group
667  * @brief Fragment field value in IP header register(R/W)
668  * @details @ref Sn_FRAG configures the FRAG(Fragment field in IP header).
669  */
671 
672  /**
673  * @ingroup Socket_register_group
674  * @brief Keep Alive Timer register(R/W)
675  * @details @ref Sn_KPALVTR configures the transmitting timer of �KEEP ALIVE(KA)packet of SOCKETn. It is valid only in TCP mode,
676  * and ignored in other modes. The time unit is 5s.
677  * KA packet is transmittable after @ref Sn_SR is changed to SOCK_ESTABLISHED and after the data is transmitted or received to/from a peer at least once.
678  * In case of '@ref Sn_KPALVTR > 0', W5500 automatically transmits KA packet after time-period for checking the TCP connection (Auto-keepalive-process).
679  * In case of '@ref Sn_KPALVTR = 0', Auto-keep-alive-process will not operate,
680  * and KA packet can be transmitted by SEND_KEEP command by the host (Manual-keep-alive-process).
681  * Manual-keep-alive-process is ignored in case of '@ref Sn_KPALVTR > 0'.
682  */
684 
685  //#define Sn_TSR(N) 0x0030
socket Mode register(R/W)
Definition: lib/w5500.h:435
zrtos_vfs_module_w5500_socket_register_t
Definition: lib/w5500.h:404