io6Library
WIZnet Dual Stack TCP/IP Ethernet Controller Driver
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
wizchip_conf.h File Reference

WIZCHIP Config Header File. More...

#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  __WIZCHIP_T__
 Callback function set for _WIZCHIP_. More...
 
struct  __WIZCHIP_T__::_CRIS
 
struct  __WIZCHIP_T__::_CS
 
union  __WIZCHIP_T__::_IF
 
struct  __WIZCHIP_T__::_IF::_BUS
 < The callback function of _WIZCHIP_IO_MODE_BUS_ such as _WIZCHIP_IO_MODE_BUS_DIR_ and _WIZCHIP_IO_MODE_BUS_INDIR_ More...
 
struct  __WIZCHIP_T__::_IF::_SPI
 
struct  wiz_PhyConf_t
 Ethernet PHY operation mode configuration. More...
 
struct  wiz_NetInfo_t
 Network Information for _WIZCHIP_. More...
 
struct  wiz_NetTimeout_t
 Network Timeout for _WIZCHIP_. More...
 
struct  wiz_IPAddress_t
 Destination Information for Network Service of _WIZCHIP_. More...
 
struct  wiz_Prefix_t
 Prefix Information. More...
 
struct  wiz_ARP_t
 Destination Information & Destination Hardware Address for CNS_ARP. More...
 
struct  wiz_PING_t
 Destination Information & Destination Hardware Address for CNS_ARP. More...
 

Macros

#define W6100   6100
 W6100 Definition. More...
 
#define _WIZCHIP_   W6100
 Select WIZCHIP. More...
 
#define _WIZCHIP_IO_MODE_NONE_   0x0000
 
#define _WIZCHIP_IO_MODE_BUS_   0x0100
 Bus interface mode.
Refer to _WIZCHIP_IO_MODE_BUS_DIR_ or _WIZCHIP_IO_MODE_BUS_INDIR_. More...
 
#define _WIZCHIP_IO_MODE_SPI_   0x0200
 SPI interface mode.
Refer to _WIZCHIP_IO_MODE_SPI_VDM_ or _WIZCHIP_IO_MODE_SPI_FDM_. More...
 
#define _WIZCHIP_IO_MODE_BUS_DIR_   (_WIZCHIP_IO_MODE_BUS_ + 1)
 BUS interface mode for direct.
Refer to _WIZCHIP_IO_MODE_BUS_. More...
 
#define _WIZCHIP_IO_MODE_BUS_INDIR_   (_WIZCHIP_IO_MODE_BUS_ + 2)
 BUS interface mode for indirect.
Refer to _WIZCHIP_IO_MODE_BUS_. More...
 
#define _WIZCHIP_IO_MODE_SPI_VDM_   (_WIZCHIP_IO_MODE_SPI_ + 1)
 SPI interface mode for variable length data.
Refer to _WIZCHIP_IO_MODE_SPI_. More...
 
#define _WIZCHIP_IO_MODE_SPI_FDM_   (_WIZCHIP_IO_MODE_SPI_ + 2)
 SPI interface mode for fixed length data mode. More...
 
#define _PHY_IO_MODE_PHYCR_   0x0000
 PHY can be accessed by _PHYCR0_, _PHYCR1_. More...
 
#define _PHY_IO_MODE_MII_   0x0010
 PHY can be accessed by MDC/MDIO signals of MII interface. More...
 
#define _PHY_IO_MODE_   _PHY_IO_MODE_PHYCR_
 Select PHY Access Mode. More...
 
#define _WIZCHIP_SOCK_NUM_   8
 Define I/O base address of _WIZCHIP_. More...
 
#define SYS_CHIP_LOCK   (1<<2)
 CHIP LOCK.
Refer to CW_SYS_LOCK, CW_SYS_UNLOCK, and CW_GET_SYSLOCK. More...
 
#define SYS_NET_LOCK   (1<<1)
 NETWORK Information LOCK.
Refer to CW_SYS_LOCK, CW_SYS_UNLOCK, and CW_GET_SYSLOCK. More...
 
