io6Library
WIZnet Dual Stack TCP/IP Ethernet Controller Driver
Functions
2. WIZnet Extra Functions

These functions is optional function. More...

Functions

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...
 

Detailed Description

These functions is optional function.

2. WIZnet Extra Functions could be replaced with WIZCHIP I/O functions,
because they were made by Basic_IO_function_W6100.
These functions configure or indicate _WIZCHIP_, network information, interrupt, PHY, and timer.

Function Documentation

◆ ctlwizchip()

int8_t ctlwizchip ( ctlwizchip_type  cwtype,
void *  arg 
)

Control _WIZCHIP_.

ctlwizchip() resets _WIZCHIP_ & integrated Ethernet PHY,
configures PHY mode, monitors PHY(Link,Speed,Half/Full/Auto), controls interrupt & mask and so on.

Parameters
cwtype: Decides to the control type
arg: arg type is dependent on cwtype.
Returns
0 : Success
-1 : Fail because of invalid ctlwizchip_type or unsupported ctlwizchip_type
Note
When you define _PHY_IO_MODE_ to _PHY_IO_MODE_PHYCR_,
If you call ctlwizchip(CW_RESET_PHY), you should wait for stable reset time.

ex> W6100 case
ctlwizchip(CW_RESET_PHY);
// Need to wait stable reset time 60.3ms
your_delay_function(60300);

Definition at line 313 of file wizchip_conf.c.

References _WIZCHIP_SOCK_NUM_, CHIPLOCK, CHIPUNLOCK, CW_CLR_INTERRUPT, CW_GET_ID, CW_GET_IEN, CW_GET_INTERRUPT, CW_GET_INTRMASK, CW_GET_INTRTIME, CW_GET_PHYCONF, CW_GET_PHYLINK, CW_GET_PHYPOWMODE, CW_GET_PHYSTATUS, CW_GET_SYSCLK, CW_GET_SYSLOCK, CW_GET_VER, CW_INIT_WIZCHIP, CW_RESET_PHY, CW_RESET_WIZCHIP, CW_SET_IEN, CW_SET_INTRMASK, CW_SET_INTRTIME, CW_SET_PHYCONF, CW_SET_PHYPOWMODE, CW_SET_SYSCLK, CW_SYS_LOCK, CW_SYS_UNLOCK, getINTPTMR, getSYCR1, getSYSR, getVER, __WIZCHIP_T__::id, NETLOCK, NETUNLOCK, PHYLOCK, PHYUNLOCK, setINTPTMR, setSYCR1, SYCR1_CLKSEL, SYCR1_IEN, SYS_CHIP_LOCK, SYS_NET_LOCK, SYS_PHY_LOCK, SYSCLK_100MHZ, SYSCLK_25MHZ, WIZCHIP, wizchip_clrinterrupt(), wizchip_getinterrupt(), wizchip_getinterruptmask(), wizchip_init(), wizchip_setinterruptmask(), wizchip_sw_reset(), wizphy_getphyconf(), wizphy_getphylink(), wizphy_getphypmode(), wizphy_getphystatus(), wizphy_reset(), wizphy_setphyconf(), and wizphy_setphypmode().

◆ ctlnetwork()

int8_t ctlnetwork ( ctlnetwork_type  cntype,
void *  arg 
)

Controls to network.

ctlnetwork() controls to network environment, mode, timeout and so on.

Parameters
cntype: Decides to the control type
arg: arg type is dependent on cntype.
Returns
-1 : Fail because of invalid ctlnetwork_type or unsupported ctlnetwork_type
0 : Success

Definition at line 415 of file wizchip_conf.c.

References CN_GET_NETINFO, CN_GET_NETMODE, CN_GET_PREFER, CN_GET_TIMEOUT, CN_SET_NETINFO, CN_SET_NETMODE, CN_SET_PREFER, CN_SET_TIMEOUT, getSLPSR, setSLPSR, wizchip_getnetinfo(), wizchip_getnetmode(), wizchip_gettimeout(), wizchip_setnetinfo(), wizchip_setnetmode(), and wizchip_settimeout().

