w5500_def.h 1.2 KB

1234567891011121314151617181920212223242526272829
  1. #ifndef __W5500_H__
  2. #define __W5500_H__
  3. #include <stdint.h>
  4. #define _W5500_IO_BASE_ 0x00000000
  5. #define WIZCHIP_SREG_BLOCK(N) (1+4*N) //< Socket N register block
  6. #define Sn_PROTO(N) (_W5500_IO_BASE_ + (0x0014 << 8) + (WIZCHIP_SREG_BLOCK(N) << 3))
  7. ///-------------------------------------------------------------------------------------------------
  8. /// <summary> IP PROTOCOL. </summary>
  9. ///
  10. /// <remarks> Tony Wang, 14:49 19/3/21. </remarks>
  11. ///-------------------------------------------------------------------------------------------------
  12. #define IPPROTO_IP 0 /**< Dummy for IP */
  13. #define IPPROTO_ICMP 1 /**< Control message protocol */
  14. #define IPPROTO_IGMP 2 /**< Internet group management protocol */
  15. #define IPPROTO_GGP 3 /**< Gateway^2 (deprecated) */
  16. #define IPPROTO_TCP 6 /**< TCP */
  17. #define IPPROTO_PUP 12 /**< PUP */
  18. #define IPPROTO_UDP 17 /**< UDP */
  19. #define IPPROTO_IDP 22 /**< XNS idp */
  20. #define IPPROTO_ND 77 /**< UNOFFICIAL net disk protocol */
  21. #define IPPROTO_RAW 255 /**< Raw IP packet */
  22. #endif