#define SYS_PHY_LOCK   (1<<0)
 PHY LOCK.
Refer to CW_SYS_LOCK, CW_SYS_UNLOCK, and CW_GET_SYSLOCK. More...
 
#define SYSCLK_100MHZ   0
 System Clock 100MHz.
Refer to Refer to CW_SET_SYSCLK and CW_GET_SYSCLK. More...
 
#define SYSCLK_25MHZ   1
 System Clock 25MHz.
Refer to Refer to CW_SET_SYSCLK and CW_GET_SYSCLK. More...
 
#define PHY_MODE_MANUAL   0
 Configured PHY operation mode with user setting.
Refer to CW_SET_PHYCONF and CW_GET_PHYCONF. More...
 
#define PHY_MODE_AUTONEGO   1
 Configured PHY operation mode with auto-negotiation.
Refer to CW_SET_PHYCONF and CW_GET_PHYCONF. More...
 
#define PHY_MODE_TE   2
 Configured PHY operation mode with 10Base-Te. More...
 
#define PHY_SPEED_10   0
 PHY Link Speed 10.
Refer to CW_SET_PHYCONF and CW_GET_PHYCONF. More...
 
#define PHY_SPEED_100   1
 PHY Link Speed 100.
Refer to CW_SET_PHYCONF and CW_GET_PHYCONF. More...
 
#define PHY_DUPLEX_HALF   0
 PHY Link Half-Duplex.
Refer to CW_SET_PHYCONF and CW_GET_PHYCONF. More...
 
#define PHY_DUPLEX_FULL   1
 PHY Link Full-Duplex.
Refer to CW_SET_PHYCONF and CW_GET_PHYCONF. More...
 
#define PHY_LINK_OFF   0
 PHY Link Off.
Refer to CW_GET_PHYLINK. More...
 
#define PHY_LINK_ON   1
 PHY Link On.
Refer to CW_GET_PHYLINK. More...
 
#define PHY_POWER_NORM   0
 PHY power normal mode.
Refer to CW_SET_PHYPOWMODE and CW_GET_PHYPOWMODE. More...
 
#define PHY_POWER_DOWN   1
 PHY power down mode.
Refer to CW_SET_PHYPOWMODE and CW_GET_PHYPOWMODE. More...
 
#define IPV6_ADDR_AUTO   0x00
 IPv6 Address Type : Auto.
Refer to CN_SET_PREFER, CN_GET_PREFER. More...
 
#define IPV6_ADDR_LLA   0x02
 IPv6 Address Type : LLA.
Refer to CN_SET_PREFER, CN_GET_PREFER, CNS_DAD. More...
 
#define IPV6_ADDR_GUA   0x03
 IPv6 Address Type : GUA.
Refer to CN_SET_PREFER, CN_GET_PREFER, CNS_DAD. More...
 

Typedefs

typedef struct __WIZCHIP_T__ _WIZCHIP_T_
 Callback function set for _WIZCHIP_. More...
 
typedef struct wiz_PhyConf_t wiz_PhyConf
 Ethernet PHY operation mode configuration. More...
 
typedef struct wiz_NetInfo_t wiz_NetInfo
 Network Information for _WIZCHIP_. More...
 
typedef struct wiz_NetTimeout_t wiz_NetTimeout
 Network Timeout for _WIZCHIP_. More...
 
typedef struct wiz_IPAddress_t wiz_IPAddress
 Destination Information for Network Service of _WIZCHIP_. More...
 
typedef struct wiz_Prefix_t wiz_Prefix
 Prefix Information. More...
 
typedef struct wiz_ARP_t wiz_ARP
 Destination Information & Destination Hardware Address for CNS_ARP. More...
 
typedef struct wiz_PING_t wiz_PING
 Destination Information & Destination Hardware Address for CNS_ARP. More...
 

Enumerations