◆ ctlnetservice()

int8_t ctlnetservice ( ctlnetservice_type  cnstype,
void *  arg 
)

Controls to network service.

Controls to network environment, mode, timeout and so on.

Parameters
cnstype: Decides to the control type
arg: arg type is dependent on cnstype.
Returns
-1 : Fail because of invalid ctlnetwork_type or unsupported ctlnetwork_type
0 : Success

Definition at line 449 of file wizchip_conf.c.

References CNS_ARP, CNS_DAD, CNS_GET_PREFIX, CNS_PING, CNS_SLAAC, CNS_UNSOL_NA, wizchip_arp(), wizchip_dad(), wizchip_getprefix(), wizchip_ping(), wizchip_slaac(), and wizchip_unsolicited().

◆ wizchip_sw_reset()

void wizchip_sw_reset ( void  )

Soft Reset _WIZCHIP_.

Note
It backs up the network information before reset, and restores after reset.
See also
ctlwizchip(), CW_RESET_WIZCHIP
SYCR0_RST

Definition at line 471 of file wizchip_conf.c.

References CHIPLOCK, CHIPUNLOCK, getGA6R, getGAR, getGUAR, getLLAR, getSHAR, getSIPR, getSUB6R, getSUBR, getSYCR0, getSYSR, NETLOCK, NETUNLOCK, setGA6R, setGAR, setGUAR, setLLAR, setSHAR, setSIPR, setSUB6R, setSUBR, setSYCR0, SYCR0_RST, SYSR_CHPL, and SYSR_NETL.

Referenced by ctlwizchip(), and wizchip_init().

◆ wizchip_init()

int8_t wizchip_init ( uint8_t *  txsize,
uint8_t *  rxsize 
)

Initializes SOCKETn TX/RX buffer size.

Parameters
txsizeSOCKETn TX buffer sizes.
If it is null, SOCKETn TX buffer is initialized as the default size 2KB.
rxsizeSOCKETn RX buffer sizes.
If it is null, SOCKETn RX buffer is initialized as the default size 2KB.
Returns
0 : Success
-1 : Fail. Invalid buffer size
See also
ctlwizchip(), CW_INIT_WIZCHIP
_Sn_TX_BSR_, _Sn_RX_BSR_

Definition at line 498 of file wizchip_conf.c.

References _WIZCHIP_SOCK_NUM_, setSn_RXBUF_SIZE, setSn_TXBUF_SIZE, and wizchip_sw_reset().

Referenced by ctlwizchip().

◆ wizchip_clrinterrupt()

void wizchip_clrinterrupt ( intr_kind  intr)

Clear Interrupt of _WIZCHIP_.

Parameters
intr: intr_kind value operated OR. It can type-cast to uint32_t.
See also
ctlwizchip(), CW_CLR_INTERRUPT, CW_GET_INTERRUPT, CW_SET_INTRMASK, CW_GET_INTRMASK
wizchip_getintrerupt(), wizchip_setinterruptmask(), wizchip_getinterruptmask()

Definition at line 526 of file wizchip_conf.c.

References _WIZCHIP_SOCK_NUM_, setIRCLR, setSLIRCLR, and setSn_IRCLR.

Referenced by ctlwizchip().

◆ wizchip_getinterrupt()

intr_kind wizchip_getinterrupt ( void  )

Get Interrupt of _WIZCHIP_.

Returns
intr_kind value operated OR. It can type-cast to uint32_t.
See also
ctlwizchip(), CW_GET_INTERRUPT, CW_CLR_INTERRUPT, CW_SET_INTRMASK, CW_GET_INTRMASK
wizchip_clrinterrupt(), wizchip_setinterruptmask(), wizchip_getinterruptmask()

Definition at line 540 of file wizchip_conf.c.

References getIR, getSIR, and getSLIR.

Referenced by ctlwizchip().

◆ wizchip_setinterruptmask()

void wizchip_setinterruptmask ( intr_kind  intr)

