Socket APIs
|
These functions is optional function. It could be replaced at WIZCHIP I/O function because they were made by WIZCHIP I/O functions. More...
Functions | |
int8_t | ctlwizchip (ctlwizchip_type cwtype, void *arg) |
Controls to the WIZCHIP. More... | |
int8_t | ctlnetwork (ctlnetwork_type cntype, void *arg) |
Controls to network. More... | |
void | wizchip_sw_reset (void) |
Reset WIZCHIP by softly. More... | |
int8_t | wizchip_init (uint8_t *txsize, uint8_t *rxsize) |
Initializes WIZCHIP with socket 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... | |
void | wizphy_setphyconf (wiz_PhyConf *phyconf) |
Set the phy information for WIZCHIP without power mode. More... | |
void | wizphy_getphyconf (wiz_PhyConf *phyconf) |
Get phy configuration information. More... | |
void | wizphy_getphystat (wiz_PhyConf *phyconf) |
Get phy status. More... | |
int8_t | wizphy_setphypmode (uint8_t pmode) |
set the power mode of phy inside WIZCHIP. Refer to PHYCFGR in W5500, PHYSTATUS in W5200 More... | |
void | wizchip_setnetinfo (wiz_NetInfo *pnetinfo) |
Set the network information for WIZCHIP. More... | |
void | wizchip_getnetinfo (wiz_NetInfo *pnetinfo) |
Get the network information for WIZCHIP. More... | |
int8_t | wizchip_setnetmode (netmode_type netmode) |
Set the network mode such WOL, PPPoE, Ping Block, and etc. More... | |
netmode_type | wizchip_getnetmode (void) |
Get the network mode such WOL, PPPoE, Ping Block, and etc. More... | |
void | wizchip_settimeout (wiz_NetTimeout *nettime) |
Set retry time value(RTR) and retry count(RCR). More... | |
void | wizchip_gettimeout (wiz_NetTimeout *nettime) |
Get retry time value(RTR) and retry count(RCR). More... | |
Detailed Description
These functions is optional function. It could be replaced at WIZCHIP I/O function because they were made by WIZCHIP I/O functions.
There are functions of configuring WIZCHIP, network, interrupt, phy, network information and timer.
Function Documentation
int8_t ctlwizchip | ( | ctlwizchip_type | cwtype, |
void * | arg | ||
) |
Controls to the WIZCHIP.
Resets WIZCHIP & internal PHY, Configures PHY mode, Monitor 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 in WIZCHIP
Definition at line 277 of file wizchip_conf.c.
References _WIZCHIP_SOCK_NUM_, CW_CLR_INTERRUPT, CW_GET_ID, CW_GET_INTERRUPT, CW_GET_INTRMASK, CW_GET_INTRTIME, CW_GET_PHYCONF, CW_GET_PHYLINK, CW_GET_PHYPOWMODE, CW_GET_PHYSTATUS, CW_INIT_WIZCHIP, CW_RESET_PHY, CW_RESET_WIZCHIP, CW_SET_INTRMASK, CW_SET_INTRTIME, CW_SET_PHYCONF, CW_SET_PHYPOWMODE, getINTLEVEL, __WIZCHIP::id, setINTLEVEL, wizchip_clrinterrupt(), wizchip_getinterrupt(), wizchip_getinterruptmask(), wizchip_init(), wizchip_setinterruptmask(), wizchip_sw_reset(), wizphy_getphyconf(), wizphy_getphylink(), wizphy_getphypmode(), wizphy_reset(), wizphy_setphyconf(), and wizphy_setphypmode().
int8_t ctlnetwork | ( | ctlnetwork_type | cntype, |
void * | arg | ||
) |
Controls to network.
Controls to network environment, mode, timeout and so on.
- Parameters
-
cntype : Input. Decides to the control type arg : Inout. arg type is dependent on cntype.
- Returns
- -1 : Fail because of invalid ctlnetwork_type or unsupported ctlnetwork_type in WIZCHIP
0 : Success
Definition at line 359 of file wizchip_conf.c.
References CN_GET_NETINFO, CN_GET_NETMODE, CN_GET_TIMEOUT, CN_SET_NETINFO, CN_SET_NETMODE, CN_SET_TIMEOUT, wizchip_getnetinfo(), wizchip_getnetmode(), wizchip_gettimeout(), wizchip_setnetinfo(), wizchip_setnetmode(), and wizchip_settimeout().
void wizchip_sw_reset | ( | void | ) |
int8_t wizchip_init | ( | uint8_t * | txsize, |
uint8_t * | rxsize | ||
) |
Initializes WIZCHIP with socket buffer size.
- Parameters
-
txsize Socket tx buffer sizes. If null, initialized the default size 2KB. rxsize Socket rx buffer sizes. If null, initialized the default size 2KB.
- Returns
- 0 : succcess
-1 : fail. Invalid buffer size
Definition at line 412 of file wizchip_conf.c.
References _WIZCHIP_SOCK_NUM_, setSn_RXBUF_SIZE, setSn_TXBUF_SIZE, and wizchip_sw_reset().
Referenced by ctlwizchip().
void wizchip_clrinterrupt | ( | intr_kind | intr | ) |
Clear Interrupt of WIZCHIP.
- Parameters
-
intr : intr_kind value operated OR. It can type-cast to uint16_t.
Definition at line 464 of file wizchip_conf.c.
Referenced by ctlwizchip().
intr_kind wizchip_getinterrupt | ( | void | ) |
Get Interrupt of WIZCHIP.
- Returns
- intr_kind value operated OR. It can type-cast to uint16_t.
Definition at line 491 of file wizchip_conf.c.
Referenced by ctlwizchip().
void wizchip_setinterruptmask | ( | intr_kind | intr | ) |
Mask or Unmask Interrupt of WIZCHIP.
- Parameters
-
intr : intr_kind value operated OR. It can type-cast to uint16_t.
Definition at line 522 of file wizchip_conf.c.
References setIMR, and setSIMR.
Referenced by ctlwizchip().
intr_kind wizchip_getinterruptmask | ( | void | ) |
Get Interrupt mask of WIZCHIP.
- Returns
- : The operated OR vaule of intr_kind. It can type-cast to uint16_t.
Definition at line 546 of file wizchip_conf.c.
References getIMR, and getSIMR.
Referenced by ctlwizchip().
void wizphy_setphyconf | ( | wiz_PhyConf * | phyconf | ) |
Set the phy information for WIZCHIP without power mode.
- Parameters
-
phyconf : wiz_PhyConf
Definition at line 627 of file wizchip_conf.c.
References wiz_PhyConf_t::by, wiz_PhyConf_t::duplex, wiz_PhyConf_t::mode, PHY_CONFBY_SW, PHY_DUPLEX_FULL, PHY_MODE_AUTONEGO, PHY_SPEED_100, PHYCFGR_OPMD, PHYCFGR_OPMDC_100F, PHYCFGR_OPMDC_100H, PHYCFGR_OPMDC_10F, PHYCFGR_OPMDC_10H, PHYCFGR_OPMDC_ALLA, setPHYCFGR, wiz_PhyConf_t::speed, and wizphy_reset().
Referenced by ctlwizchip().
void wizphy_getphyconf | ( | wiz_PhyConf * | phyconf | ) |
Get phy configuration information.
- Parameters
-
phyconf : wiz_PhyConf
Definition at line 657 of file wizchip_conf.c.
References wiz_PhyConf_t::by, wiz_PhyConf_t::duplex, getPHYCFGR, wiz_PhyConf_t::mode, PHY_CONFBY_HW, PHY_CONFBY_SW, PHY_DUPLEX_FULL, PHY_DUPLEX_HALF, PHY_MODE_AUTONEGO, PHY_MODE_MANUAL, PHY_SPEED_10, PHY_SPEED_100, PHYCFGR_OPMD, PHYCFGR_OPMDC_100F, PHYCFGR_OPMDC_100FA, PHYCFGR_OPMDC_100H, PHYCFGR_OPMDC_10F, PHYCFGR_OPMDC_ALLA, and wiz_PhyConf_t::speed.
Referenced by ctlwizchip().
void wizphy_getphystat | ( | wiz_PhyConf * | phyconf | ) |
Get phy status.
- Parameters
-
phyconf : wiz_PhyConf
Definition at line 696 of file wizchip_conf.c.
References wiz_PhyConf_t::duplex, getPHYCFGR, PHY_DUPLEX_FULL, PHY_DUPLEX_HALF, PHY_SPEED_10, PHY_SPEED_100, PHYCFGR_DPX_FULL, PHYCFGR_SPD_100, and wiz_PhyConf_t::speed.
int8_t wizphy_setphypmode | ( | uint8_t | pmode | ) |
set the power mode of phy inside WIZCHIP. Refer to PHYCFGR in W5500, PHYSTATUS in W5200
- Parameters
-
pmode Settig value of power down mode.
Definition at line 703 of file wizchip_conf.c.
References getPHYCFGR, PHY_POWER_DOWN, PHYCFGR_OPMD, PHYCFGR_OPMDC_ALLA, PHYCFGR_OPMDC_PDOWN, setPHYCFGR, and wizphy_reset().
Referenced by ctlwizchip().
void wizchip_setnetinfo | ( | wiz_NetInfo * | pnetinfo | ) |
Set the network information for WIZCHIP.
- Parameters
-
pnetinfo : wizNetInfo
Definition at line 729 of file wizchip_conf.c.
References wiz_NetInfo_t::dhcp, wiz_NetInfo_t::dns, wiz_NetInfo_t::gw, wiz_NetInfo_t::ip, wiz_NetInfo_t::mac, setGAR, setSHAR, setSIPR, setSUBR, and wiz_NetInfo_t::sn.
Referenced by ctlnetwork().
void wizchip_getnetinfo | ( | wiz_NetInfo * | pnetinfo | ) |
Get the network information for WIZCHIP.
- Parameters
-
pnetinfo : wizNetInfo
Definition at line 742 of file wizchip_conf.c.
References wiz_NetInfo_t::dhcp, wiz_NetInfo_t::dns, getGAR, getSHAR, getSIPR, getSUBR, wiz_NetInfo_t::gw, wiz_NetInfo_t::ip, wiz_NetInfo_t::mac, and wiz_NetInfo_t::sn.
Referenced by ctlnetwork().
int8_t wizchip_setnetmode | ( | netmode_type | netmode | ) |
Set the network mode such WOL, PPPoE, Ping Block, and etc.
- Parameters
-
pnetinfo Value of network mode. Refer to netmode_type.
Definition at line 755 of file wizchip_conf.c.
References getMR, NM_FORCEARP, NM_PINGBLOCK, NM_PPPOE, NM_WAKEONLAN, and setMR.
Referenced by ctlnetwork().
netmode_type wizchip_getnetmode | ( | void | ) |
Get the network mode such WOL, PPPoE, Ping Block, and etc.
- Returns
- Value of network mode. Refer to netmode_type.
Definition at line 769 of file wizchip_conf.c.
References getMR.
Referenced by ctlnetwork().
void wizchip_settimeout | ( | wiz_NetTimeout * | nettime | ) |
Set retry time value(RTR) and retry count(RCR).
RTR configures the retransmission timeout period and RCR configures the number of time of retransmission.
- Parameters
-
nettime RTR value and RCR value. Refer to wiz_NetTimeout.
Definition at line 774 of file wizchip_conf.c.
References wiz_NetTimeout_t::retry_cnt, setRCR, setRTR, and wiz_NetTimeout_t::time_100us.
Referenced by ctlnetwork().
void wizchip_gettimeout | ( | wiz_NetTimeout * | nettime | ) |
Get retry time value(RTR) and retry count(RCR).
RTR configures the retransmission timeout period and RCR configures the number of time of retransmission.
- Parameters
-
nettime RTR value and RCR value. Refer to wiz_NetTimeout.
Definition at line 780 of file wizchip_conf.c.
References getRCR, getRTR, wiz_NetTimeout_t::retry_cnt, and wiz_NetTimeout_t::time_100us.
Referenced by ctlnetwork().
Generated on Wed May 4 2016 16:44:01 for Socket APIs by 1.8.9.1