enum  ctlwizchip_type {
  CW_SYS_LOCK, CW_SYS_UNLOCK, CW_GET_SYSLOCK, CW_RESET_WIZCHIP,
  CW_INIT_WIZCHIP, CW_GET_INTERRUPT, CW_CLR_INTERRUPT, CW_SET_INTRMASK,
  CW_GET_INTRMASK, CW_SET_INTRTIME, CW_GET_INTRTIME, CW_SET_IEN,
  CW_GET_IEN, CW_GET_ID, CW_GET_VER, CW_SET_SYSCLK,
  CW_GET_SYSCLK, CW_RESET_PHY, CW_SET_PHYCONF, CW_GET_PHYCONF,
  CW_GET_PHYSTATUS, CW_SET_PHYPOWMODE, CW_GET_PHYPOWMODE, CW_GET_PHYLINK
}
 _WIZCHIP_ Control Type Enumeration. More...
 
enum  ctlnetwork_type {
  CN_SET_NETINFO, CN_GET_NETINFO, CN_SET_NETMODE, CN_GET_NETMODE,
  CN_SET_TIMEOUT, CN_GET_TIMEOUT, CN_SET_PREFER, CN_GET_PREFER
}
 Network control type enumeration. More...
 
enum  ctlnetservice_type {
  CNS_ARP, CNS_PING, CNS_DAD, CNS_SLAAC,
  CNS_UNSOL_NA, CNS_GET_PREFIX
}
 Network Service Control Type enumeration. More...
 
enum  intr_kind {
  IK_PPPOE_TERMINATED = (1 << 0), IK_DEST_UNREACH = (1 << 1), IK_IP_CONFLICT = (1 << 2), IK_DEST_UNREACH6 = (1 << 4),
  IK_WOL = (1 << 7), IK_NET_ALL = (0x97), IK_SOCK_0 = (1 << 8), IK_SOCK_1 = (1 << 9),
  IK_SOCK_2 = (1 << 10), IK_SOCK_3 = (1 << 11), IK_SOCK_4 = (1 << 12), IK_SOCK_5 = (1 << 13),
  IK_SOCK_6 = (1 << 14), IK_SOCK_7 = (1 << 15), IK_SOCK_ALL = (0xFF << 8), IK_SOCKL_TOUT = (1 << 16),
  IK_SOCKL_ARP4 = (1 << 17), IK_SOCKL_PING4 = (1 << 18), IK_SOCKL_ARP6 = (1 << 19), IK_SOCKL_PING6 = (1 << 20),
  IK_SOCKL_NS = (1 << 21), IK_SOCKL_RS = (1 << 22), IK_SOCKL_RA = (1 << 23), IK_SOCKL_ALL = (0xFF << 16),
  IK_INT_ALL = (0x00FFFF97)
}
 Interrupt Kind. More...
 
enum  ipconf_mode {
  NETINFO_NONE = 0x00, NETINFO_STATIC_V4 = 0x01, NETINFO_STATIC_V6 = 0x02, NETINFO_STATIC_ALL = 0x03,
  NETINFO_SLAAC_V6 = 0x04, NETINFO_DHCP_V4 = 0x10, NETINFO_DHCP_V6 = 0x20, NETINFO_DHCP_ALL = 0x30
}
 IP Address Configuration Mode. More...
 
enum  netmode_type {
  NM_IPB_V4 = (1 << 0), NM_IPB_V6 = (1 << 1), NM_WOL = (1 << 2), NM_PB6_MULTI = (1 << 4),
  NM_PB6_ALLNODE = (1 << 5), NM_MR_MASK = (0x37), NM_PPPoE = (1 << 8), NM_DHA_SELECT = (1 << 15),
  NM_MR2_MASK = (0x09<<8), NM_PB4_ALL = (1 << 16), NM_TRSTB_V4 = (1 << 17), NM_PARP_V4 = (1 << 18),
  NM_UNRB_V4 = (1 << 19), NM_NET4_MASK = (0x0F << 16), NM_PB6_ALL = (1 << 24), NM_TRSTB_V6 = (1 << 25),
  NM_PARP_V6 = (1 << 26), NM_UNRB_V6 = (1 << 27), NM_NET6_MASK = (0x0F << 24), NM_MASK_ALL = (0x0F0F0937)
}
 Network mode Configuration. More...
 