Mask or Unmask Interrupt of _WIZCHIP_.

Parameters
intr: intr_kind value operated OR. It can type-cast to uint32_t.
See also
ctlwizchip(), CW_SET_INTRMASK, CW_GET_INTRMASK, CW_CLR_INTERRUPT, CW_GET_INTERRUPT
wizchip_getinterruptmask(), wizchip_clrinterrupt(), wizchip_getinterrupt()

Definition at line 547 of file wizchip_conf.c.

References setIMR, setSIMR, and setSLIMR.

Referenced by ctlwizchip().

◆ wizchip_getinterruptmask()

intr_kind wizchip_getinterruptmask ( void  )

Get Interrupt mask of _WIZCHIP_.

Returns
The operated OR value of intr_kind. It can type-cast to uint32_t.
See also
ctlwizchip(), CW_GET_INTRMASK, CW_SET_INTRMASK, CW_CLR_INTERRUPT, CW_GET_INTERRUPT
wizchip_setinterruptmask(), wizchip_clrinterrupt(), wizchip_getinterrupt()

Definition at line 557 of file wizchip_conf.c.

References getIMR, getSIMR, and getSLIMR.

Referenced by ctlwizchip().

◆ wizphy_getphylink()

int8_t wizphy_getphylink ( void  )

Get the Link status of integrated PHY.

wizphy_getphylink() gets the link status of the integrated Ethernet PHY
through _PHY_IO_MODE_PHYCR_ or _PHY_IO_MODE_MII_.

Returns
: PHY_LINK_ON or PHY_LINK_OFF.
See also
ctlwizchip(), CW_GET_PHYLINK
_PHY_IO_MODE_ get the link status of phy in WIZCHIP. No use in W5100

Definition at line 564 of file wizchip_conf.c.

References BMSR_LINK_STATUS, getPHYSR, PHY_LINK_OFF, PHY_LINK_ON, PHYRAR_BMSR, PHYSR_LNK, and wiz_mdio_read().

Referenced by ctlwizchip().

◆ wizphy_reset()

void wizphy_reset ( void  )

Reset the integrated PHY.

wizphy_reset() resets the integrated Ethernet PHY
through _PHY_IO_MODE_PHYCR_ or _PHY_IO_MODE_MII_.

Note
In _PHY_IO_MODE_PHYCR_, It needs a stable reset time.
So you need to wait for the stable reset time.
The stable reset time for each _WIZCHIP_ maybe different.
See also
ctlwizchip(), CW_RESET_PHY
_PHY_IO_MODE_ Reset phy. Vailid only in W5500

Definition at line 574 of file wizchip_conf.c.

References BMCR_RST, getPHYCR1, PHYCR1_RST, PHYLOCK, PHYRAR_BMCR, PHYUNLOCK, setPHYCR1, wiz_mdio_read(), and wiz_mdio_write().

Referenced by ctlwizchip().

◆ wizphy_setphyconf()

void wizphy_setphyconf ( wiz_PhyConf phyconf)

wizphy_setphyconf() set a operation mode of the integrated Ethernet PHY
through _PHY_IO_MODE_PHYCR_ or _PHY_IO_MODE_MII_.

Parameters
phyconf: wiz_PhyConf
Note
The operation mode can be applied to Ethernet PHY after the Ethernet PHY is reset by wizphy_reset().
See also
ctlwizchip(), CW_SET_PHYCONF, CW_GET_PHYCONF, CW_GET_PHYSTATUS, CW_RESET_PHY
_PHY_IO_MODE_, wizphy_getphyconf(), wizphy_getphystatus(), wizphy_reset()

Definition at line 587 of file wizchip_conf.c.

References BMCR_ANE, BMCR_DPX, BMCR_SPD, wiz_PhyConf_t::duplex, getPHYCR1, wiz_PhyConf_t::mode, PHY_DUPLEX_FULL, PHY_DUPLEX_HALF, PHY_MODE_AUTONEGO, PHY_MODE_TE, PHY_SPEED_10, PHY_SPEED_100, PHYCR0_AUTO, PHYCR1_TE, PHYRAR_BMCR, setPHYCR0, setPHYCR1, wiz_PhyConf_t::speed, wiz_mdio_read(), and wiz_mdio_write().

