![]() |
io6Library
WIZnet Dual Stack TCP/IP Ethernet Controller Driver
|
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... | |
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... | |
WIZCHIP Config Header File.
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.
| #define W6100 6100 |
W6100 Definition.
Definition at line 54 of file wizchip_conf.h.
| #define _WIZCHIP_ W6100 |
Select WIZCHIP.
#define _WIZCHIP_ W6100 Definition at line 65 of file wizchip_conf.h.
| #define _WIZCHIP_IO_MODE_NONE_ 0x0000 |
Definition at line 68 of file wizchip_conf.h.
| #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.
| #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.
| #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.
| #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.
| #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.
| #define _WIZCHIP_IO_MODE_SPI_FDM_ (_WIZCHIP_IO_MODE_SPI_ + 2) |
SPI interface mode for fixed length data mode.
Definition at line 85 of file wizchip_conf.h.
| #define _PHY_IO_MODE_PHYCR_ 0x0000 |
PHY can be accessed by _PHYCR0_, _PHYCR1_.
It provides hardware access method.
Definition at line 95 of file wizchip_conf.h.
| #define _PHY_IO_MODE_MII_ 0x0010 |
PHY can be accessed by MDC/MDIO signals of MII interface.
It provide software access method.
Definition at line 104 of file wizchip_conf.h.
| #define _PHY_IO_MODE_ _PHY_IO_MODE_PHYCR_ |
Select PHY Access Mode.
_PHY_IO_MODE_ selects PHY access method.
Definition at line 112 of file wizchip_conf.h.
| #define _WIZCHIP_SOCK_NUM_ 8 |
Define I/O base address of _WIZCHIP_.
#define _WIZCHIP_IO_BASE_ 0x00008000 The count of independent SOCKET of _WIZCHIP_
Definition at line 157 of file wizchip_conf.h.
| #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.
| #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.
| #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.
| #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.
| #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.
| #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.
| #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.
| #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.
Definition at line 381 of file wizchip_conf.h.
| #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.
| #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.
| #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.
| #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.
| #define PHY_LINK_OFF 0 |
PHY Link Off.
Refer to CW_GET_PHYLINK.
Definition at line 386 of file wizchip_conf.h.
| #define PHY_LINK_ON 1 |
PHY Link On.
Refer to CW_GET_PHYLINK.
Definition at line 387 of file wizchip_conf.h.
| #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.
| #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.
| #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.
| #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.
| #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.
| 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().
| cris_en | : callback function for critical section enter. |
| cris_ex | : callback function for critical section 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().
| 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_
| cs_sel | : callback function to select _WIZCHIP_ |
| cs_desel | : callback function to deselect _WIZCHIP_ |
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().
| 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().
| 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 |
| 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().
| 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 |
| _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().
1.8.17