Functions

void reg_wizchip_cris_cbfunc (void(*cris_en)(void), void(*cris_ex)(void))
 Registers call back functions for critical section. More...
 
void reg_wizchip_cs_cbfunc (void(*cs_sel)(void), void(*cs_desel)(void))
 Registers call back functions for _WIZCHIP_ select & deselect. More...
 
void reg_wizchip_bus_cbfunc (iodata_t(*bus_rd)(uint32_t addr), void(*bus_wd)(uint32_t addr, iodata_t wb), void(*bus_rbuf)(uint32_t addr, iodata_t *buf, datasize_t len, uint8_t inc), void(*bus_wbuf)(uint32_t addr, iodata_t *buf, datasize_t len, uint8_t inc))
 Registers call back functions for BUS interface. More...
 
void reg_wizchip_spi_cbfunc (uint8_t(*spi_rb)(void), void(*spi_wb)(uint8_t wb), void(*spi_rbuf)(uint8_t *buf, datasize_t len), void(*spi_wbuf)(uint8_t *buf, datasize_t len))
 Registers call back functions for SPI interface. More...
 
int8_t ctlwizchip (ctlwizchip_type cwtype, void *arg)
 Control _WIZCHIP_. More...
 
int8_t ctlnetwork (ctlnetwork_type cntype, void *arg)
 Controls to network. More...
 
int8_t ctlnetservice (ctlnetservice_type cnstype, void *arg)
 Controls to network service. More...
 
void wizchip_sw_reset (void)
 Soft Reset _WIZCHIP_. More...
 
int8_t wizchip_init (uint8_t *txsize, uint8_t *rxsize)
 Initializes SOCKETn TX/RX buffer size. More...
 
void wizchip_clrinterrupt (intr_kind intr)
 Clear Interrupt of _WIZCHIP_. More...
 
intr_kind wizchip_getinterrupt (void)
 Get Interrupt of _WIZCHIP_. More...
 
void wizchip_setinterruptmask (intr_kind intr)
 Mask or Unmask Interrupt of _WIZCHIP_. More...
 
intr_kind wizchip_getinterruptmask (void)
 Get Interrupt mask of _WIZCHIP_. More...
 
int8_t wizphy_getphylink (void)
 Get the Link status of integrated PHY. More...
 
void wizphy_reset (void)
 Reset the integrated PHY. More...
 
void wizphy_setphyconf (wiz_PhyConf *phyconf)
 
void wizphy_getphyconf (wiz_PhyConf *phyconf)
 Get the integrated Ethernet PHY operation mode. More...
 
void wizphy_getphystatus (wiz_PhyConf *phyconf)
 Get the real PHY operation status when link is established. More...
 
void wizphy_setphypmode (uint8_t pmode)
 Set the power mode of integrated Ethernet PHY. More...
 
int8_t wizphy_getphypmode (void)
 get the power mode of integrated Ethernet PHY. More...
 
void wizchip_setnetinfo (wiz_NetInfo *pnetinfo)
 Set the network information for _WIZCHIP_. More...
 
void wizchip_getnetinfo (wiz_NetInfo *pnetinfo)
 Get the network information of _WIZCHIP_. More...
 
void wizchip_setnetmode (netmode_type netmode)
 Set the network mode such as WOL, PPPoE, PING Block, and etc. More...
 
netmode_type wizchip_getnetmode (void)
 Get the network mode such as WOL, PPPoE, PING Block, and etc. More...
 
void wizchip_settimeout (wiz_NetTimeout *nettime)
 Set retransmission time values and retry counts. More...
 
void wizchip_gettimeout (wiz_NetTimeout *nettime)
 Get retransmission time values and retry counts. More...
 
int8_t wizchip_arp (wiz_ARP *arp)
 ARP process. More...
 
int8_t wizchip_ping (wiz_PING *ping)
 PING process. More...
 