Referenced by ctlwizchip().

◆ wizphy_getphyconf()

void wizphy_getphyconf ( wiz_PhyConf phyconf)

Get the integrated Ethernet PHY operation mode.

wizphy_getphyconf() gets a operation mode of the integrated Ethernet PHY
through _PHY_IO_MODE_PHYCR_ or _PHY_IO_MODE_MII_.

Parameters
phyconf: wiz_PhyConf
Note
It gets just the configured value for PHY operation, not real PHY operation.
To get real PHY operation, you can call wizphy_getphystatus()
See also
ctlwizchip(), CW_GET_PHYCONF, CW_SET_PHYCONF, CW_GET_PHYSTATUS
_PHY_IO_MODE_, wizphy_setphyconf(), wizphy_getphystatus()

Definition at line 630 of file wizchip_conf.c.

References BMCR_ANE, BMCR_DPX, BMCR_SPD, wiz_PhyConf_t::duplex, getPHYCR1, getPHYSR, wiz_PhyConf_t::mode, PHY_DUPLEX_FULL, PHY_DUPLEX_HALF, PHY_MODE_AUTONEGO, PHY_MODE_MANUAL, PHY_MODE_TE, PHY_SPEED_10, PHY_SPEED_100, PHYCR1_TE, PHYRAR_BMCR, wiz_PhyConf_t::speed, and wiz_mdio_read().

Referenced by ctlwizchip().

◆ wizphy_getphystatus()

void wizphy_getphystatus ( wiz_PhyConf phyconf)

Get the real PHY operation status when link is established.

wizphy_getphystatus() gets a operation mode of the integrated Ethernet PHY.

Parameters
phyconf: wiz_PhyConf
See also
ctlwizchip(), CW_GET_PHYSTATUS, CW_GET_PHYCONF, CW_SET_PHYCONF
wizphy_setphyconf(), wizphy_getphyconf()

Definition at line 649 of file wizchip_conf.c.

References wiz_PhyConf_t::duplex, getPHYCR1, getPHYSR, wiz_PhyConf_t::mode, PHY_DUPLEX_FULL, PHY_DUPLEX_HALF, PHY_MODE_AUTONEGO, PHY_MODE_MANUAL, PHY_MODE_TE, PHY_SPEED_10, PHY_SPEED_100, PHYCR1_TE, PHYSR_DPX, PHYSR_SPD, and wiz_PhyConf_t::speed.

Referenced by ctlwizchip().

◆ wizphy_setphypmode()

void wizphy_setphypmode ( uint8_t  pmode)

Set the power mode of integrated Ethernet PHY.

wizphy_setphypmode() sets a power mode of the integrated Ethernet PHY
through _PHY_IO_MODE_PHYCR_ or _PHY_IO_MODE_MII_.

Parameters
pmodePHY_POWER_NORM or PHY_POWER_DOWN
Note
When the integrated Ethernet PHY enters in power down mode,
the system clock of _WIZCHIP_ is changed to the lowest speed.
So, you should adjust the access time of _WIZCHIP_ to the changed system clock.
See also
ctlwizchip(), CW_SET_PHYPOWMODE, CW_GET_PHYPOWMODE
_PHY_IO_MODE_, wizphy_setphypmode(), wizphy_getphypmode()

Definition at line 659 of file wizchip_conf.c.

References BMCR_PWDN, getPHYCR1, PHY_POWER_DOWN, PHYCR1_PWDN, PHYRAR_BMCR, setPHYCR1, wiz_mdio_read(), and wiz_mdio_write().

Referenced by ctlwizchip().

◆ wizphy_getphypmode()

int8_t wizphy_getphypmode ( void  )

get the power mode of integrated Ethernet PHY.