int8_t wizchip_dad (uint8_t *ipv6)
 DAD(Duplcated Address Detection) process. More...
 
int8_t wizchip_slaac (wiz_Prefix *prefix)
 Stateless Address Auto Configuration(SLAAC) process. More...
 
int8_t wizchip_unsolicited (void)
 Unsolicited NA process. More...
 
int8_t wizchip_getprefix (wiz_Prefix *prefix)
 Get a prefix information of RA message from a router. More...
 

Variables

_WIZCHIP_T_ WIZCHIP
 WIZCHIP is instance of _WIZCHIP_T_ to access _WIZCHIP_. More...
 

Detailed Description

WIZCHIP Config Header File.

Version
1.0.0
Date
2019/01/01
Revision history
<2019/01/01> 1st Release
Author
MidnightCow

Copyright (c) 2019, WIZnet Co., LTD.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Definition in file wizchip_conf.h.

Macro Definition Documentation

◆ W6100

#define W6100   6100

W6100 Definition.

Definition at line 54 of file wizchip_conf.h.

◆ _WIZCHIP_

#define _WIZCHIP_   W6100

Select WIZCHIP.

Todo:
You should select one, W6100, etc.

ex> #define _WIZCHIP_ W6100

Definition at line 65 of file wizchip_conf.h.

◆ _WIZCHIP_IO_MODE_NONE_

#define _WIZCHIP_IO_MODE_NONE_   0x0000

Definition at line 68 of file wizchip_conf.h.

◆ _WIZCHIP_IO_MODE_BUS_

#define _WIZCHIP_IO_MODE_BUS_   0x0100

Bus interface mode.
Refer to _WIZCHIP_IO_MODE_BUS_DIR_ or _WIZCHIP_IO_MODE_BUS_INDIR_.

Definition at line 69 of file wizchip_conf.h.

◆ _WIZCHIP_IO_MODE_SPI_

#define _WIZCHIP_IO_MODE_SPI_   0x0200

SPI interface mode.
Refer to _WIZCHIP_IO_MODE_SPI_VDM_ or _WIZCHIP_IO_MODE_SPI_FDM_.

Definition at line 70 of file wizchip_conf.h.

◆ _WIZCHIP_IO_MODE_BUS_DIR_

#define _WIZCHIP_IO_MODE_BUS_DIR_   (_WIZCHIP_IO_MODE_BUS_ + 1)

BUS interface mode for direct.
Refer to _WIZCHIP_IO_MODE_BUS_.

Definition at line 76 of file wizchip_conf.h.

◆ _WIZCHIP_IO_MODE_BUS_INDIR_

#define _WIZCHIP_IO_MODE_BUS_INDIR_   (_WIZCHIP_IO_MODE_BUS_ + 2)

BUS interface mode for indirect.
Refer to _WIZCHIP_IO_MODE_BUS_.

Definition at line 77 of file wizchip_conf.h.

◆ _WIZCHIP_IO_MODE_SPI_VDM_

#define _WIZCHIP_IO_MODE_SPI_VDM_   (_WIZCHIP_IO_MODE_SPI_ + 1)

SPI interface mode for variable length data.
Refer to _WIZCHIP_IO_MODE_SPI_.

Definition at line 79 of file wizchip_conf.h.

◆ _WIZCHIP_IO_MODE_SPI_FDM_

#define _WIZCHIP_IO_MODE_SPI_FDM_   (_WIZCHIP_IO_MODE_SPI_ + 2)

SPI interface mode for fixed length data mode.

Note
If you want to use SPI FDM, Feel free to send a email to suppo.nosp@m.rt@w.nosp@m.iznet.nosp@m..io.
See also
_WIZCHIP_IO_MODE_SPI_

Definition at line 85 of file wizchip_conf.h.

◆ _PHY_IO_MODE_PHYCR_

#define _PHY_IO_MODE_PHYCR_   0x0000

PHY can be accessed by _PHYCR0_, _PHYCR1_.

It provides hardware access method.

Note
It is smaller s/w footprint than _PHY_IO_MODE_MII_.
See also
_PHY_IO_MODE_MII_, _PHY_IO_MODE_
ctlwizchip(), getPHYCR0(), getPHYCR1(), setPHYCR1(), getPHYSR()

Definition at line 95 of file wizchip_conf.h.

◆ _PHY_IO_MODE_MII_

#define _PHY_IO_MODE_MII_   0x0010

PHY can be accessed by MDC/MDIO signals of MII interface.

It provide software access method.

Note
It is bigger s/w footprint than _PHY_IO_MODE_PHYCR_.
See also
_PHY_IO_MODE_PHYCR_, _PHY_IO_MODE_
ctlwizchip(), wiz_read_mdio(), wiz_write_mdio()

Definition at line 104 of file wizchip_conf.h.

◆ _PHY_IO_MODE_

#define _PHY_IO_MODE_   _PHY_IO_MODE_PHYCR_

Select PHY Access Mode.

_PHY_IO_MODE_ selects PHY access method.

Todo:
You should select one of _PHY_IO_MODE_PHYCR_ or _PHY_IO_MODE_MII_.
See also
ctlwizchip()

Definition at line 112 of file wizchip_conf.h.

◆ _WIZCHIP_SOCK_NUM_

#define _WIZCHIP_SOCK_NUM_   8

Define I/O base address of _WIZCHIP_.

Todo:
If you want to use _WIZCHIP_IO_MODE_BUS_ such as _WIZCHIP_IO_MODE_BUS_DIR_ and _WIZCHIP_IO_MODE_BUS_INDIR_,
You should redefine _WIZCHIP_IO_BASE_ to a free address space of your system.
ex> #define _WIZCHIP_IO_BASE_ 0x00008000

Otherwise, No need to redefine it.

The count of independent SOCKET of _WIZCHIP_

Definition at line 157 of file wizchip_conf.h.

◆ SYS_CHIP_LOCK

#define SYS_CHIP_LOCK   (1<<2)

CHIP LOCK.
Refer to CW_SYS_LOCK, CW_SYS_UNLOCK, and CW_GET_SYSLOCK.

Definition at line 366 of file wizchip_conf.h.

◆ SYS_NET_LOCK

#define SYS_NET_LOCK   (1<<1)

NETWORK Information LOCK.
Refer to CW_SYS_LOCK, CW_SYS_UNLOCK, and CW_GET_SYSLOCK.

Definition at line 367 of file wizchip_conf.h.

◆ SYS_PHY_LOCK

#define SYS_PHY_LOCK   (1<<0)

PHY LOCK.
Refer to CW_SYS_LOCK, CW_SYS_UNLOCK, and CW_GET_SYSLOCK.

Definition at line 368 of file wizchip_conf.h.

◆ SYSCLK_100MHZ

#define SYSCLK_100MHZ   0

System Clock 100MHz.
Refer to Refer to CW_SET_SYSCLK and CW_GET_SYSCLK.

Definition at line 370 of file wizchip_conf.h.

◆ SYSCLK_25MHZ

#define SYSCLK_25MHZ   1

System Clock 25MHz.
Refer to Refer to CW_SET_SYSCLK and CW_GET_SYSCLK.

Definition at line 371 of file wizchip_conf.h.

◆ PHY_MODE_MANUAL

#define PHY_MODE_MANUAL   0

Configured PHY operation mode with user setting.
Refer to CW_SET_PHYCONF and CW_GET_PHYCONF.

Definition at line 373 of file wizchip_conf.h.

◆ PHY_MODE_AUTONEGO

#define PHY_MODE_AUTONEGO   1

Configured PHY operation mode with auto-negotiation.
Refer to CW_SET_PHYCONF and CW_GET_PHYCONF.

Definition at line 374 of file wizchip_conf.h.

◆ PHY_MODE_TE

#define PHY_MODE_TE   2

Configured PHY operation mode with 10Base-Te.

It can be set or get through ctlwizchip() with CW_SET_PHYCONF or CW_GET_PHYCONF.