wizphy_getphypmode() gets a power mode of the integrated Ethernet PHY
through _PHY_IO_MODE_PHYCR_ or _PHY_IO_MODE_MII_.

Returns
PHY_POWER_NORM or PHY_POWER_DOWN
Note
When the integrated Ethernet PHY enters in power down mode,
the system clock of _WIZCHIP_ is changed to the lowest speed.
So, you should adjust the access time of _WIZCHIP_ to the changed system clock.
See also
ctlwizchip(), CW_SET_PHYPOWMODE, CW_GET_PHYPOWMODE
_PHY_IO_MODE_, wizphy_setphypmode(), wizphy_getphypmode()

Definition at line 675 of file wizchip_conf.c.

References BMCR_PWDN, getPHYCR1, PHY_POWER_DOWN, PHY_POWER_NORM, PHYCR1_PWDN, PHYRAR_BMCR, and wiz_mdio_read().

Referenced by ctlwizchip().

◆ wizchip_setnetinfo()

void wizchip_setnetinfo ( wiz_NetInfo pnetinfo)

◆ wizchip_getnetinfo()

void wizchip_getnetinfo ( wiz_NetInfo pnetinfo)

◆ wizchip_setnetmode()

void wizchip_setnetmode ( netmode_type  netmode)

Set the network mode such as WOL, PPPoE, PING Block, and etc.

Parameters
netmode: netmode_type.
See also
ctlnetwork(), CN_SET_NETMODE, CN_GET_NETMODE
wizchip_getnetmode()

Definition at line 722 of file wizchip_conf.c.

References setNET4MR, setNET6MR, setNETMR, and setNETMR2.

Referenced by ctlnetwork().

◆ wizchip_getnetmode()

netmode_type wizchip_getnetmode ( void  )

Get the network mode such as WOL, PPPoE, PING Block, and etc.

Returns
netmode_type.
See also
ctlnetwork(), CN_GET_NETMODE, CN_SET_NETMODE
wizchip_setnetmode()

Definition at line 731 of file wizchip_conf.c.

References getNET4MR, getNET6MR, getNETMR, and getNETMR2.

Referenced by ctlnetwork().

◆ wizchip_settimeout()

void wizchip_settimeout ( wiz_NetTimeout nettime)

◆ wizchip_gettimeout()

void wizchip_gettimeout ( wiz_NetTimeout nettime)

◆ wizchip_arp()

int8_t wizchip_arp ( wiz_ARP arp)

ARP process.

wizchip_arp() processes ARP.
It sends the APR-request to destination and waits to receive the ARP-reply.

Parameters
arpwiz_ARP.
It sets a destination IP address and indicates the destination hardware address.
Returns
0 : success, destination hardware address is valid.
-1 : fail. destination hardware address is invalid because timeout is occurred.
See also
ctlnetservice(), CNS_ARP

Definition at line 757 of file wizchip_conf.c.

References wiz_ARP_t::destinfo, wiz_ARP_t::dha, getSLCR, getSLDHAR, getSLIR, wiz_IPAddress_t::ip, wiz_IPAddress_t::len, setSLCR, setSLDIP4R, setSLDIP6R, setSLIRCLR, SLCR_ARP4, SLCR_ARP6, SLIR_ARP4, SLIR_ARP6, and SLIR_RA.

Referenced by ctlnetservice().

◆ wizchip_ping()

int8_t wizchip_ping ( wiz_PING ping)

PING process.

wizchip_ping() processes PING.
It sends the PING-request to destination and waits to receive the PING-reply.

Parameters
pingwiz_PING, It sets a destination IP address, ID, SEQ of PING-request message
Returns
0 : success, PING-reply is successfully received.
-1 : fail. Timeout is occurred.
See also
ctlnetservice(), CNS_PING

Definition at line 781 of file wizchip_conf.c.

References wiz_PING_t::destinfo, getSLCR, getSLIR, wiz_PING_t::id, wiz_IPAddress_t::ip, wiz_IPAddress_t::len, wiz_PING_t::seq, setPINGIDR, setPINGSEQR, setSLCR, setSLDIP4R, setSLDIP6R, setSLIRCLR, SLCR_PING4, SLCR_PING6, SLIR_PING4, SLIR_PING6, and SLIR_RA.