Note
It is controlled by _PHYCR1_ regardless of _PHY_IO_MODE_.
After 10Base-Te mode is set, Ethernet PHY should be reset by calling ctlwizchip() with CW_RESET_PHY

Definition at line 381 of file wizchip_conf.h.

◆ PHY_SPEED_10

#define PHY_SPEED_10   0

PHY Link Speed 10.
Refer to CW_SET_PHYCONF and CW_GET_PHYCONF.

Definition at line 382 of file wizchip_conf.h.

◆ PHY_SPEED_100

#define PHY_SPEED_100   1

PHY Link Speed 100.
Refer to CW_SET_PHYCONF and CW_GET_PHYCONF.

Definition at line 383 of file wizchip_conf.h.

◆ PHY_DUPLEX_HALF

#define PHY_DUPLEX_HALF   0

PHY Link Half-Duplex.
Refer to CW_SET_PHYCONF and CW_GET_PHYCONF.

Definition at line 384 of file wizchip_conf.h.

◆ PHY_DUPLEX_FULL

#define PHY_DUPLEX_FULL   1

PHY Link Full-Duplex.
Refer to CW_SET_PHYCONF and CW_GET_PHYCONF.

Definition at line 385 of file wizchip_conf.h.

◆ PHY_LINK_OFF

#define PHY_LINK_OFF   0

PHY Link Off.
Refer to CW_GET_PHYLINK.

Definition at line 386 of file wizchip_conf.h.

◆ PHY_LINK_ON

#define PHY_LINK_ON   1

PHY Link On.
Refer to CW_GET_PHYLINK.

Definition at line 387 of file wizchip_conf.h.

◆ PHY_POWER_NORM

#define PHY_POWER_NORM   0

PHY power normal mode.
Refer to CW_SET_PHYPOWMODE and CW_GET_PHYPOWMODE.

Definition at line 388 of file wizchip_conf.h.

◆ PHY_POWER_DOWN

#define PHY_POWER_DOWN   1

PHY power down mode.
Refer to CW_SET_PHYPOWMODE and CW_GET_PHYPOWMODE.

Definition at line 389 of file wizchip_conf.h.

◆ IPV6_ADDR_AUTO

#define IPV6_ADDR_AUTO   0x00

IPv6 Address Type : Auto.
Refer to CN_SET_PREFER, CN_GET_PREFER.

Definition at line 391 of file wizchip_conf.h.

◆ IPV6_ADDR_LLA

#define IPV6_ADDR_LLA   0x02

IPv6 Address Type : LLA.
Refer to CN_SET_PREFER, CN_GET_PREFER, CNS_DAD.

Definition at line 392 of file wizchip_conf.h.

◆ IPV6_ADDR_GUA

#define IPV6_ADDR_GUA   0x03

IPv6 Address Type : GUA.
Refer to CN_SET_PREFER, CN_GET_PREFER, CNS_DAD.

Definition at line 393 of file wizchip_conf.h.

Function Documentation

◆ reg_wizchip_cris_cbfunc()

void reg_wizchip_cris_cbfunc ( void(*)(void)  cris_en,
void(*)(void)  cris_ex 
)

Registers call back functions for critical section.

reg_wizchip_cris_cbfunc() is for basic I/O functions
such as WIZCHIP_READ(), WIZCHIP_WRITE(), WIZCHIP_READ_BUF() and WIZCHIP_WRITE_BUF().

Parameters
cris_en: callback function for critical section enter.
cris_ex: callback function for critical section exit.
Todo:
Register your functions for critical session.
Note
If you do not register it, the empty default functions are called.
wizchip_cris_enter(), wizchip_cris_exit()

Definition at line 256 of file wizchip_conf.c.

References __WIZCHIP_T__::_CRIS::_e_n_t_e_r_, __WIZCHIP_T__::_CRIS::_e_x_i_t_, __WIZCHIP_T__::CRIS, WIZCHIP, wizchip_cris_enter(), and wizchip_cris_exit().

◆ reg_wizchip_cs_cbfunc()

void reg_wizchip_cs_cbfunc ( void(*)(void)  cs_sel,
void(*)(void)  cs_desel 
)

Registers call back functions for _WIZCHIP_ select & deselect.

reg_wizchip_cs_cbfunc() registers your functions to select & deselect _WIZCHIP_

Parameters
cs_sel: callback function to select _WIZCHIP_
cs_desel: callback function to deselect _WIZCHIP_
Todo:
Register your functions to select or deselect _WIZCHIP_.
Note
If you do not register it, the empty default functions are called.
wizchip_cs_select(), wizchip_cs_deselect()

Definition at line 264 of file wizchip_conf.c.

References __WIZCHIP_T__::_CS::_d_e_s_e_l_e_c_t_, __WIZCHIP_T__::_CS::_s_e_l_e_c_t_, __WIZCHIP_T__::CS, WIZCHIP, wizchip_cs_deselect(), and wizchip_cs_select().

◆ reg_wizchip_bus_cbfunc()

void reg_wizchip_bus_cbfunc ( iodata_t(*)(uint32_t addr)  bus_rd,
void(*)(uint32_t addr, iodata_t wb)  bus_wd,
void(*)(uint32_t addr, iodata_t *buf, datasize_t len, uint8_t inc)  bus_rbuf,
void(*)(uint32_t addr, iodata_t *buf, datasize_t len, uint8_t inc)  bus_wbuf 
)

Registers call back functions for BUS interface.

reg_wizchip_bus_cbfunc() is for basic I/O functions
such as WIZCHIP_READ(), WIZCHIP_WRITE(), WIZCHIP_READ_BUF() and WIZCHIP_WRITE_BUF().

Parameters
bus_rd: callback function to read 1 iodata_t data
bus_wd: callback function to write 1 iodata_t data
bus_rbuf: callback function to read iodata_t data buf as many as len
bus_wbuf: callback function to write iodata_t data buf as many as len
Todo:
Register your functions for data read & write through BUS interface.
Note
If you do not register it,the default functions are called.
wizchip_bus_read(), wizchip_bus_write(), wizchip_bus_read_buf(), wizchip_bus_write_buf().

◆ reg_wizchip_spi_cbfunc()

void reg_wizchip_spi_cbfunc ( uint8_t(*)(void)  spi_rb,
void(*)(uint8_t wb)  spi_wb,
void(*)(uint8_t *buf, datasize_t len)  spi_rbuf,
void(*)(uint8_t *buf, datasize_t len)  spi_wbuf 
)

Registers call back functions for SPI interface.

reg_wizchip_spi_cbfunc() is for for basic I/O functions
* such as WIZCHIP_READ(), WIZCHIP_WRITE(), WIZCHIP_READ_BUF() and WIZCHIP_WRITE_BUF().

Parameters
spi_rb: callback function to read 1 byte data using SPI
spi_wb: callback function to write 1 byte data using SPI
spi_rbuf: callback function to read byte data buf as many as len
spi_rbuf: callback function to write byte data buf as many as len
Todo:
Should register your functions for data read/write through SPI interface.
Note
If you do not register it, the empty default function are called but these function are all null function.
So, You should overwrite them or register your functions for replacing them.

The empty default functions are wizchip_spi_read(), wizchip_spi_write(),wizchip_spi_read_buf(), and wizchip_spi_write_buf().

Variable Documentation

◆ WIZCHIP

_WIZCHIP_T_ WIZCHIP

WIZCHIP is instance of _WIZCHIP_T_ to access _WIZCHIP_.

WIZCHIP is instance of _WIZCHIP_T_ to access _WIZCHIP_.

It provides the call-back function set for accessing to _WIZCHIP_

Definition at line 214 of file wizchip_conf.c.

Referenced by ctlwizchip(), reg_wizchip_cris_cbfunc(), reg_wizchip_cs_cbfunc(), wizchip_bus_read_buf(), wizchip_bus_write_buf(), wizchip_spi_read_buf(), and wizchip_spi_write_buf().