Referenced by ctlnetservice().

◆ wizchip_dad()

int8_t wizchip_dad ( uint8_t *  ipv6)

DAD(Duplcated Address Detection) process.

wizchip_dad() detects the duplication of source IPv6 address.
It sends a NA message for DAD to all-node multicasting address(FF02::01).

Parameters
ipv6: IPv6 address to be detected the duplication.
Returns
0 : success, There is no duplicated address.
-1 : fail. _WIZCHIP_ source IP address to use is duplicated with a neighbor's one.
See also
ctlnetservice(), CNS_DAD

Definition at line 803 of file wizchip_conf.c.

References getSLCR, getSLIR, setSLCR, setSLDIP6R, setSLIRCLR, SLCR_NS, SLIR_RA, and SLIR_TOUT.

Referenced by ctlnetservice().

◆ wizchip_slaac()

int8_t wizchip_slaac ( wiz_Prefix prefix)

Stateless Address Auto Configuration(SLAAC) process.

wizchip_slaac() get a prefix information from a router for SLAAC.
It sends first a RS message to all-router and waits to receive a RS message with prefix information option from a router.

Parameters
prefixwiz_Prefix
Returns
0 : success, RA message is successfully received, and prefix is valid.
-1 : fail. Timeout is occurred.
Note
It is valid only when the prefix information type(0x03) of RA option received first.
The prefix option should be in the order of prefix length, prefix flag, valid lifetime, default lifetime and prefix address.
For more detail, Refer to SLIR_RS.
See also
ctlnetservice(), CNS_SLAAC

Definition at line 815 of file wizchip_conf.c.

References wiz_Prefix_t::flag, getPAR, getPFR, getPLR, getPLTR, getSLCR, getSLIR, getVLTR, wiz_Prefix_t::len, wiz_Prefix_t::preferred_lifetime, wiz_Prefix_t::prefix, setSLCR, setSLIRCLR, SLCR_RS, SLIR_RA, SLIR_RS, and wiz_Prefix_t::valid_lifetime.

Referenced by ctlnetservice().

◆ wizchip_unsolicited()

int8_t wizchip_unsolicited ( void  )

Unsolicited NA process.

wizchip_unsolicited() updates the network information of _WIZCHIP_ to neighbors.
It sends a unsolicited NA message with _LLAR_ or _GUAR_ to neighbors
in order to update the network information of _WIZCHIP_.
Because the unsolicited NA message have no reply, timeout is always occurred.

Returns
always 0. Timeout is occurred.
See also
ctlnetservice(), CNS_UNSOL

Definition at line 834 of file wizchip_conf.c.

References getSLCR, getSLIR, setSLCR, setSLIRCLR, SLCR_UNA, SLIR_RA, and SLIR_TOUT.

Referenced by ctlnetservice().

◆ wizchip_getprefix()

int8_t wizchip_getprefix ( wiz_Prefix prefix)

Get a prefix information of RA message from a router.

wizchip_getprefix() get a prefix information of RA is periodically sent by a router.

Returns
0 : success, a RS message is successfully received from a router. -1 : fail, a RS message is not received from a router yet.
Note
It is valid only when the prefix information type(0x03) of RA option received first.
The prefix option should be in the order of prefix length, prefix flag, valid lifetime, default lifetime and prefix address.
For more detail, Refer to SLIR_RS.
See also
ctlnetservice(), CNS_GET_PREFIX

Definition at line 845 of file wizchip_conf.c.

References wiz_Prefix_t::flag, getPAR, getPFR, getPLR, getPLTR, getSLIR, getVLTR, wiz_Prefix_t::len, wiz_Prefix_t::preferred_lifetime, wiz_Prefix_t::prefix, setSLIRCLR, SLIR_RA, and wiz_Prefix_t::valid_lifetime.

Referenced by ctlnetservice().