├── BSP └── Template │ ├── bsp_net_eth.c │ ├── bsp_net_eth.h │ ├── bsp_net_wifi.c │ └── bsp_net_wifi.h ├── Cfg └── Template │ ├── net_cfg.c │ ├── net_cfg.h │ ├── net_dev_cfg.c │ └── net_dev_cfg.h ├── Cmd ├── net_cmd.c ├── net_cmd.h ├── net_cmd_args_parser.c ├── net_cmd_args_parser.h ├── net_cmd_output.c └── net_cmd_output.h ├── Dev ├── Ether │ ├── A2Fx00 │ │ ├── net_dev_a2fx00.c │ │ └── net_dev_a2fx00.h │ ├── AT91RM9200 │ │ ├── net_dev_at91rm9200.c │ │ └── net_dev_at91rm9200.h │ ├── DM9000 │ │ ├── net_dev_dm9000.c │ │ └── net_dev_dm9000.h │ ├── ETHMAC │ │ ├── net_dev_ethmac.c │ │ └── net_dev_ethmac.h │ ├── FEC │ │ ├── net_dev_fec.c │ │ └── net_dev_fec.h │ ├── FEC_MPC55xx │ │ ├── net_dev_fec_mpc55xx.c │ │ └── net_dev_fec_mpc55xx.h │ ├── GEM │ │ ├── net_dev_gem.c │ │ ├── net_dev_gem.h │ │ ├── net_dev_gem64.c │ │ └── net_dev_gem64_32.c │ ├── GMAC │ │ ├── Cfg │ │ │ ├── net_dev_gmac_cfg.c │ │ │ └── net_dev_gmac_cfg.h │ │ ├── net_dev_gmac.c │ │ └── net_dev_gmac.h │ ├── H8S2472 │ │ ├── net_dev_h8s2472.c │ │ ├── net_dev_h8s2472.h │ │ └── net_dev_h8s2472_isr.c │ ├── LAN911x │ │ ├── BSP │ │ │ └── Template │ │ │ │ ├── net_bsp.c │ │ │ │ └── net_bsp.h │ │ ├── CFG │ │ │ └── Template │ │ │ │ ├── net_dev_cfg.c │ │ │ │ └── net_dev_cfg.h │ │ ├── net_dev_lan911x.c │ │ └── net_dev_lan911x.h │ ├── LM3S9Bxx │ │ ├── net_dev_lm3s9bxx.c │ │ └── net_dev_lm3s9bxx.h │ ├── LM3Sxxxx │ │ ├── net_dev_lm3sxxxx.c │ │ └── net_dev_lm3sxxxx.h │ ├── LPCxxxx │ │ ├── net_dev_lpcxxxx.c │ │ └── net_dev_lpcxxxx.h │ ├── MACB │ │ ├── net_dev_macb.c │ │ └── net_dev_macb.h │ ├── MACB_AP7000 │ │ ├── net_dev_macb_ap7000.c │ │ └── net_dev_macb_ap7000.h │ ├── MACNet │ │ ├── net_dev_macnet.c │ │ └── net_dev_macnet.h │ ├── OMAP-L1x │ │ ├── net_dev_omap_l1x.c │ │ └── net_dev_omap_l1x.h │ ├── PHY │ │ ├── 88E1111 │ │ │ ├── net_phy_88e1111.c │ │ │ └── net_phy_88e1111.h │ │ ├── AM79C874 │ │ │ ├── net_phy_am79c874.c │ │ │ └── net_phy_am79c874.h │ │ ├── DP83640 │ │ │ ├── net_phy_dp83640.c │ │ │ └── net_phy_dp83640.h │ │ ├── DP83848C │ │ │ ├── net_phy_dp83848c.c │ │ │ └── net_phy_dp83848c.h │ │ ├── DP83867IR │ │ │ ├── net_phy_dp83867ir.c │ │ │ └── net_phy_dp83867ir.h │ │ ├── Generic │ │ │ ├── net_phy.c │ │ │ └── net_phy.h │ │ ├── KSZ9021r │ │ │ ├── net_phy_ksz9021r.c │ │ │ └── net_phy_ksz9021r.h │ │ └── uPD6061x │ │ │ ├── net_phy_upd6061x.c │ │ │ └── net_phy_upd6061x.h │ ├── PIC32 │ │ ├── net_dev_pic32.c │ │ └── net_dev_pic32.h │ ├── RX-EtherC │ │ ├── net_dev_rx_etherc.c │ │ └── net_dev_rx_etherc.h │ ├── RZ-Ether │ │ ├── Cfg │ │ │ ├── net_dev_rz_ether_cfg.c │ │ │ └── net_dev_rz_ether_cfg.h │ │ ├── net_dev_rz_ether.c │ │ └── net_dev_rz_ether.h │ ├── RZT1-Ether │ │ ├── net_dev_rzt1_ether.c │ │ └── net_dev_rzt1_ether.h │ ├── SH-EtherC │ │ ├── OS │ │ │ ├── uCOS-II │ │ │ │ └── net_dev_sh_etherc_isr.src │ │ │ └── uCOS-III │ │ │ │ ├── net_dev_sh_etherc_isr.src │ │ │ │ └── net_dev_sh_etherc_isr_banked.src │ │ ├── SH7216 │ │ │ ├── net_dev_sh_etherc_cfg.h │ │ │ └── net_dev_sh_etherc_reg.h │ │ ├── SH7670 │ │ │ ├── net_dev_sh_etherc_cfg.h │ │ │ └── net_dev_sh_etherc_reg.h │ │ ├── net_dev_sh_etherc.c │ │ └── net_dev_sh_etherc.h │ ├── STR912 │ │ ├── net_dev_str912.c │ │ └── net_dev_str912.h │ ├── TI_EMAC │ │ ├── net_dev_ti_emac.c │ │ └── net_dev_ti_emac.h │ ├── TSE │ │ ├── ARM │ │ │ ├── net_dev_tse_arm.c │ │ │ └── net_dev_tse_arm.h │ │ ├── Cfg │ │ │ └── Template │ │ │ │ └── net_dev_tse_addr_cfg.h │ │ └── NiosII │ │ │ ├── net_dev_tse_nios.c │ │ │ └── net_dev_tse_nios.h │ ├── Template │ │ ├── net_dev_ether_template_dma.c │ │ ├── net_dev_ether_template_dma.h │ │ ├── net_dev_ether_template_pio.c │ │ └── net_dev_ether_template_pio.h │ ├── USBD_CDCEEM │ │ ├── Cfg │ │ │ ├── net_dev_usbd_cdceem_cfg.c │ │ │ └── net_dev_usbd_cdceem_cfg.h │ │ ├── net_dev_usbd_cdceem.c │ │ └── net_dev_usbd_cdceem.h │ ├── WinPcap │ │ ├── ReadMe.txt │ │ ├── net_dev_winpcap.c │ │ ├── net_dev_winpcap.h │ │ ├── net_dev_winpcap_cfg.c │ │ └── net_dev_winpcap_cfg.h │ ├── XIL_ETHER_LITE │ │ ├── net_dev_xil_ether_lite.c │ │ └── net_dev_xil_ether_lite.h │ └── XPS_LL_TEMAC │ │ ├── net_dev_xps_ll_temac_dma.c │ │ └── net_dev_xps_ll_temac_dma.h └── WiFi │ ├── GS2xxx │ ├── net_dev_gs2000.c │ └── net_dev_gs2000.h │ ├── Manager │ └── Generic │ │ ├── net_wifi_mgr.c │ │ └── net_wifi_mgr.h │ ├── RS9110-N-2x │ ├── Firmware │ │ ├── ffdata │ │ ├── ffinst1 │ │ ├── ffinst2 │ │ ├── iudata │ │ ├── iuinst1 │ │ ├── iuinst2 │ │ ├── sbdata1 │ │ ├── sbdata2 │ │ ├── sbinst1 │ │ └── sbinst2 │ ├── net_dev_rs9110n2x.c │ └── net_dev_rs9110n2x.h │ └── Template │ ├── net_dev_wifi_template_spi.c │ └── net_dev_wifi_template_spi.h ├── Examples ├── Init │ ├── init_ether.c │ ├── init_multiple_if.c │ └── init_wifi.c ├── Multicast │ ├── mcast_echo_client.py │ └── mcast_echo_server.c └── Socket │ ├── Script │ └── tcp_server.py │ ├── tcp_client.c │ ├── tcp_server.c │ ├── udp_client.c │ └── udp_server.c ├── FS ├── Template │ ├── net_fs_template.c │ └── net_fs_template.h ├── net_fs.h └── uC-FS-V4 │ ├── net_fs_v4.c │ └── net_fs_v4.h ├── IF ├── net_if.c ├── net_if.h ├── net_if_802x.c ├── net_if_802x.h ├── net_if_ether.c ├── net_if_ether.h ├── net_if_loopback.c ├── net_if_loopback.h ├── net_if_wifi.c └── net_if_wifi.h ├── IP ├── IPv4 │ ├── net_arp.c │ ├── net_arp.h │ ├── net_icmpv4.c │ ├── net_icmpv4.h │ ├── net_igmp.c │ ├── net_igmp.h │ ├── net_ipv4.c │ └── net_ipv4.h └── IPv6 │ ├── net_dad.c │ ├── net_dad.h │ ├── net_icmpv6.c │ ├── net_icmpv6.h │ ├── net_ipv6.c │ ├── net_ipv6.h │ ├── net_mldp.c │ ├── net_mldp.h │ ├── net_ndp.c │ └── net_ndp.h ├── LICENSE ├── Modules └── Common │ ├── net_base64.c │ ├── net_base64.h │ ├── net_md5.c │ ├── net_md5.h │ ├── net_sha1.c │ └── net_sha1.h ├── NOTICE ├── Ports ├── ARM-Cortex-M3 │ ├── IAR │ │ └── net_util_a.asm │ └── RealView │ │ └── net_util_a.asm ├── ARM │ ├── GNU │ │ └── net_util_a.s │ ├── IAR │ │ └── net_util_a.asm │ └── RealView │ │ └── net_util_a.asm └── AVR32 │ └── UC3 │ └── GNU │ └── net_util_a.asm ├── README.rst ├── Secure ├── Segger │ ├── Cfg │ │ └── net_secure_emssl_cfg.h │ ├── HW │ │ └── ST │ │ │ └── STM32F7 │ │ │ ├── net_secure_emssl_hw.c │ │ │ └── net_secure_emssl_hw.h │ ├── net_secure_emssl.c │ └── net_secure_emssl.h └── net_secure.h └── Source ├── net.c ├── net.h ├── net_app.c ├── net_app.h ├── net_ascii.c ├── net_ascii.h ├── net_bsd.c ├── net_bsd.h ├── net_buf.c ├── net_buf.h ├── net_cache.c ├── net_cache.h ├── net_cfg_net.h ├── net_conn.c ├── net_conn.h ├── net_ctr.c ├── net_ctr.h ├── net_def.h ├── net_dict.c ├── net_dict.h ├── net_err.h ├── net_icmp.c ├── net_icmp.h ├── net_ip.c ├── net_ip.h ├── net_mgr.c ├── net_mgr.h ├── net_sock.c ├── net_sock.h ├── net_stat.c ├── net_stat.h ├── net_tcp.c ├── net_tcp.h ├── net_tmr.c ├── net_tmr.h ├── net_type.h ├── net_udp.c ├── net_udp.h ├── net_util.c └── net_util.h /BSP/Template/bsp_net_eth.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK BOARD SUPPORT PACKAGE (BSP) FUNCTIONS 21 | * 22 | * TEMPLATE 23 | * 24 | * Filename : bsp_net_eth.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | 30 | /* 31 | ********************************************************************************************************* 32 | * MODULE 33 | * 34 | * Note(s) : (1) This TCPIP device driver board support package function header file is protected from 35 | * multiple pre-processor inclusion through use of the TCPIP module present pre processor 36 | * macro definition. 37 | ********************************************************************************************************* 38 | */ 39 | 40 | #ifndef BSP_NET_ETH_PRESENT /* See Note #1. */ 41 | #define BSP_NET_ETH_PRESENT 42 | 43 | 44 | /* 45 | ********************************************************************************************************* 46 | * INCLUDE FILES 47 | ********************************************************************************************************* 48 | */ 49 | 50 | #include 51 | 52 | 53 | /* 54 | ********************************************************************************************************* 55 | * EXTERNAL C LANGUAGE LINKAGE 56 | * 57 | * Note(s) : (1) C++ compilers MUST 'extern'ally declare ALL C function prototypes & variable/object 58 | * declarations for correct C language linkage. 59 | ********************************************************************************************************* 60 | */ 61 | 62 | #ifdef __cplusplus 63 | extern "C" { /* See Note #1. */ 64 | #endif 65 | 66 | 67 | /* 68 | ********************************************************************************************************* 69 | * NETWORK BOARD SUPPORT PACKAGE (BSP) ERROR CODES 70 | ********************************************************************************************************* 71 | */ 72 | 73 | 74 | /* 75 | ********************************************************************************************************* 76 | * GLOBAL VARIABLES 77 | ********************************************************************************************************* 78 | */ 79 | 80 | #ifdef NET_IF_ETHER_MODULE_EN 81 | extern const NET_DEV_BSP_ETHER NET_DrvBSP_Template; 82 | #endif 83 | 84 | 85 | /* 86 | ********************************************************************************************************* 87 | * EXTERNAL C LANGUAGE LINKAGE END 88 | ********************************************************************************************************* 89 | */ 90 | 91 | #ifdef __cplusplus 92 | } /* End of 'extern'al C lang linkage. */ 93 | #endif 94 | 95 | 96 | /* 97 | ********************************************************************************************************* 98 | * MODULE END 99 | ********************************************************************************************************* 100 | */ 101 | 102 | #endif 103 | -------------------------------------------------------------------------------- /BSP/Template/bsp_net_wifi.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK BOARD SUPPORT PACKAGE (BSP) FUNCTIONS 21 | * 22 | * TEMPLATE 23 | * 24 | * Filename : bsp_net_wifi.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | 30 | /* 31 | ********************************************************************************************************* 32 | * MODULE 33 | * 34 | * Note(s) : (1) This TCPIP device driver board support package function header file is protected from 35 | * multiple pre-processor inclusion through use of the TCPIP module present pre processor 36 | * macro definition. 37 | ********************************************************************************************************* 38 | */ 39 | 40 | #ifndef BSP_NET_WIFI_PRESENT /* See Note #1. */ 41 | #define BSP_NET_WIFI_PRESENT 42 | 43 | 44 | /* 45 | ********************************************************************************************************* 46 | * INCLUDE FILES 47 | ********************************************************************************************************* 48 | */ 49 | 50 | #include 51 | 52 | 53 | /* 54 | ********************************************************************************************************* 55 | * EXTERNAL C LANGUAGE LINKAGE 56 | * 57 | * Note(s) : (1) C++ compilers MUST 'extern'ally declare ALL C function prototypes & variable/object 58 | * declarations for correct C language linkage. 59 | ********************************************************************************************************* 60 | */ 61 | 62 | #ifdef __cplusplus 63 | extern "C" { /* See Note #1. */ 64 | #endif 65 | 66 | 67 | /* 68 | ********************************************************************************************************* 69 | * NETWORK BOARD SUPPORT PACKAGE (BSP) ERROR CODES 70 | ********************************************************************************************************* 71 | */ 72 | 73 | 74 | /* 75 | ********************************************************************************************************* 76 | * GLOBAL VARIABLES 77 | ********************************************************************************************************* 78 | */ 79 | 80 | #ifdef NET_IF_WIFI_MODULE_EN 81 | extern const NET_DEV_BSP_WIFI_SPI NET_WiFI_BSP_Template; 82 | #endif 83 | 84 | 85 | /* 86 | ********************************************************************************************************* 87 | * EXTERNAL C LANGUAGE LINKAGE END 88 | ********************************************************************************************************* 89 | */ 90 | 91 | #ifdef __cplusplus 92 | } /* End of 'extern'al C lang linkage. */ 93 | #endif 94 | 95 | 96 | /* 97 | ********************************************************************************************************* 98 | * MODULE END 99 | ********************************************************************************************************* 100 | */ 101 | 102 | #endif 103 | -------------------------------------------------------------------------------- /Dev/Ether/A2Fx00/net_dev_a2fx00.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * ACTEL SMART FUSION A2Fx00 23 | * 24 | * Filename : net_dev_a2fx00.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_A2FX00_MODULE_PRESENT 36 | #define NET_DEV_A2FX00_MODULE_PRESENT 37 | 38 | #include 39 | #include 40 | 41 | #ifdef NET_IF_ETHER_MODULE_EN 42 | 43 | 44 | /* 45 | ********************************************************************************************************* 46 | * GLOBAL VARIABLES 47 | ********************************************************************************************************* 48 | */ 49 | 50 | extern const NET_DEV_API_ETHER NetDev_API_A2FX00; 51 | 52 | 53 | /* 54 | ********************************************************************************************************* 55 | * CONFIGURATION ERRORS 56 | * 57 | * Note(s) : (1) RMII signals are generated in software generation are perform in software 58 | In order to generate 2.5Mhz signals CPU's time stamp feauture MUST be enabled. 59 | ********************************************************************************************************* 60 | */ 61 | 62 | #if (CPU_CFG_TS_EN != DEF_ENABLED) 63 | #error "CPU_CFG_TS_EN illegally #define'd in 'cpu_cfg.h'" 64 | #error " [MUST be DEF_ENABLED ] " 65 | #endif 66 | 67 | 68 | /* 69 | ********************************************************************************************************* 70 | * MODULE END 71 | ********************************************************************************************************* 72 | */ 73 | 74 | #endif /* NET_IF_ETHER_MODULE_EN */ 75 | #endif /* NET_DEV_A2FX00_MODULE_PRESENT */ 76 | 77 | -------------------------------------------------------------------------------- /Dev/Ether/AT91RM9200/net_dev_at91rm9200.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * AT91RM9200 23 | * 24 | * Filename : net_dev_at91rm9200.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_AT91RM9200_MODULE_PRESENT 36 | #define NET_DEV_AT91RM9200_MODULE_PRESENT 37 | 38 | #include 39 | 40 | #ifdef NET_IF_ETHER_MODULE_EN 41 | 42 | 43 | /* 44 | ********************************************************************************************************* 45 | * GLOBAL VARIABLES 46 | ********************************************************************************************************* 47 | */ 48 | 49 | extern const NET_DEV_API_ETHER NetDev_API_AT91RM9200; 50 | 51 | 52 | #endif /* NET_IF_ETHER_MODULE_EN */ 53 | #endif /* NET_DEV_AT91RM9200_MODULE_PRESENT */ 54 | 55 | -------------------------------------------------------------------------------- /Dev/Ether/DM9000/net_dev_dm9000.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * Davicom DM9000 (A/B/E) 23 | * 24 | * Filename : net_dev_dm9000.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_DM9000_MODULE_PRESENT 36 | #define NET_DEV_DM9000_MODULE_PRESENT 37 | 38 | #include 39 | #ifdef NET_IF_ETHER_MODULE_EN 40 | 41 | 42 | /* 43 | ********************************************************************************************************* 44 | * DEVICE DRIVER ERROR CODES 45 | * 46 | * Note(s) : (1) ALL device-independent error codes #define'd in 'net_err.h'; 47 | * ALL device-specific error codes #define'd in this 'net_dev_&&&.h'. 48 | * 49 | * (2) Network error code '11,000' series reserved for network device drivers. 50 | * See 'net_err.h NETWORK DEVICE ERROR CODES' to ensure that device-specific 51 | * error codes do NOT conflict with device-independent error codes. 52 | ********************************************************************************************************* 53 | */ 54 | 55 | #define NET_DEV_ERR_UNKNOWN_CHIP_REV 11810 /* Unknown DM9000 derivative detected. */ 56 | 57 | 58 | #define NET_DEV_ERR_INVALID_BUS_MODE NET_PHY_ERR_INVALID_BUS_MODE 59 | #define NET_DEV_ERR_INVALID_PHY_ADDR NET_PHY_ERR_INVALID_ADDR 60 | 61 | 62 | /* 63 | ********************************************************************************************************* 64 | * GLOBAL VARIABLES 65 | ********************************************************************************************************* 66 | */ 67 | 68 | extern const NET_DEV_API_ETHER NetDev_API_DM9000; 69 | 70 | 71 | /* 72 | ********************************************************************************************************* 73 | * FUNCTION PROTOTYPES 74 | * DEFINED IN PRODUCT'S net_bsp.c 75 | ********************************************************************************************************* 76 | */ 77 | 78 | CPU_ADDR NetDev_CmdPinGet(NET_IF_NBR if_nbr, 79 | NET_ERR *perr); 80 | 81 | 82 | /* 83 | ********************************************************************************************************* 84 | * CONFIGURATION ERRORS 85 | ********************************************************************************************************* 86 | */ 87 | 88 | 89 | /* 90 | ********************************************************************************************************* 91 | * MODULE END 92 | ********************************************************************************************************* 93 | */ 94 | 95 | #endif /* NET_IF_ETHER_MODULE_EN */ 96 | #endif /* NET_DEV_DM9000_MODULE_PRESENT */ 97 | 98 | -------------------------------------------------------------------------------- /Dev/Ether/ETHMAC/net_dev_ethmac.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * ETHMAC 23 | * 24 | * Filename : net_dev_ethmac.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_ETHMAC_MODULE_PRESENT 36 | #define NET_DEV_ETHMAC_MODULE_PRESENT 37 | 38 | #include 39 | 40 | #ifdef NET_IF_ETHER_MODULE_EN 41 | 42 | 43 | /* 44 | ********************************************************************************************************* 45 | * GLOBAL VARIABLES 46 | * Note(s) : (1) The following MCUs are support by NetDev_API_GMAC API: 47 | * 48 | * STMicroelectronics STM32H7xx series 49 | * 50 | ********************************************************************************************************* 51 | */ 52 | 53 | extern const NET_DEV_API_ETHER NetDev_API_ETHMAC; 54 | 55 | 56 | /* 57 | ********************************************************************************************************* 58 | * MODULE END 59 | ********************************************************************************************************* 60 | */ 61 | 62 | #endif /* NET_IF_ETHER_MODULE_EN */ 63 | #endif /* NET_DEV_ETHMAC_MODULE_PRESENT */ 64 | -------------------------------------------------------------------------------- /Dev/Ether/FEC/net_dev_fec.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * FREESCALE FEC 23 | * 24 | * Filename : net_dev_fec.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_FEC_MODULE_PRESENT 36 | #define NET_DEV_FEC_MODULE_PRESENT 37 | 38 | #include 39 | #include 40 | 41 | #ifdef NET_IF_ETHER_MODULE_EN 42 | 43 | 44 | /* 45 | ********************************************************************************************************* 46 | * GLOBAL VARIABLES 47 | ********************************************************************************************************* 48 | */ 49 | 50 | extern const NET_DEV_API_ETHER NetDev_API_FEC; 51 | 52 | 53 | /* 54 | ********************************************************************************************************* 55 | * CONFIGURATION ERRORS 56 | ********************************************************************************************************* 57 | */ 58 | 59 | 60 | /* 61 | ********************************************************************************************************* 62 | * MODULE END 63 | ********************************************************************************************************* 64 | */ 65 | 66 | #endif /* NET_IF_ETHER_MODULE_EN */ 67 | #endif /* NET_DEV_FEC_MODULE_PRESENT */ 68 | 69 | -------------------------------------------------------------------------------- /Dev/Ether/FEC_MPC55xx/net_dev_fec_mpc55xx.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * FREESCALE FEC ON THE 23 | * MPC55xx 24 | * 25 | * Filename : net_dev_fec_mpc55xx.h 26 | * Version : V3.06.01 27 | ********************************************************************************************************* 28 | */ 29 | 30 | /* 31 | ********************************************************************************************************* 32 | * MODULE 33 | ********************************************************************************************************* 34 | */ 35 | 36 | #ifndef NET_DEV_FEC_MPC55XX_MODULE_PRESENT 37 | #define NET_DEV_FEC_MPC55XX_MODULE_PRESENT 38 | 39 | #include 40 | 41 | #ifdef NET_IF_ETHER_MODULE_EN 42 | 43 | 44 | 45 | /* 46 | ********************************************************************************************************* 47 | * GLOBAL VARIABLES 48 | ********************************************************************************************************* 49 | */ 50 | 51 | extern const NET_DEV_API_ETHER NetDev_API_FEC_MPC55XX; 52 | 53 | 54 | /* 55 | ********************************************************************************************************* 56 | * MODULE END 57 | ********************************************************************************************************* 58 | */ 59 | 60 | #endif /* NET_IF_ETHER_MODULE_EN */ 61 | #endif /* NET_DEV_FEC_MPC55XX_MODULE_PRESENT */ 62 | 63 | -------------------------------------------------------------------------------- /Dev/Ether/GEM/net_dev_gem.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * CADENCE GIGABIT ETHERNET MAC (GEM) 23 | * 24 | * Filename : net_dev_gem.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_GEM_MODULE_PRESENT 36 | #define NET_DEV_GEM_MODULE_PRESENT 37 | 38 | #include 39 | 40 | #ifdef NET_IF_ETHER_MODULE_EN 41 | 42 | 43 | /* 44 | ********************************************************************************************************* 45 | * GLOBAL VARIABLES 46 | ********************************************************************************************************* 47 | */ 48 | 49 | extern const NET_DEV_API_ETHER NetDev_API_GEM; 50 | extern const NET_DEV_API_ETHER NetDev_API_GEM64_32; 51 | extern const NET_DEV_API_ETHER NetDev_API_GEM64; 52 | 53 | 54 | /* 55 | ********************************************************************************************************* 56 | * MODULE END 57 | ********************************************************************************************************* 58 | */ 59 | 60 | #endif /* NET_IF_ETHER_MODULE_EN */ 61 | #endif /* NET_DEV_GEM_MODULE_PRESENT */ 62 | 63 | -------------------------------------------------------------------------------- /Dev/Ether/GMAC/Cfg/net_dev_gmac_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE CONFIGURATION FILE 21 | * 22 | * GMAC 10/100 23 | * 24 | * Filename : net_dev_gmac_cfg.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | * 33 | * Note(s) : (1) This network device configuration header file is protected from multiple pre-processor 34 | * inclusion through use of the network module present pre-processor macro definition. 35 | ********************************************************************************************************* 36 | */ 37 | 38 | #ifndef NET_DEV_GMAC_CFG_MODULE_PRESENT /* See Note #1. */ 39 | #define NET_DEV_GMAC_CFG_MODULE_PRESENT 40 | 41 | 42 | /* 43 | ********************************************************************************************************* 44 | * NETWORK DEVICE CONFIGURATION 45 | * 46 | * Note(s) : (1) Configurations are done for board/application setup and it must be updated according to 47 | * application/projects requirements. 48 | ********************************************************************************************************* 49 | */ 50 | 51 | /* Declare each specific devices' configuration (see Note #1) : */ 52 | 53 | extern const NET_DEV_CFG_ETHER NetDev_Cfg_SK_FM3_176PMC_ETH; /* Example Ethernet cfg for SK-FM3-176PMC-ETH board */ 54 | extern const NET_PHY_CFG_ETHER NetPhy_Cfg_SK_FM3_176PMC_ETH; /* Example Ethernet Phy cfg for SK-FM3-176PMC-ETH board */ 55 | 56 | extern const NET_DEV_CFG_ETHER NetDev_Cfg_MCB1800; /* Example Ethernet cfg for MCB1800 board */ 57 | extern const NET_PHY_CFG_ETHER NetPhy_Cfg_MCB1800; /* Example Ethernet Phy cfg for MCB1800 board */ 58 | 59 | extern const NET_DEV_CFG_ETHER NetDev_Cfg_LPC_4350_DB1; /* Example Ethernet cfg for LPC-4350-DB1 board */ 60 | extern const NET_PHY_CFG_ETHER NetPhy_Cfg_LPC_4350_DB1; /* Example Ethernet Phy cfg for LPC-4350-DB1 board */ 61 | 62 | extern const NET_DEV_CFG_ETHER NetDev_Cfg_uCEVALSTM32F107; /* Example Ethernet cfg for uC-Eval-STM32F107 board */ 63 | extern const NET_PHY_CFG_ETHER NetPhy_Cfg_uCEVALSTM32F107; /* Example Ethernet Phy cfg for uC-Eval-STM32F107 board */ 64 | 65 | /* 66 | ********************************************************************************************************* 67 | * MODULE END 68 | * 69 | * Note(s) : (1) See 'net_dev_cfg.h MODULE'. 70 | ********************************************************************************************************* 71 | */ 72 | 73 | #endif /* End of net dev cfg module include. */ 74 | 75 | -------------------------------------------------------------------------------- /Dev/Ether/GMAC/net_dev_gmac.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * GMAC 10/100 23 | * 24 | * Filename : net_dev_gmac.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_GMAC_MODULE_PRESENT 36 | #define NET_DEV_GMAC_MODULE_PRESENT 37 | 38 | #include 39 | 40 | #ifdef NET_IF_ETHER_MODULE_EN 41 | 42 | 43 | /* 44 | ********************************************************************************************************* 45 | * GLOBAL VARIABLES 46 | * Note(s) : (1) The following MCUs are support by NetDev_API_GMAC API: 47 | * 48 | * STMicroelectronics STM32F107xx series 49 | * STMicroelectronics STM32F2xxx series 50 | * STMicroelectronics STM32F4xxx series 51 | * STMicroelectronics STM32F74xxx series 52 | * STMicroelectronics STM32F75xxx series 53 | * FUJITSU MB9BFD10T series 54 | * FUJITSU MB9BF610T series 55 | * FUJITSU MB9BF210T series 56 | * 57 | * (2) The following MCUs are support by NetDev_API_LPCXX_ENET API: 58 | * 59 | * NXP LPC185x series 60 | * NXP LPC183x series 61 | * NXP LPC435x series 62 | * NXP LPC433x series 63 | * 64 | * (3) The following MCUs are support by NetDev_API_XMC4000_ENET API: 65 | * 66 | * INFINEON XMC4500 series 67 | * INFINEON XMC4400 series 68 | * 69 | * (4) The following MCUs are support by NetDev_API_TM4C12X_ENET API: 70 | * 71 | * TEXAS INSTRUMENTS TM4C12x series 72 | * 73 | ********************************************************************************************************* 74 | */ 75 | 76 | extern const NET_DEV_API_ETHER NetDev_API_GMAC; 77 | extern const NET_DEV_API_ETHER NetDev_API_LPCXX_ENET; 78 | extern const NET_DEV_API_ETHER NetDev_API_XMC4000_ENET; 79 | extern const NET_DEV_API_ETHER NetDev_API_TM4C12X_ENET; 80 | extern const NET_DEV_API_ETHER NetDev_API_HPS_EMAC; 81 | extern const NET_DEV_API_ETHER NetDev_API_STM32Fx_EMAC; 82 | 83 | 84 | /* 85 | ********************************************************************************************************* 86 | * MODULE END 87 | ********************************************************************************************************* 88 | */ 89 | 90 | #endif /* NET_IF_ETHER_MODULE_EN */ 91 | #endif /* NET_DEV_GMAC_MODULE_PRESENT */ 92 | -------------------------------------------------------------------------------- /Dev/Ether/H8S2472/net_dev_h8s2472.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * Renesas H8S2472 23 | * 24 | * Filename : net_dev_h8s2472.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_H8S2472_MODULE_PRESENT 36 | #define NET_DEV_H8S2472_MODULE_PRESENT 37 | 38 | #include 39 | 40 | #ifdef NET_IF_ETHER_MODULE_EN 41 | 42 | 43 | /* 44 | ********************************************************************************************************* 45 | * GLOBAL VARIABLES 46 | ********************************************************************************************************* 47 | */ 48 | 49 | extern const NET_DEV_API_ETHER NetDev_API_H8S2472; 50 | 51 | 52 | 53 | /* 54 | ********************************************************************************************************* 55 | * MODULE END 56 | ********************************************************************************************************* 57 | */ 58 | 59 | #endif /* NET_IF_ETHER_MODULE_EN */ 60 | #endif /* NET_DEV_H8S2472_MODULE_PRESENT */ 61 | 62 | -------------------------------------------------------------------------------- /Dev/Ether/H8S2472/net_dev_h8s2472_isr.c: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * Renesas H8S2472 23 | * 24 | * Filename : net_dev_h8s2472_isr.c 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | ********************************************************************************************************* 32 | ** Global Functions 33 | ********************************************************************************************************* 34 | ********************************************************************************************************* 35 | */ 36 | 37 | #pragma asm 38 | .IMPORT _OSTCBCur 39 | .IMPORT _OSIntExit 40 | .IMPORT _OSIntNesting 41 | .IMPORT _NetBSP_ENET_ISR_Handler 42 | #pragma endasm 43 | 44 | /* 45 | ********************************************************************************************************* 46 | * MACROS 47 | ********************************************************************************************************* 48 | */ 49 | 50 | #pragma asm 51 | .MACRO PUSHALL 52 | PUSH.L ER0 53 | PUSH.L ER1 54 | PUSH.L ER2 55 | PUSH.L ER3 56 | PUSH.L ER4 57 | PUSH.L ER5 58 | PUSH.L ER6 59 | .ENDM 60 | 61 | .MACRO POPALL 62 | POP.L ER6 63 | POP.L ER5 64 | POP.L ER4 65 | POP.L ER3 66 | POP.L ER2 67 | POP.L ER1 68 | POP.L ER0 69 | .ENDM 70 | #pragma endasm 71 | 72 | /* 73 | ********************************************************************************************************* 74 | * NetDEV_ISR() 75 | * 76 | * Description : EtherC ISR, calls the ISR handler : 77 | * 78 | * Argument(s) : none. 79 | * 80 | * Return(s) : none. 81 | * 82 | * Caller(s) : This is an ISR. 83 | 84 | ********************************************************************************************************* 85 | */ 86 | 87 | #pragma noregsave NetDev_ISR 88 | #pragma interrupt (NetDev_ISR(vect=119)) 89 | void NetDev_ISR (void) 90 | { 91 | #pragma asm 92 | PUSHALL 93 | 94 | _NetDev_ISR1: 95 | MOV.B @_OSIntNesting, R6L 96 | INC.B R6L 97 | MOV.B R6L, @_OSIntNesting 98 | CMP.B #1,R6L 99 | BNE _NetDev_ISR1_1 100 | 101 | MOV.L @_OSTCBCur, ER6 102 | MOV.L ER7, @ER6 103 | 104 | _NetDev_ISR1_1: 105 | JSR @_NetBSP_ENET_ISR_Handler 106 | JSR @_OSIntExit 107 | 108 | POPALL 109 | #pragma endasm 110 | } 111 | 112 | -------------------------------------------------------------------------------- /Dev/Ether/LAN911x/BSP/Template/net_bsp.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK BOARD SUPPORT PACKAGE (BSP) FUNCTIONS 21 | * 22 | * LAN911x 23 | * 24 | * Filename : net_bsp.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | * Note(s) : (1) To provide the required Board Support Package functionality, insert the appropriate 28 | * board-specific code to perform the stated actions wherever '$$$$' comments are found. 29 | * 30 | * #### This note MAY be entirely removed for specific board support packages. 31 | ********************************************************************************************************* 32 | */ 33 | 34 | /* 35 | ********************************************************************************************************* 36 | * EXTERNS 37 | ********************************************************************************************************* 38 | */ 39 | 40 | #ifdef NET_BSP_MODULE 41 | #define NET_BSP_EXT 42 | #else 43 | #define NET_BSP_EXT extern 44 | #endif 45 | 46 | 47 | /* 48 | ********************************************************************************************************* 49 | * DEFINES 50 | ********************************************************************************************************* 51 | */ 52 | 53 | #define NET_BSP_ISR_TYPE_UNKNOWN 0 54 | #define NET_BSP_ISR_TYPE_RX 1 /* BSP specific ISR type codes for the generic ISR ... */ 55 | #define NET_BSP_ISR_TYPE_TX 2 /* ... handler located in the hardware driver */ 56 | 57 | 58 | /* 59 | ********************************************************************************************************* 60 | * DATA TYPES 61 | ********************************************************************************************************* 62 | */ 63 | 64 | 65 | /* 66 | ********************************************************************************************************* 67 | * GLOBAL VARIABLES 68 | ********************************************************************************************************* 69 | */ 70 | 71 | 72 | /* 73 | ********************************************************************************************************* 74 | * FUNCTION PROTOTYPES 75 | ********************************************************************************************************* 76 | */ 77 | 78 | 79 | /* 80 | ********************************************************************************************************* 81 | * CONFIGURATION ERRORS 82 | ********************************************************************************************************* 83 | */ 84 | 85 | -------------------------------------------------------------------------------- /Dev/Ether/LAN911x/CFG/Template/net_dev_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE CONFIGURATION FILE 21 | * 22 | * LAN911x 23 | * 24 | * Filename : net_dev_cfg.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_LAN911x_CFG_PRESENT 36 | #define NET_DEV_LAN911x_CFG_PRESENT 37 | 38 | 39 | /* 40 | ********************************************************************************************************* 41 | * NETWORK DEVICE CONFIGURATION DATA TYPE 42 | ********************************************************************************************************* 43 | */ 44 | 45 | extern NET_DEV_CFG_ETHER NetDev_Cfg_LAN911x_0; 46 | extern NET_DEV_CFG_ETHER NetDev_Cfg_LAN911x_1; 47 | 48 | 49 | /* 50 | ********************************************************************************************************* 51 | * MODULE END 52 | ********************************************************************************************************* 53 | */ 54 | 55 | #endif /* End of LAN911x cfg include. */ 56 | 57 | -------------------------------------------------------------------------------- /Dev/Ether/LAN911x/net_dev_lan911x.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * LAN911x 23 | * 24 | * Filename : net_dev_lan911x.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | * Note(s) : (1) Assumes uC/TCP-IP V2.20.00 (or more recent version) is included in the project build. 28 | * 29 | * (2) Supports LAN911{5,6,7,8} Ethernet controller as described in 30 | * 31 | * Standard Microsystems Corporation's (SMSC; http://www.smsc.com) 32 | * (a) LAN9115 data sheet (SMSC LAN9115; Revision 1.1 05/17/2005) 33 | * 34 | * (3) It is assumed that the LAN911x is attached to a 32 bit little-endian host processor 35 | * and that the data lines are NOT byte swapped. 36 | * 37 | * ----------- ----------- 38 | * | LAN911x | | CPU | 39 | * | | | | 40 | * | | | | 41 | * | D07- | 8 | D07- | 42 | * | D00 |--------/--------| D00 | 43 | * | | | | 44 | * | D15- | 8 | D15- | 45 | * | D08 |--------/--------| D08 | 46 | * | | | | 47 | * ----------- ----------- 48 | * 49 | * (4) #### Power Management Events are not yet implemented 50 | * #### PHY interrupts are not enabled (no knowledge of link state changes) 51 | ********************************************************************************************************* 52 | */ 53 | 54 | /* 55 | ********************************************************************************************************* 56 | * MODULE 57 | ********************************************************************************************************* 58 | */ 59 | 60 | #ifndef NET_DEV_LAN911x_MODULE_PRESENT 61 | #define NET_DEV_LAN911x_MODULE_PRESENT 62 | 63 | #include 64 | 65 | #ifdef NET_IF_ETHER_MODULE_EN 66 | 67 | 68 | /* 69 | ********************************************************************************************************* 70 | * GLOBAL VARIABLES 71 | ********************************************************************************************************* 72 | */ 73 | 74 | extern const NET_DEV_API_ETHER NetDev_API_LAN911x; 75 | 76 | 77 | 78 | /* 79 | ********************************************************************************************************* 80 | * MODULE END 81 | ********************************************************************************************************* 82 | */ 83 | 84 | #endif /* NET_IF_ETHER_MODULE_EN */ 85 | #endif /* NET_DEV_LAN911x_MODULE_PRESENT */ 86 | 87 | -------------------------------------------------------------------------------- /Dev/Ether/LM3Sxxxx/net_dev_lm3sxxxx.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * LUMINARY MICRO LM3Sxxxx 23 | * 24 | * Filename : net_dev_lm3sxxxx.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_LM3Sxxxx_MODULE_PRESENT 36 | #define NET_DEV_LM3Sxxxx_MODULE_PRESENT 37 | 38 | #include 39 | 40 | #ifdef NET_IF_ETHER_MODULE_EN 41 | 42 | 43 | /* 44 | ********************************************************************************************************* 45 | * GLOBAL VARIABLES 46 | ********************************************************************************************************* 47 | */ 48 | 49 | extern const NET_DEV_API_ETHER NetDev_API_LM3Sxxxx; 50 | 51 | 52 | /* 53 | ********************************************************************************************************* 54 | * MODULE END 55 | ********************************************************************************************************* 56 | */ 57 | 58 | #endif /* NET_IF_ETHER_MODULE_EN */ 59 | #endif /* NET_DEV_LM3Sxxxx_MODULE_PRESENT */ 60 | 61 | -------------------------------------------------------------------------------- /Dev/Ether/LPCxxxx/net_dev_lpcxxxx.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * LPCxxxx 23 | * 24 | * Filename : net_dev_lpcxxxx.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | * Note(s) : (1) Assumes uC/TCP-IP V2.20.00 (or more recent version) is included in the project build. 28 | * 29 | * (2) The following parts may use this 'net_dev_lpcxxxx' device driver : 30 | * 31 | * * LPC23xx Series 32 | * * LPC24xx Series 33 | * * LPC32x0 Series 34 | * * LPC17xx Series 35 | * * LPC408x Series 36 | ********************************************************************************************************* 37 | */ 38 | 39 | /* 40 | ********************************************************************************************************* 41 | * MODULE 42 | ********************************************************************************************************* 43 | */ 44 | 45 | #ifndef NET_DEV_LPCxxxx_MODULE_PRESENT 46 | #define NET_DEV_LPCxxxx_MODULE_PRESENT 47 | 48 | #include 49 | 50 | #ifdef NET_IF_ETHER_MODULE_EN 51 | 52 | 53 | /* 54 | ********************************************************************************************************* 55 | * GLOBAL VARIABLES 56 | ********************************************************************************************************* 57 | */ 58 | 59 | extern const NET_DEV_API_ETHER NetDev_API_LPCxxxx; /* Generic LPCxxxx device API. */ 60 | extern const NET_DEV_API_ETHER NetDev_API_LPC1758; /* LPC1758 device API. */ 61 | 62 | 63 | /* 64 | ********************************************************************************************************* 65 | * MODULE END 66 | ********************************************************************************************************* 67 | */ 68 | 69 | #endif /* NET_IF_ETHER_MODULE_EN */ 70 | #endif /* NET_DEV_LPCxxxx_MODULE_PRESENT */ 71 | 72 | -------------------------------------------------------------------------------- /Dev/Ether/MACB/net_dev_macb.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * Atmel MACB 23 | * 24 | * Filename : net_dev_macb.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_MACB_MODULE_PRESENT 36 | #define NET_DEV_MACB_MODULE_PRESENT 37 | 38 | #include 39 | 40 | #ifdef NET_IF_ETHER_MODULE_EN 41 | 42 | /* 43 | ********************************************************************************************************* 44 | * GLOBAL VARIABLES 45 | ********************************************************************************************************* 46 | */ 47 | 48 | extern const NET_DEV_API_ETHER NetDev_API_MACB; 49 | 50 | 51 | /* 52 | ********************************************************************************************************* 53 | * MODULE END 54 | ********************************************************************************************************* 55 | */ 56 | 57 | #endif /* NET_IF_ETHER_MODULE_EN */ 58 | #endif /* NET_DEV_MACB_MODULE_PRESENT */ 59 | 60 | -------------------------------------------------------------------------------- /Dev/Ether/MACB_AP7000/net_dev_macb_ap7000.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * Atmel MACB on the 23 | * AVR AP7000 24 | * 25 | * Filename : net_dev_macb_ap7000.h 26 | * Version : V3.06.01 27 | ********************************************************************************************************* 28 | */ 29 | 30 | /* 31 | ********************************************************************************************************* 32 | * MODULE 33 | ********************************************************************************************************* 34 | */ 35 | 36 | #ifndef NET_DEV_MACB_AP7000_MODULE_PRESENT 37 | #define NET_DEV_MACB_AP7000_MODULE_PRESENT 38 | 39 | #include 40 | 41 | #ifdef NET_IF_ETHER_MODULE_EN 42 | 43 | 44 | /* 45 | ********************************************************************************************************* 46 | * GLOBAL VARIABLES 47 | ********************************************************************************************************* 48 | */ 49 | 50 | extern const NET_DEV_API_ETHER NetDev_API_MACB_AP7000; 51 | 52 | 53 | 54 | /* 55 | ********************************************************************************************************* 56 | * MODULE END 57 | ********************************************************************************************************* 58 | */ 59 | 60 | #endif /* NET_IF_ETHER_MODULE_EN */ 61 | #endif /* NET_DEV_MACB_AP7000_MODULE_PRESENT */ 62 | 63 | -------------------------------------------------------------------------------- /Dev/Ether/MACNet/net_dev_macnet.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * KINETIS MACNET 23 | * 24 | * Filename : net_dev_macnet.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_MACNET_MODULE_PRESENT 36 | #define NET_DEV_MACNET_MODULE_PRESENT 37 | 38 | #include 39 | #include 40 | 41 | #ifdef NET_IF_ETHER_MODULE_EN 42 | 43 | 44 | 45 | /* 46 | ********************************************************************************************************* 47 | * GLOBAL VARIABLES 48 | ********************************************************************************************************* 49 | */ 50 | 51 | extern const NET_DEV_API_ETHER NetDev_API_MACNET; 52 | 53 | 54 | 55 | /* 56 | ********************************************************************************************************* 57 | * MODULE END 58 | ********************************************************************************************************* 59 | */ 60 | 61 | #endif /* NET_IF_ETHER_MODULE_EN */ 62 | #endif /* NET_DEV_MACNET_MODULE_PRESENT */ 63 | 64 | -------------------------------------------------------------------------------- /Dev/Ether/OMAP-L1x/net_dev_omap_l1x.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * ETHERNET DMA TEMPLATE 23 | * 24 | * Filename : net_dev_omap_l1x.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_OMAP_L1x_MODULE_PRESENT 36 | #define NET_DEV_OMAP_L1x_MODULE_PRESENT 37 | 38 | #include 39 | 40 | #ifdef NET_IF_ETHER_MODULE_EN 41 | 42 | 43 | /* 44 | ********************************************************************************************************* 45 | * GLOBAL VARIABLES 46 | ********************************************************************************************************* 47 | */ 48 | 49 | extern const NET_DEV_API_ETHER NetDev_API_OMAP_L1x; 50 | 51 | 52 | 53 | /* 54 | ********************************************************************************************************* 55 | * MODULE END 56 | ********************************************************************************************************* 57 | */ 58 | 59 | #endif /* NET_IF_ETHER_MODULE_EN */ 60 | #endif /* NET_DEV_OMAP_L1x_MODULE_PRESENT */ 61 | 62 | -------------------------------------------------------------------------------- /Dev/Ether/PHY/88E1111/net_phy_88e1111.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK PHYSICAL LAYER DRIVER 21 | * 22 | * 10/100/1000 Gigabit Ethernet Transceiver 23 | * Marvell 88E1111 24 | * 25 | * Filename : net_phy_88e1111.h 26 | * Version : V3.06.01 27 | ********************************************************************************************************* 28 | * Note(s) : (1) Assumes uC/TCP-IP V2.06 (or more recent version) is included in the project build. 29 | * 30 | * (2) The (R)MII interface port is assumed to be part of the host EMAC. Therefore, (R)MII 31 | * reads/writes MUST be performed through the network device API interface via calls to 32 | * function pointers 'Phy_RegRd()' & 'Phy_RegWr()'. 33 | * 34 | * (3) Interrupt support is Phy specific, therefore the generic Phy driver does NOT support 35 | * interrupts. However, interrupt support is easily added to the generic Phy driver & 36 | * thus the ISR handler has been prototyped and & populated within the function pointer 37 | * structure for example purposes. 38 | ********************************************************************************************************* 39 | */ 40 | 41 | /* 42 | ********************************************************************************************************* 43 | * MODULE 44 | ********************************************************************************************************* 45 | */ 46 | 47 | #ifndef NET_PHY_88E1111_MODULE_PRESENT 48 | #define NET_PHY_88E1111_MODULE_PRESENT 49 | 50 | #include 51 | #include 52 | #ifdef NET_IF_ETHER_MODULE_EN 53 | 54 | 55 | /* 56 | ********************************************************************************************************* 57 | * GLOBAL VARIABLES 58 | ********************************************************************************************************* 59 | */ 60 | 61 | extern const NET_PHY_API_ETHER NetPhy_API_88E1111; 62 | 63 | 64 | 65 | /* 66 | ********************************************************************************************************* 67 | * MODULE END 68 | ********************************************************************************************************* 69 | */ 70 | 71 | #endif /* NET_IF_ETHER_MODULE_EN */ 72 | #endif /* NET_PHY_88E1111_MODULE_PRESENT */ 73 | 74 | -------------------------------------------------------------------------------- /Dev/Ether/PHY/AM79C874/net_phy_am79c874.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK PHYSICAL LAYER DRIVER 21 | * 22 | * AMD AM79C874 23 | * 24 | * Filename : net_phy_am79c874.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | * Note(s) : (1) Assumes uC/TCP-IP V2.02 (or more recent version) is included in the project build. 28 | * 29 | * (2) The (R)MII interface port is assumed to be part of the host EMAC. Therefore, (R)MII 30 | * reads/writes MUST be performed through the network device API interface via calls to 31 | * function pointers 'Phy_RegRd()' & 'Phy_RegWr()'. 32 | * 33 | * (3) Interrupt support is Phy specific, therefore the generic Phy driver does NOT support 34 | * interrupts. However, interrupt support is easily added to the generic Phy driver & 35 | * thus the ISR handler has been prototyped and & populated within the function pointer 36 | * structure for example purposes. 37 | ********************************************************************************************************* 38 | */ 39 | 40 | /* 41 | ********************************************************************************************************* 42 | * MODULE 43 | ********************************************************************************************************* 44 | */ 45 | 46 | #ifndef NET_PHY_AM79C874_MODULE_PRESENT 47 | #define NET_PHY_AM79C874_MODULE_PRESENT 48 | 49 | #include 50 | #include 51 | #ifdef NET_IF_ETHER_MODULE_EN 52 | 53 | 54 | /* 55 | ********************************************************************************************************* 56 | * GLOBAL VARIABLES 57 | ********************************************************************************************************* 58 | */ 59 | 60 | extern const NET_PHY_API_ETHER NetPhy_API_AM79C874; 61 | 62 | /* 63 | ********************************************************************************************************* 64 | * MODULE END 65 | ********************************************************************************************************* 66 | */ 67 | 68 | #endif /* NET_IF_ETHER_MODULE_EN */ 69 | #endif /* NET_PHY_AM79C874_MODULE_PRESENT */ 70 | 71 | -------------------------------------------------------------------------------- /Dev/Ether/PHY/DP83640/net_phy_dp83640.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK PHYSICAL LAYER DRIVER 21 | * 22 | * DP83640 ETHERNET PHY 23 | * 24 | * Filename : net_phy_dp83640.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | * Note(s) : (1) Assumes uC/TCP-IP V2.02 (or more recent version) is included in the project build. 28 | * 29 | * (2) The (R)MII interface port is assumed to be part of the host EMAC. Therefore, (R)MII 30 | * reads/writes MUST be performed through the network device API interface via calls to 31 | * function pointers 'Phy_RegRd()' & 'Phy_RegWr()'. 32 | * 33 | * (3) Interrupt support is Phy specific, therefore the generic Phy driver does NOT support 34 | * interrupts. However, interrupt support is easily added to the generic Phy driver & 35 | * thus the ISR handler has been prototyped and & populated within the function pointer 36 | * structure for example purposes. 37 | * 38 | * (4) Does NOT support 1000Mbps Phy. 39 | ********************************************************************************************************* 40 | */ 41 | 42 | /* 43 | ********************************************************************************************************* 44 | * MODULE 45 | ********************************************************************************************************* 46 | */ 47 | 48 | #ifndef NET_PHY_DP83640_MODULE_PRESENT /* See Note #1. */ 49 | #define NET_PHY_DP83640_MODULE_PRESENT 50 | 51 | #include 52 | #include 53 | #ifdef NET_IF_ETHER_MODULE_EN 54 | 55 | 56 | /* 57 | ********************************************************************************************************* 58 | * GLOBAL VARIABLES 59 | ********************************************************************************************************* 60 | */ 61 | 62 | extern const NET_PHY_API_ETHER NetPhy_API_DP83640; 63 | 64 | 65 | /* 66 | ********************************************************************************************************* 67 | * MODULE END 68 | ********************************************************************************************************* 69 | */ 70 | 71 | #endif /* NET_IF_ETHER_MODULE_EN */ 72 | #endif /* NET_PHY_DP83640_MODULE_PRESENT */ 73 | 74 | 75 | -------------------------------------------------------------------------------- /Dev/Ether/PHY/DP83848C/net_phy_dp83848c.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK PHYSICAL LAYER 21 | * 22 | * DP83848C ETHERNET PHY 23 | * 24 | * Filename : net_phy_dp83848c.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | * Note(s) : (1) Assumes uC/TCP-IP V2.05 (or more recent version) is included in the project build. 28 | * 29 | * (2) The (R)MII interface port is assumed to be part of the host EMAC. Therefore, (R)MII 30 | * reads/writes MUST be performed through the network device API interface via calls to 31 | * function pointers 'Phy_RegRd()' & 'Phy_RegWr()'. 32 | * 33 | * (3) Interrupt support is Phy specific, therefore the generic Phy driver does NOT support 34 | * interrupts. However, interrupt support is easily added to the generic Phy driver & 35 | * thus the ISR handler has been prototyped and & populated within the function pointer 36 | * structure for example purposes. 37 | * 38 | * (4) Does NOT support 1000Mbps Phy. 39 | ********************************************************************************************************* 40 | */ 41 | 42 | /* 43 | ********************************************************************************************************* 44 | * MODULE 45 | ********************************************************************************************************* 46 | */ 47 | 48 | #ifndef NET_PHY_DP83848C_MODULE_PRESENT 49 | #define NET_PHY_DP83848C_MODULE_PRESENT 50 | 51 | 52 | #include 53 | #include 54 | #ifdef NET_IF_ETHER_MODULE_EN 55 | 56 | 57 | /* 58 | ********************************************************************************************************* 59 | * GLOBAL VARIABLES 60 | ********************************************************************************************************* 61 | */ 62 | 63 | extern const NET_PHY_API_ETHER NetPhy_API_DP83848C; 64 | 65 | 66 | #endif /* NET_PHY_DP83848C_MODULE_PRESENT */ 67 | #endif /* NET_IF_ETHER_MODULE_EN */ 68 | 69 | -------------------------------------------------------------------------------- /Dev/Ether/PHY/uPD6061x/net_phy_upd6061x.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK PHYSICAL LAYER DRIVER 21 | * 22 | * GENERIC ETHERNET PHY 23 | * 24 | * Filename : net_phy_upd6061x.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | * Note(s) : (1) Assumes uC/TCP-IP V2.02 (or more recent version) is included in the project build. 28 | * 29 | * (2) The (R)MII interface port is assumed to be part of the host EMAC. Therefore, (R)MII 30 | * reads/writes MUST be performed through the network device API interface via calls to 31 | * function pointers 'Phy_RegRd()' & 'Phy_RegWr()'. 32 | * 33 | * (3) Interrupt support is Phy specific, therefore the generic Phy driver does NOT support 34 | * interrupts. However, interrupt support is easily added to the generic Phy driver & 35 | * thus the ISR handler has been prototyped and & populated within the function pointer 36 | * structure for example purposes. 37 | * 38 | * (4) Does NOT support 1000Mbps Phy. 39 | ********************************************************************************************************* 40 | */ 41 | 42 | #include 43 | #include 44 | 45 | 46 | /* 47 | ********************************************************************************************************* 48 | * MODULE 49 | * 50 | * Note(s) : (1) This network physical layer header file is protected from multiple pre-processor inclusion 51 | * through use of the network physical layer module present pre-processor macro definition. 52 | ********************************************************************************************************* 53 | */ 54 | 55 | #ifndef NET_PHY_UPD6061X_MODULE_PRESENT /* See Note #1. */ 56 | #define NET_PHY_UPD6061X_MODULE_PRESENT 57 | #ifdef NET_IF_ETHER_MODULE_EN 58 | 59 | /********************************************************************************************************************** 60 | * GLOBAL VARIABLES 61 | *********************************************************************************************************************/ 62 | 63 | extern const NET_PHY_API_ETHER NetPhy_API_UPD6061X; 64 | 65 | 66 | 67 | #endif /* NET_IF_ETHER_MODULE_EN */ 68 | #endif /* NET_PHY_UPD6061X_MODULE_PRESENT */ 69 | -------------------------------------------------------------------------------- /Dev/Ether/PIC32/net_dev_pic32.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * PIC32 ETHERNET DMA 23 | * 24 | * Filename : net_dev_pic32.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_ETHER_PIC32_MODULE_PRESENT 36 | #define NET_DEV_ETHER_PIC32_MODULE_PRESENT 37 | 38 | #include 39 | 40 | #ifdef NET_IF_ETHER_MODULE_EN 41 | 42 | 43 | /* 44 | ********************************************************************************************************* 45 | * GLOBAL VARIABLES 46 | ********************************************************************************************************* 47 | */ 48 | 49 | extern const NET_DEV_API_ETHER NetDev_API_EtherPIC32; 50 | 51 | 52 | /* 53 | ********************************************************************************************************* 54 | * CONFIGURATION ERRORS 55 | ********************************************************************************************************* 56 | */ 57 | 58 | 59 | /* 60 | ********************************************************************************************************* 61 | * MODULE END 62 | ********************************************************************************************************* 63 | */ 64 | 65 | #endif /* NET_IF_ETHER_MODULE_EN */ 66 | #endif /* NET_DEV_ETHER_PIC32_MODULE_PRESENT */ 67 | 68 | -------------------------------------------------------------------------------- /Dev/Ether/RZ-Ether/Cfg/net_dev_rz_ether_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE CONFIGURATION FILE 21 | * 22 | * RZ ETHER 10/100 23 | * 24 | * Filename : net_dev_rz_ether_cfg.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | * 33 | * Note(s) : (1) This network device configuration header file is protected from multiple pre-processor 34 | * inclusion through use of the network module present pre-processor macro definition. 35 | ********************************************************************************************************* 36 | */ 37 | 38 | #ifndef NET_DEV_RZ_ETHER_CFG_MODULE_PRESENT /* See Note #1. */ 39 | #define NET_DEV_RZ_ETHER_CFG_MODULE_PRESENT 40 | 41 | #include 42 | 43 | 44 | /* 45 | ********************************************************************************************************* 46 | * NETWORK DEVICE CONFIGURATION 47 | * 48 | * Note(s) : (1) Configurations are done for board/application setup and it must be updated according to 49 | * application/projects requirements. 50 | ********************************************************************************************************* 51 | */ 52 | 53 | /* Declare each specific devices' cfg (see Note #1) : */ 54 | 55 | extern const NET_DEV_CFG_ETHER NetDev_Cfg_RTK772100FC; /* Example Ethernet cfg for RTK772100FC board */ 56 | extern const NET_PHY_CFG_ETHER NetPhy_Cfg_RTK772100FC; /* Example Ethernet Phy cfg for RTK772100FC board */ 57 | 58 | 59 | /* 60 | ********************************************************************************************************* 61 | * MODULE END 62 | * 63 | * Note(s) : (1) See 'net_dev_cfg.h MODULE'. 64 | ********************************************************************************************************* 65 | */ 66 | 67 | #endif /* End of net dev cfg module include. */ 68 | 69 | -------------------------------------------------------------------------------- /Dev/Ether/RZ-Ether/net_dev_rz_ether.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * Renesas RZ-Ether 23 | * 24 | * Filename : net_dev_rz_ether.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_RZ_ETHER_MODULE_PRESENT 36 | #define NET_DEV_RZ_ETHER_MODULE_PRESENT 37 | 38 | 39 | /* 40 | ********************************************************************************************************* 41 | * INCLUDE FILES 42 | ********************************************************************************************************* 43 | */ 44 | 45 | #include 46 | #include 47 | #include 48 | 49 | 50 | #ifdef NET_IF_ETHER_MODULE_EN 51 | 52 | /* 53 | ********************************************************************************************************* 54 | * GLOBAL VARIABLES 55 | ********************************************************************************************************* 56 | */ 57 | 58 | extern const NET_DEV_API_ETHER NetDev_API_RZ_Ether; 59 | 60 | 61 | /* 62 | ********************************************************************************************************* 63 | * CONFIGURATION ERRORS 64 | ********************************************************************************************************* 65 | */ 66 | 67 | 68 | /* 69 | ********************************************************************************************************* 70 | * MODULE END 71 | ********************************************************************************************************* 72 | */ 73 | 74 | #endif /* NET_IF_ETHER_MODULE_EN */ 75 | #endif /* NET_DEV_RZ_ETHER_MODULE_PRESENT */ 76 | 77 | -------------------------------------------------------------------------------- /Dev/Ether/RZT1-Ether/net_dev_rzt1_ether.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * Renesas RZ-Ether 23 | * 24 | * Filename : net_dev_rzt1_ether.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_RZ_ETHER_MODULE_PRESENT 36 | #define NET_DEV_RZ_ETHER_MODULE_PRESENT 37 | 38 | 39 | /* 40 | ********************************************************************************************************* 41 | * INCLUDE FILES 42 | ********************************************************************************************************* 43 | */ 44 | 45 | #include 46 | #include 47 | #include 48 | 49 | 50 | #ifdef NET_IF_ETHER_MODULE_EN 51 | 52 | /* 53 | ********************************************************************************************************* 54 | * GLOBAL VARIABLES 55 | ********************************************************************************************************* 56 | */ 57 | 58 | extern const NET_DEV_API_ETHER NetDev_API_RZT1_EtherC; 59 | 60 | 61 | /* 62 | ********************************************************************************************************* 63 | * CONFIGURATION ERRORS 64 | ********************************************************************************************************* 65 | */ 66 | 67 | 68 | /* 69 | ********************************************************************************************************* 70 | * MODULE END 71 | ********************************************************************************************************* 72 | */ 73 | 74 | #endif /* NET_IF_ETHER_MODULE_EN */ 75 | #endif /* NET_DEV_RZ_ETHER_MODULE_PRESENT */ 76 | 77 | -------------------------------------------------------------------------------- /Dev/Ether/SH-EtherC/OS/uCOS-II/net_dev_sh_etherc_isr.src: -------------------------------------------------------------------------------- 1 | ;******************************************************************************************************** 2 | ; uC/TCP-IP 3 | ; The Embedded TCP/IP Suite 4 | ; 5 | ; Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 6 | ; 7 | ; SPDX-License-Identifier: APACHE-2.0 8 | ; 9 | ; This software is subject to an open source license and is distributed by 10 | ; Silicon Laboratories Inc. pursuant to the terms of the Apache License, 11 | ; Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 12 | ; 13 | ;******************************************************************************************************** 14 | 15 | ;******************************************************************************************************** 16 | ; 17 | ; NETWORK DEVICE DRIVER 18 | ; 19 | ; Renesas SH-Ether 20 | ; 21 | ; Filename : net_dev_sh_etherc_isr.src 22 | ; Version : V3.06.01 23 | ;********************************************************************************************************* 24 | ; Note(s) : (1) Assumes uC/TCP-IP V2.02 (or more recent version) is included in the project build. 25 | ;******************************************************************************************************** 26 | 27 | .EXPORT _NetDev_ISR 28 | .IMPORT _OSTCBCur 29 | .IMPORT _OSIntExit 30 | .IMPORT _OSIntNesting 31 | .IMPORT _NetBSP_ENET_ISR_Handler 32 | 33 | _NetDev_ISR: 34 | mov.l r0, @-r15 ; disable interrupts 35 | stc sr, r0 36 | or #240,r0 37 | ldc r0, sr 38 | mov.l @r15+, r0 39 | ; Save processor registers on the stack 40 | 41 | sts.l macl, @-r15 42 | sts.l mach, @-r15 43 | stc.l gbr, @-r15 44 | movml.l r15, @-r15 ; push registers PR, R14, R13 ... R0 45 | sts.l fpul, @-r15 46 | sts.l fpscr, @-r15 47 | fmov.s fr15 ,@-r15 48 | fmov.s fr14 ,@-r15 49 | fmov.s fr13 ,@-r15 50 | fmov.s fr12 ,@-r15 51 | fmov.s fr11 ,@-r15 52 | fmov.s fr10 ,@-r15 53 | fmov.s fr9 ,@-r15 54 | fmov.s fr8 ,@-r15 55 | fmov.s fr7 ,@-r15 56 | fmov.s fr6 ,@-r15 57 | fmov.s fr5 ,@-r15 58 | fmov.s fr4 ,@-r15 59 | fmov.s fr3 ,@-r15 60 | fmov.s fr2 ,@-r15 61 | fmov.s fr1 ,@-r15 62 | fmov.s fr0 ,@-r15 63 | 64 | ; clear compare match interupt 65 | 66 | mov.l #_OSIntNesting, r1 ; Increment OSIntNesting 67 | mov.b @r1, r0 68 | extu.b r0, r0 69 | add #1, r0 70 | mov.b r0, @r1 ; If OSIntNesting == 1 save the current stack pointer 71 | tst #1, r0 ; onto the current task's stack 72 | bt _NetDev_ISR1 73 | 74 | mov.l #_OSTCBCur, r1 ; Save current task's SP into its TCB 75 | mov.l @r1, r0 76 | mov r15, @r0 77 | 78 | _NetDev_ISR1: 79 | ; clear timer interrupt source 80 | mov.l #_NetBSP_ENET_ISR_Handler, r3 81 | jsr @r3 82 | nop 83 | 84 | mov.l #_OSIntExit, r0 85 | jsr @r0 ; call OSIntExit() 86 | nop 87 | 88 | ; restore all processor registers from stack 89 | 90 | fmov.s @r15+, fr0 91 | fmov.s @r15+, fr1 92 | fmov.s @r15+, fr2 93 | fmov.s @r15+, fr3 94 | fmov.s @r15+, fr4 95 | fmov.s @r15+, fr5 96 | fmov.s @r15+, fr6 97 | fmov.s @r15+, fr7 98 | fmov.s @r15+, fr8 99 | fmov.s @r15+, fr9 100 | fmov.s @r15+, fr10 101 | fmov.s @r15+, fr11 102 | fmov.s @r15+, fr12 103 | fmov.s @r15+, fr13 104 | fmov.s @r15+, fr14 105 | fmov.s @r15+, fr15 106 | lds.l @r15+, fpscr 107 | lds.l @r15+, fpul 108 | movml.l @r15+, r15 ; restores PR, R0, R1 ... R14 109 | ldc.l @r15+, gbr 110 | lds.l @r15+, mach 111 | lds.l @r15+, macl 112 | 113 | rte 114 | nop 115 | 116 | .END 117 | 118 | -------------------------------------------------------------------------------- /Dev/Ether/SH-EtherC/OS/uCOS-III/net_dev_sh_etherc_isr.src: -------------------------------------------------------------------------------- 1 | ;******************************************************************************************************** 2 | ; uC/TCP-IP 3 | ; The Embedded TCP/IP Suite 4 | ; 5 | ; Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 6 | ; 7 | ; SPDX-License-Identifier: APACHE-2.0 8 | ; 9 | ; This software is subject to an open source license and is distributed by 10 | ; Silicon Laboratories Inc. pursuant to the terms of the Apache License, 11 | ; Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 12 | ; 13 | ;******************************************************************************************************** 14 | 15 | ;******************************************************************************************************** 16 | ; 17 | ; NETWORK DEVICE DRIVER 18 | ; 19 | ; Renesas SH-EtherC 20 | ; 21 | ; Filename : net_dev_sh_etherc_isr.src 22 | ; Version : V3.06.01 23 | ;********************************************************************************************************* 24 | ;* Note(s) : (1) Assumes uC/TCP-IP V2.05 (or more recent version) is included in the project build. 25 | ;******************************************************************************************************** 26 | 27 | .INCLUDE "os_cpu_a.inc" ; Include OS_CTX_SAVE and OS_CTX_RESTORE macros 28 | 29 | .EXPORT _NetDev_ISR 30 | .IMPORT _OSTCBCurPtr 31 | .IMPORT _OSIntExit 32 | .IMPORT _OSIntNestingCtr 33 | .IMPORT _NetBSP_ISR_HandlerSH7216_0 34 | 35 | _NetDev_ISR: 36 | 37 | OS_CTX_SAVE ; save processor registers on the stack 38 | 39 | mov.l #_OSIntNestingCtr, r1 ; Set OSIntNestingCtr == 1 (interrupt nesting not supported) 40 | mov.l #1, r2 41 | mov.b r2, @r1 42 | 43 | mov.l #_OSTCBCurPtr, r1 ; Save current task's SP into its TCB 44 | mov.l @r1, r0 45 | mov r15, @r0 46 | ; clear timer interrupt source 47 | mov.l #_NetBSP_ISR_HandlerSH7216_0, r3 48 | jsr @r3 49 | nop 50 | 51 | mov.l #_OSIntExit, r0 52 | jsr @r0 ; call OSIntExit() 53 | nop 54 | 55 | OS_CTX_RESTORE ; restore all processor registers from stack 56 | 57 | rte 58 | nop 59 | 60 | .END 61 | 62 | -------------------------------------------------------------------------------- /Dev/Ether/SH-EtherC/OS/uCOS-III/net_dev_sh_etherc_isr_banked.src: -------------------------------------------------------------------------------- 1 | ;******************************************************************************************************** 2 | ; uC/TCP-IP 3 | ; The Embedded TCP/IP Suite 4 | ; 5 | ; Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 6 | ; 7 | ; SPDX-License-Identifier: APACHE-2.0 8 | ; 9 | ; This software is subject to an open source license and is distributed by 10 | ; Silicon Laboratories Inc. pursuant to the terms of the Apache License, 11 | ; Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 12 | ; 13 | ;******************************************************************************************************** 14 | 15 | ;******************************************************************************************************** 16 | ; 17 | ; NETWORK DEVICE DRIVER 18 | ; 19 | ; Renesas SH-EtherC 20 | ; 21 | ; Filename : net_dev_sh_etherc_isr_banked.src 22 | ; Version : V3.06.01 23 | ;********************************************************************************************************* 24 | ; Note(s) : (1) Assumes uC/TCP-IP V2.05 (or more recent version) is included in the project build. 25 | ;******************************************************************************************************** 26 | 27 | .INCLUDE "os_cpu_a.inc" ; Include OS_CTX_SAVE and OS_CTX_RESTORE macros 28 | 29 | .EXPORT _NetDev_ISR 30 | .IMPORT _OSTCBCurPtr 31 | .IMPORT _OSIntExit 32 | .IMPORT _OSIntNestingCtr 33 | .IMPORT _NetBSP_ENET_ISR_Handler 34 | 35 | _NetDev_ISR: 36 | 37 | OS_CTX_SAVE_ISR ; Save register on the stack 38 | 39 | mov.l #_OSIntNestingCtr, r1 ; Set OSIntNestingCtr = IBNR.BN 40 | MOVI20 #H'E080E, R3 41 | MOV.W @R3, R2 42 | MOV.B R2, @R1 43 | 44 | mov.l #_NetBSP_ENET_ISR_Handler, r0 45 | jsr @r0 46 | nop 47 | 48 | mov.l #_OSIntExit, r0 49 | jsr @r0 ; call OSIntExit() 50 | nop 51 | 52 | OS_CTX_RESTORE_ISR ; Restore registers from stack 53 | RESBANK 54 | 55 | rte ; return from interrupt 56 | nop 57 | 58 | .END 59 | -------------------------------------------------------------------------------- /Dev/Ether/SH-EtherC/SH7216/net_dev_sh_etherc_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * Renesas SH 7216 23 | * 24 | * Filename : net_dev_sh_etherc_cfg.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * DEFINES 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #define NET_DEV_SH_ETHERC_RAM_AREA 0xFFF80000 36 | #define NET_DEV_SH_ETHERC_RAM_SIZE 0x2CD0 37 | 38 | -------------------------------------------------------------------------------- /Dev/Ether/SH-EtherC/SH7670/net_dev_sh_etherc_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * Renesas SH 7670 23 | * 24 | * Filename : net_dev_sh_etherc_cfg.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * DEFINES 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #define NET_DEV_SH_ETHER_RAM_AREA 0xFFF80000 36 | #define NET_DEV_SH_ETHER_RAM_SIZE 0x7780 37 | 38 | -------------------------------------------------------------------------------- /Dev/Ether/SH-EtherC/SH7670/net_dev_sh_etherc_reg.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * Renesas SH 7670 23 | * 24 | * Filename : net_dev_sh_etherc_reg.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * INCLUDE FILES 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #include 36 | 37 | 38 | /* 39 | ********************************************************************************************************* 40 | * REGISTER DEFINITIONS 41 | * 42 | * Note(s) : (1) The device register definition structure MUST take into account appropriate 43 | * register offsets and apply reserved space as required. The registers listed 44 | * within the register definition structure MUST reflect the exact ordering and 45 | * data sizes illustrated in the device user guide. An example device register 46 | * structure is provided below. 47 | * 48 | * (2) The device register definition structure is mapped over the corresponding base 49 | * address provided within the device configuration structure. The device 50 | * configuration structure is provided by the application developer within 51 | * net_dev_cfg.c. Refer to the Network Protocol Suite User Manual for more 52 | * information related to declaring device configuration structures. 53 | ********************************************************************************************************* 54 | */ 55 | 56 | typedef struct net_dev { 57 | CPU_REG32 EDMAC_EDMR; 58 | CPU_REG32 EDMAC_EDTRR; 59 | CPU_REG32 EDMAC_EDRRR; 60 | CPU_REG32 EDMAC_TDLAR; 61 | CPU_REG32 EDMAC_RDLAR; 62 | CPU_REG32 EDMAC_EESR; 63 | CPU_REG32 EDMAC_EESIPR; 64 | CPU_REG32 EDMAC_TRSCER; 65 | CPU_REG32 EDMAC_RMFCR; 66 | CPU_REG32 EDMAC_TFTR; 67 | CPU_REG32 EDMAC_FDR; 68 | CPU_REG32 EDMAC_RMCR; 69 | CPU_REG32 EDMAC_EDOCR; 70 | CPU_REG32 EDMAC_FCFTR; 71 | CPU_REG32 EDMAC_RPADIR; 72 | CPU_REG32 EDMAC_TRIMD; 73 | CPU_REG32 EDMAC_RBWAR; 74 | CPU_REG32 EDMAC_RDFAR; 75 | CPU_REG32 RESERVED0[0x01]; 76 | CPU_REG32 EDMAC_TBRAR; 77 | CPU_REG32 EDMAC_TDFAR; 78 | CPU_REG32 RESERVED1[0x24]; 79 | CPU_REG32 EDMAC_CSMR; 80 | CPU_REG32 EDMAC_CSSBM; 81 | CPU_REG32 RESERVED2[0x1D]; 82 | CPU_REG32 ETHERC_ECMR; 83 | CPU_REG32 ETHERC_ECSR; 84 | CPU_REG32 ETHERC_ECSIPR; 85 | CPU_REG32 ETHERC_PIR; 86 | CPU_REG32 ETHERC_MAHR; 87 | CPU_REG32 ETHERC_MALR; 88 | CPU_REG32 ETHERC_RFLR; 89 | CPU_REG32 ETHERC_PSR; 90 | CPU_REG32 ETHERC_TROCR; 91 | CPU_REG32 ETHERC_CDCR; 92 | CPU_REG32 ETHERC_LCCR; 93 | CPU_REG32 ETHERC_CNDCR; 94 | CPU_REG32 RESERVED3[0x01]; 95 | CPU_REG32 ETHERC_CEFCR; 96 | CPU_REG32 ETHERC_FRECR; 97 | CPU_REG32 ETHERC_TSFRCR; 98 | CPU_REG32 ETHERC_TLFRCR; 99 | CPU_REG32 ETHERC_RFCR; 100 | CPU_REG32 ETHERC_MAFCR; 101 | CPU_REG32 RESERVED4[0x02]; 102 | CPU_REG32 ETHERC_IGPR; 103 | CPU_REG32 ETHERC_APR; 104 | CPU_REG32 ETHERC_MPR; 105 | CPU_REG32 RESERVED5[0x01]; 106 | CPU_REG32 ETHERC_TPAUSER; 107 | } NET_DEV; 108 | 109 | -------------------------------------------------------------------------------- /Dev/Ether/SH-EtherC/net_dev_sh_etherc.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * Renesas SH-Ether 23 | * 24 | * Filename : net_dev_sh_etherc.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_SH_ETHERC_MODULE_PRESENT 36 | #define NET_DEV_SH_ETHERC_MODULE_PRESENT 37 | 38 | 39 | /* 40 | ********************************************************************************************************* 41 | * INCLUDE FILES 42 | ********************************************************************************************************* 43 | */ 44 | 45 | #include 46 | #include 47 | #include 48 | 49 | #ifdef NET_IF_ETHER_MODULE_EN 50 | 51 | /* 52 | ********************************************************************************************************* 53 | * DEVICE DRIVER ERROR CODES 54 | * 55 | * Note(s) : (1) ALL device-independent error codes #define'd in 'net_err.h'; 56 | * ALL device-specific error codes #define'd in this 'net_dev_&&&.h'. 57 | * 58 | * (2) Network error code '11,000' series reserved for network device drivers. 59 | * See 'net_err.h NETWORK DEVICE ERROR CODES' to ensure that device-specific 60 | * error codes do NOT conflict with device-independent error codes. 61 | ********************************************************************************************************* 62 | */ 63 | 64 | 65 | /* 66 | ********************************************************************************************************* 67 | * GLOBAL VARIABLES 68 | ********************************************************************************************************* 69 | */ 70 | 71 | extern const NET_DEV_API_ETHER NetDev_API_SH_EtherC; 72 | 73 | 74 | /* 75 | ********************************************************************************************************* 76 | * CONFIGURATION ERRORS 77 | ********************************************************************************************************* 78 | */ 79 | 80 | 81 | /* 82 | ********************************************************************************************************* 83 | * MODULE END 84 | ********************************************************************************************************* 85 | */ 86 | 87 | #endif /* NET_IF_ETHER_MODULE_EN */ 88 | #endif /* NET_DEV_SH_ETHERC_MODULE_PRESENT */ 89 | 90 | -------------------------------------------------------------------------------- /Dev/Ether/STR912/net_dev_str912.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * STR912 23 | * 24 | * Filename : net_dev_str912.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_STR912_MODULE_PRESENT 36 | #define NET_DEV_STR912_MODULE_PRESENT 37 | 38 | #include 39 | 40 | #ifdef NET_IF_ETHER_MODULE_EN 41 | 42 | 43 | /* 44 | ********************************************************************************************************* 45 | * GLOBAL VARIABLES 46 | ********************************************************************************************************* 47 | */ 48 | 49 | extern const NET_DEV_API_ETHER NetDev_API_STR912; 50 | 51 | 52 | /* 53 | ********************************************************************************************************* 54 | * MODULE END 55 | ********************************************************************************************************* 56 | */ 57 | 58 | #endif /* NET_IF_ETHER_MODULE_EN */ 59 | #endif /* NET_DEV_STR912_MODULE_PRESENT */ 60 | 61 | -------------------------------------------------------------------------------- /Dev/Ether/TI_EMAC/net_dev_ti_emac.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * TEXAS INSTRUMENTS 23 | * ETHERNET MEDIA ACCESS CONTROLLER (EMAC) 24 | * 25 | * Filename : net_dev_ti_emac.h 26 | * Version : V3.06.01 27 | ********************************************************************************************************* 28 | */ 29 | 30 | /* 31 | ********************************************************************************************************* 32 | * MODULE 33 | ********************************************************************************************************* 34 | */ 35 | 36 | #ifndef NET_DEV_TI_EMAC_MODULE_PRESENT 37 | #define NET_DEV_TI_EMAC_MODULE_PRESENT 38 | 39 | #include 40 | 41 | #ifdef NET_IF_ETHER_MODULE_EN 42 | 43 | 44 | /* 45 | ********************************************************************************************************* 46 | * GLOBAL VARIABLES 47 | * Note(s) : (1) The following MCUs are support by NetDev_API_TI_EMAC API: 48 | * 49 | * TEXAS INSTRUMENTS RMxx series 50 | * TEXAS INSTRUMENTS TMS570LSxx series 51 | * 52 | * (2) The following MCUs are support by NetDev_API_AM35xx_EMAC API: 53 | * 54 | * TEXAS INSTRUMENTS AM35xx series 55 | * 56 | * (3) The following MCUs are support by NetDev_API_OMAP_L1x_EMAC API: 57 | * 58 | * TEXAS INSTRUMENTS OMAP-L1x series 59 | * 60 | * (4) The following MCUs are support by NetDev_API_TMS570LCxx_EMAC API: 61 | * 62 | * TEXAS INSTRUMENTS TMS570LCxx series 63 | * 64 | ********************************************************************************************************* 65 | */ 66 | 67 | extern const NET_DEV_API_ETHER NetDev_API_TI_EMAC; 68 | extern const NET_DEV_API_ETHER NetDev_API_AM35xx_EMAC; 69 | extern const NET_DEV_API_ETHER NetDev_API_OMAP_L1x_EMAC; 70 | extern const NET_DEV_API_ETHER NetDev_API_TMS570LCxx_EMAC; 71 | 72 | 73 | /* 74 | ********************************************************************************************************* 75 | * MODULE END 76 | ********************************************************************************************************* 77 | */ 78 | 79 | #endif /* NET_IF_ETHER_MODULE_EN */ 80 | #endif /* NET_DEV_TI_EMAC_MODULE_PRESENT */ 81 | -------------------------------------------------------------------------------- /Dev/Ether/TSE/ARM/net_dev_tse_arm.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * Altera Triple Speed Ethernet 23 | * 24 | * Filename : net_dev_tse.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_TSE_MODULE_PRESENT 36 | #define NET_DEV_TSE_MODULE_PRESENT 37 | 38 | #include 39 | 40 | #ifdef NET_IF_ETHER_MODULE_EN 41 | 42 | 43 | /* 44 | ********************************************************************************************************* 45 | * GLOBAL VARIABLES 46 | ********************************************************************************************************* 47 | */ 48 | 49 | extern const NET_DEV_API_ETHER NetDev_API_ALTERA_TSE; 50 | 51 | /* 52 | ********************************************************************************************************* 53 | * MODULE END 54 | ********************************************************************************************************* 55 | */ 56 | 57 | #endif /* NET_IF_ETHER_MODULE_EN */ 58 | #endif /* NET_DEV_TSE_MODULE_PRESENT */ 59 | 60 | -------------------------------------------------------------------------------- /Dev/Ether/TSE/Cfg/Template/net_dev_tse_addr_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE ADDRESS CONIFGURATION 21 | * 22 | * Altera Triple Speed Ethernet 23 | * 24 | * Filename : net_dev_tse_addr_cfg.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_TSE_ADDR_CFG_MODULE_PRESENT 36 | #define NET_DEV_TSE_ADDR_CFG_MODULE_PRESENT 37 | 38 | #include /* You may have to modify the include accordingly ... */ 39 | /* ... with you project and your ipcore generator. */ 40 | 41 | 42 | /* 43 | ********************************************************************************************************* 44 | * GLOBAL DEFINES 45 | ********************************************************************************************************* 46 | */ 47 | 48 | /* You may have to modify these #define accordingly ... */ 49 | /* ... with the header file included. */ 50 | 51 | #define BSP_SGDMA_RX_BASEADDR SGDMA_RX_BASE /* Specify the Rx SGDMA base address. */ 52 | #define BSP_SGDMA_TX_BASEADDR SGDMA_TX_BASE /* Specify the Tx SGDMA base address. */ 53 | #define BSP_SGDMA_RX_NAME SGDMA_RX_NAME /* Specify the Rx SGDMA HAL device name. */ 54 | #define BSP_SGDMA_TX_NAME SGDMA_TX_NAME /* Specify the Tx SGDMA HAL device name. */ 55 | 56 | /* Specifiy the TSE Tx FIFO depth */ 57 | #define BSP_TSE_MAX_TRANSMIT_FIFO_DEPTH TSE_MAC_TRANSMIT_FIFO_DEPTH 58 | /* Specifiy the TSE Rx FIFO depth */ 59 | #define BSP_TSE_MAX_RECEIVE_FIFO_DEPTH TSE_MAC_RECEIVE_FIFO_DEPTH 60 | 61 | 62 | /* 63 | ********************************************************************************************************* 64 | * MODULE END 65 | ********************************************************************************************************* 66 | */ 67 | 68 | #endif /* End of Ether DMA template module include. */ 69 | 70 | -------------------------------------------------------------------------------- /Dev/Ether/TSE/NiosII/net_dev_tse_nios.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * Altera Triple Speed Ethernet 23 | * 24 | * Filename : net_dev_tse_nios.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | * Note(s) : (1) Assumes uC/TCP-IP V2.20.00 (or more recent version) is included in the project build. 28 | ********************************************************************************************************* 29 | */ 30 | 31 | 32 | /* 33 | ********************************************************************************************************* 34 | * MODULE 35 | ********************************************************************************************************* 36 | */ 37 | 38 | #ifndef NET_DEV_TSE_MODULE_PRESENT 39 | #define NET_DEV_TSE_MODULE_PRESENT 40 | 41 | #include 42 | 43 | #ifdef NET_IF_ETHER_MODULE_EN 44 | 45 | 46 | /* 47 | ********************************************************************************************************* 48 | * GLOBAL VARIABLES 49 | ********************************************************************************************************* 50 | */ 51 | 52 | extern const NET_DEV_API_ETHER NetDev_API_ALTERA_TSE_Nios_II; 53 | 54 | /* 55 | ********************************************************************************************************* 56 | * MODULE END 57 | ********************************************************************************************************* 58 | */ 59 | 60 | #endif /* NET_IF_ETHER_MODULE_EN */ 61 | #endif /* NET_DEV_TSE_MODULE_PRESENT */ 62 | -------------------------------------------------------------------------------- /Dev/Ether/Template/net_dev_ether_template_dma.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * ETHERNET DMA TEMPLATE 23 | * 24 | * Filename : net_dev_ether_template_dma.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | ********************************************************************************************************* 32 | * MODULE 33 | ********************************************************************************************************* 34 | ********************************************************************************************************* 35 | */ 36 | 37 | #ifndef NET_DEV_TEMPLATE_ETHER_DMA_MODULE_PRESENT 38 | #define NET_DEV_TEMPLATE_ETHER_DMA_MODULE_PRESENT 39 | 40 | #include 41 | #ifdef NET_IF_ETHER_MODULE_EN 42 | 43 | /* 44 | ********************************************************************************************************* 45 | ********************************************************************************************************* 46 | * GLOBAL VARIABLES 47 | ********************************************************************************************************* 48 | ********************************************************************************************************* 49 | */ 50 | 51 | extern const NET_DEV_API_ETHER NetDev_API_TemplateEtherDMA; 52 | 53 | 54 | /* 55 | ********************************************************************************************************* 56 | ********************************************************************************************************* 57 | * CONFIGURATION ERRORS 58 | ********************************************************************************************************* 59 | ********************************************************************************************************* 60 | */ 61 | 62 | 63 | /* 64 | ********************************************************************************************************* 65 | ********************************************************************************************************* 66 | * MODULE END 67 | ********************************************************************************************************* 68 | ********************************************************************************************************* 69 | */ 70 | #endif /* NET_IF_ETHER_MODULE_EN */ 71 | #endif /* NET_DEV_TEMPLATE_ETHER_DMA_MODULE_PRESENT */ 72 | 73 | -------------------------------------------------------------------------------- /Dev/Ether/Template/net_dev_ether_template_pio.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * ETHERNET PARALLEL I/O TEMPLATE 23 | * 24 | * Filename : net_dev_ether_template_pio.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | ********************************************************************************************************* 32 | * MODULE 33 | ********************************************************************************************************* 34 | ********************************************************************************************************* 35 | */ 36 | 37 | #ifndef NET_DEV_TEMPLATE_ETHER_PIO_MODULE_PRESENT 38 | #define NET_DEV_TEMPLATE_ETHER_PIO_MODULE_PRESENT 39 | 40 | #include 41 | #ifdef NET_IF_ETHER_MODULE_EN 42 | 43 | /* 44 | ********************************************************************************************************* 45 | ********************************************************************************************************* 46 | * GLOBAL VARIABLES 47 | ********************************************************************************************************* 48 | ********************************************************************************************************* 49 | */ 50 | 51 | extern const NET_DEV_API_ETHER NetDev_API_TemplateEtherPIO; 52 | 53 | 54 | /* 55 | ********************************************************************************************************* 56 | ********************************************************************************************************* 57 | * CONFIGURATION ERRORS 58 | ********************************************************************************************************* 59 | ********************************************************************************************************* 60 | */ 61 | 62 | 63 | /* 64 | ********************************************************************************************************* 65 | ********************************************************************************************************* 66 | * MODULE END 67 | ********************************************************************************************************* 68 | ********************************************************************************************************* 69 | */ 70 | 71 | #endif /* NET_IF_ETHER_MODULE_EN */ 72 | #endif /* NET_DEV_TEMPLATE_ETHER_PIO_MODULE_PRESENT */ 73 | 74 | -------------------------------------------------------------------------------- /Dev/Ether/USBD_CDCEEM/Cfg/net_dev_usbd_cdceem_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE CONFIGURATION FILE 21 | * 22 | * uC/USB-Device 23 | * Communication Device Class (CDC) 24 | * Ethernet Emulation Model (EEM) subclass 25 | * 26 | * Filename : net_dev_usbd_cdceem_cfg.h 27 | * Version : V3.06.01 28 | ********************************************************************************************************* 29 | */ 30 | 31 | /* 32 | ********************************************************************************************************* 33 | * INCLUDE FILES 34 | ********************************************************************************************************* 35 | */ 36 | 37 | #include 38 | 39 | 40 | /* 41 | ********************************************************************************************************* 42 | * MODULE 43 | * 44 | * Note(s) : (1) This network device configuration header file is protected from multiple pre-processor 45 | * inclusion through use of the network module present pre-processor macro definition. 46 | ********************************************************************************************************* 47 | */ 48 | 49 | #ifndef NET_DEV_USBD_CDCEEM_CFG_MODULE_PRESENT /* See Note #1. */ 50 | #define NET_DEV_USBD_CDCEEM_CFG_MODULE_PRESENT 51 | 52 | 53 | /* 54 | ********************************************************************************************************* 55 | * NETWORK DEVICE CONFIGURATION 56 | * 57 | * Note(s) : (1) Configurations are done for board/application setup and it must be updated according to 58 | * application/projects requirements. 59 | ********************************************************************************************************* 60 | */ 61 | 62 | /* Declare each specific devices' configuration (see Note #1) : */ 63 | extern NET_DEV_CFG_USBD_CDC_EEM NetDev_Cfg_Ether_USBD_CDCEEM; /* Example Ethernet cfg for USB Device CDC EEM class. */ 64 | 65 | 66 | /* 67 | ********************************************************************************************************* 68 | * MODULE END 69 | * 70 | * Note(s) : (1) See 'net_dev_cfg.h MODULE'. 71 | ********************************************************************************************************* 72 | */ 73 | 74 | #endif /* End of net dev cfg module include. */ 75 | 76 | -------------------------------------------------------------------------------- /Dev/Ether/WinPcap/ReadMe.txt: -------------------------------------------------------------------------------- 1 | The "Lib" and "Include" folders need to be populated with the WinPcap library which can be found at winpcap.org. -------------------------------------------------------------------------------- /Dev/Ether/WinPcap/net_dev_winpcap.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * WinPcap 23 | * 24 | * Filename : net_dev_winpcap.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_WINPCAP_MODULE_PRESENT 36 | #define NET_DEV_WINPCAP_MODULE_PRESENT 37 | 38 | #include 39 | 40 | #ifdef NET_IF_ETHER_MODULE_EN 41 | 42 | /* 43 | ********************************************************************************************************* 44 | * INCLUDE FILES 45 | ********************************************************************************************************* 46 | */ 47 | 48 | 49 | #include 50 | 51 | 52 | /* 53 | ********************************************************************************************************* 54 | * DEVICE DRIVER ERROR CODES 55 | * 56 | * Note(s) : (1) ALL device-independent error codes #define'd in 'net_err.h'; 57 | * ALL device-specific error codes #define'd in this 'net_dev_&&&.h'. 58 | * 59 | * (2) Network error code '11,000' series reserved for network device drivers. 60 | * See 'net_err.h NETWORK DEVICE ERROR CODES' to ensure that device-specific 61 | * error codes do NOT conflict with device-independent error codes. 62 | ********************************************************************************************************* 63 | */ 64 | 65 | 66 | /* 67 | ********************************************************************************************************* 68 | * GLOBAL VARIABLES 69 | ********************************************************************************************************* 70 | */ 71 | 72 | extern NET_DEV_CFG_ETHER NetDev_Cfg_WinPcap_Dflt; 73 | 74 | extern const NET_DEV_API_ETHER NetDev_API_WinPcap; 75 | 76 | 77 | /* 78 | ********************************************************************************************************* 79 | * FUNCTION PROTOTYPES 80 | ********************************************************************************************************* 81 | */ 82 | 83 | 84 | /* 85 | ********************************************************************************************************* 86 | * CONFIGURATION ERRORS 87 | ********************************************************************************************************* 88 | */ 89 | 90 | 91 | /* 92 | ********************************************************************************************************* 93 | * MODULE END 94 | ********************************************************************************************************* 95 | */ 96 | 97 | #endif /* NET_IF_ETHER_MODULE_EN */ 98 | #endif /* NET_DEV_WINPCAP_MODULE_PRESENT */ 99 | -------------------------------------------------------------------------------- /Dev/Ether/WinPcap/net_dev_winpcap_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE CONFIGURATION FILE 21 | * 22 | * TEMPLATE 23 | * 24 | * Filename : net_dev_winpcap_cfg.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | #include 30 | 31 | 32 | /* 33 | ********************************************************************************************************* 34 | * MODULE 35 | * 36 | * Note(s) : (1) This network device configuration header file is protected from multiple pre-processor 37 | * inclusion through use of the network module present pre-processor macro definition. 38 | ********************************************************************************************************* 39 | */ 40 | 41 | #ifndef NET_DEV_CFG_MODULE_PRESENT /* See Note #1. */ 42 | #define NET_DEV_CFG_MODULE_PRESENT 43 | 44 | 45 | /* 46 | ********************************************************************************************************* 47 | * NETWORK DEVICE CONFIGURATION 48 | * 49 | * Note(s) : (1) (a) Each network device maps to a unique, developer-configured device configuration that 50 | * MUST be defined in application files, typically 'net_dev_cfg.c', & SHOULD be forward- 51 | * declared with the exact same name & type in order to be used by the application during 52 | * calls to NetIF_Add(). 53 | * 54 | * (b) Since these device configuration structures are referenced ONLY by application files, 55 | * there is NO required naming convention for these configuration structures. However, 56 | * the following naming convention is suggested for all developer-configured network 57 | * device configuration structures : 58 | * 59 | * NetDev_Cfg_[_Number] 60 | * 61 | * where 62 | * Name of device or device driver 63 | * [Number] Network device number for each specific instance of 64 | * device (optional if the development board does NOT 65 | * support multiple instances of the specific device) 66 | * 67 | * Examples : 68 | * 69 | * NET_DEV_CFG_ETHER NetDev_Cfg_MACB; Ethernet configuration for MACB 70 | * 71 | * NET_DEV_CFG_ETHER NetDev_Cfg_FEC_0; Ethernet configuration for FEC #0 72 | * NET_DEV_CFG_ETHER NetDev_Cfg_FEC_1; Ethernet configuration for FEC #1 73 | * 74 | * NET_DEV_CFG_WIFI NetDev_Cfg_RS9110N21_0; Wireless configuration for RS9110-N-21 75 | * 76 | * NET_DEV_CFG_PPP NetDev_Cfg_UART_2; PPP configuration for UART #2 77 | ********************************************************************************************************* 78 | */ 79 | 80 | /* Declare each specific devices' configuration (see Note #1) : */ 81 | #ifdef NET_IF_ETHER_MODULE_EN 82 | 83 | extern NET_DEV_CFG_ETHER NetDev_Cfg_WinPcap_Dflt; /* Example Ethernet configuration for device A, #1 */ 84 | 85 | #endif 86 | 87 | 88 | /* 89 | ********************************************************************************************************* 90 | * MODULE END 91 | * 92 | * Note(s) : (1) See 'net_dev_cfg.h MODULE'. 93 | ********************************************************************************************************* 94 | */ 95 | 96 | #endif /* End of net dev cfg module include. */ 97 | 98 | -------------------------------------------------------------------------------- /Dev/Ether/XIL_ETHER_LITE/net_dev_xil_ether_lite.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * XILINX AXI ETHERNET LITE 23 | * 24 | * Filename : net_dev_xil_ether_lite.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | ********************************************************************************************************* 32 | * MODULE 33 | ********************************************************************************************************* 34 | ********************************************************************************************************* 35 | */ 36 | 37 | #ifndef NET_DEV_XIL_ETHER_LITE_MODULE_PRESENT 38 | #define NET_DEV_XIL_ETHER_LITE_MODULE_PRESENT 39 | 40 | #include 41 | #ifdef NET_IF_ETHER_MODULE_EN 42 | 43 | /* 44 | ********************************************************************************************************* 45 | ********************************************************************************************************* 46 | * GLOBAL VARIABLES 47 | ********************************************************************************************************* 48 | ********************************************************************************************************* 49 | */ 50 | 51 | extern const NET_DEV_API_ETHER NetDev_API_XIL_ETHER_LITE; 52 | 53 | 54 | /* 55 | ********************************************************************************************************* 56 | ********************************************************************************************************* 57 | * CONFIGURATION ERRORS 58 | ********************************************************************************************************* 59 | ********************************************************************************************************* 60 | */ 61 | 62 | 63 | /* 64 | ********************************************************************************************************* 65 | ********************************************************************************************************* 66 | * MODULE END 67 | ********************************************************************************************************* 68 | ********************************************************************************************************* 69 | */ 70 | 71 | #endif /* NET_IF_ETHER_MODULE_EN */ 72 | #endif /* NET_DEV_XIL_ETHER_LITE_MODULE_PRESENT */ 73 | 74 | -------------------------------------------------------------------------------- /Dev/WiFi/GS2xxx/net_dev_gs2000.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * GS2xxx 23 | * 24 | * Filename : net_dev_gs2000.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | * Note(s) : (1) Assumes uC/TCP-IP V3.02.00 (or more recent version) is included in the project build. 28 | * 29 | * (2) Device driver compatible with these hardware: 30 | * 31 | * (a) GS2011MIE 32 | * (b) GS2011MIZ 33 | ********************************************************************************************************* 34 | */ 35 | 36 | /* 37 | ********************************************************************************************************* 38 | * MODULE 39 | ********************************************************************************************************* 40 | */ 41 | 42 | #ifndef NET_DEV_GS2XXX_MODULE_PRESENT 43 | #define NET_DEV_GS2XXX_MODULE_PRESENT 44 | 45 | 46 | /* 47 | ********************************************************************************************************* 48 | * INCLUDE FILES 49 | ********************************************************************************************************* 50 | */ 51 | 52 | #include 53 | #include 54 | 55 | 56 | /* 57 | ********************************************************************************************************* 58 | * GLOBAL VARIABLES 59 | ********************************************************************************************************* 60 | */ 61 | 62 | extern const NET_DEV_API_WIFI NetDev_API_GS2000; 63 | 64 | 65 | /* 66 | ********************************************************************************************************* 67 | * MODULE END 68 | ********************************************************************************************************* 69 | */ 70 | 71 | #endif 72 | 73 | -------------------------------------------------------------------------------- /Dev/WiFi/RS9110-N-2x/Firmware/iudata: -------------------------------------------------------------------------------- 1 | 0x63, 2 | 0x00, 3 | 0x00, 4 | 0x00, 5 | 0x00, 6 | 0x00, 7 | 0x00, 8 | 0x00, 9 | 0x00, 10 | 0x00, 11 | 0x00, 12 | 0x00, 13 | 0x00, 14 | 0x00, 15 | 0x00, 16 | 0x00, 17 | 0x00, 18 | 0x00, 19 | 0x00, 20 | 0x00, 21 | 0x00, 22 | 0x00, 23 | 0x00, 24 | 0x00, 25 | 0x00, 26 | 0x00, 27 | 0x00, 28 | 0x00, 29 | 0x00, 30 | 0x00, 31 | 0x00, 32 | 0x00, 33 | 0x00, 34 | 0x00, 35 | 0x00, 36 | 0x00, 37 | 0x00, 38 | 0x00, 39 | 0x00, 40 | 0x00, 41 | 0x00, 42 | 0x00, 43 | 0x00, 44 | 0x00, 45 | 0x00, 46 | 0x00, 47 | 0x00, 48 | 0x00, 49 | 0x00, 50 | 0x00, 51 | 0x00, 52 | 0x00, 53 | 0x00, 54 | 0x00, 55 | 0x00, 56 | 0x00, 57 | 0x00, 58 | 0x00, 59 | 0x00, 60 | 0x00, 61 | 0x00, 62 | 0x00, 63 | 0x00, 64 | 0x00, 65 | 0x00, 66 | 0x00, 67 | 0x00, 68 | 0x00, 69 | 0x00, 70 | 0x00, 71 | 0x00, 72 | 0x00, 73 | 0x00, 74 | 0x00, 75 | 0x00, 76 | 0x00, 77 | 0x00, 78 | 0x00, 79 | 0x00, 80 | 0x00, 81 | 0x00, 82 | 0x00, 83 | 0x00, 84 | 0x00, 85 | 0x00, 86 | 0x00, 87 | 0x00, 88 | 0x00, 89 | 0x00, 90 | 0x00, 91 | 0x00, 92 | 0x00, 93 | 0x00, 94 | 0x00, 95 | 0x00, 96 | 0x00, 97 | 0x00, 98 | 0x00, 99 | 0x00, 100 | 0x00, 101 | 0x00, 102 | 0x00, 103 | 0x00, 104 | 0x00, 105 | 0x00, 106 | 0x00, 107 | 0x00, 108 | 0x00, 109 | 0x00, 110 | 0x00, 111 | 0x00, 112 | 0x00, 113 | 0x00, 114 | 0x00, 115 | 0x00, 116 | 0x00, 117 | 0x00, 118 | 0x00, 119 | 0x00, 120 | 0x00, 121 | 0x00, 122 | 0x00, 123 | 0x00, 124 | 0x00, 125 | 0x00, 126 | 0x00, 127 | 0x00, 128 | 0x00, 129 | 0x00, 130 | 0x00, 131 | 0x00, 132 | 0x00, 133 | 0x00, 134 | 0x00, 135 | 0x00, 136 | 0x00, 137 | 0x00, 138 | 0x00, 139 | 0x00, 140 | 0x00, 141 | 0x00, 142 | 0x00, 143 | 0x00, 144 | 0x00, 145 | 0x00, 146 | 0x00, 147 | 0x00, 148 | 0x00, 149 | 0x00, 150 | 0x00, 151 | 0x00, 152 | 0x00, 153 | 0x00, 154 | 0x00, 155 | 0x00, 156 | 0x00, 157 | 0x00, 158 | 0x00, 159 | 0x00, 160 | 0x00, 161 | 0x00, 162 | 0x00, 163 | 0x00, 164 | 0x00, 165 | 0x00, 166 | 0x00, 167 | 0x00, 168 | 0x00, 169 | 0x00, 170 | 0x00, 171 | 0x00, 172 | 0x00, 173 | 0x00, 174 | 0x00, 175 | 0x00, 176 | 0x00, 177 | 0x00, 178 | 0x00, 179 | 0x00, 180 | 0x00, 181 | 0x00, 182 | 0x00, 183 | 0x00, 184 | 0x00, 185 | 0x00, 186 | 0x00, 187 | 0x00, 188 | 0x00, 189 | 0x00, 190 | 0x00, 191 | 0x00, 192 | 0x00, 193 | 0x00, 194 | 0x00, 195 | 0x00, 196 | 0x00, 197 | 0x00, 198 | 0x00, 199 | 0x00, 200 | 0x00, 201 | 0x00, 202 | 0x00, 203 | 0x00, 204 | 0x00, 205 | 0x00, 206 | 0x00, 207 | 0x00, 208 | 0x00, 209 | 0x00, 210 | 0x00, 211 | 0x00, 212 | 0x00, 213 | 0x00, 214 | 0x00, 215 | 0x00, 216 | 0x00, 217 | 0x00, 218 | 0x00, 219 | 0x00, 220 | 0x00, 221 | 0x00, 222 | 0x00, 223 | 0x00, 224 | 0x00, 225 | 0x00, 226 | 0x00, 227 | 0x00, 228 | 0x00, 229 | 0x00, 230 | 0x00, 231 | 0x00, 232 | 0x00, 233 | 0x00, 234 | 0x00, 235 | 0x00, 236 | 0x00, 237 | 0x00, 238 | 0x00, 239 | 0x00, 240 | 0x00, 241 | 0x00, 242 | 0x00, 243 | 0x00, 244 | 0x00, 245 | 0x00, 246 | 0x00, 247 | 0x00, 248 | 0x00, 249 | 0x00, 250 | 0x00, 251 | 0x00, 252 | 0x00, 253 | 0x00, 254 | 0x00, 255 | 0x00, 256 | 0x00, 257 | 0x00, 258 | 0x00, 259 | 0x00, 260 | 0x00, 261 | 0x00, 262 | 0x00, 263 | 0x00, 264 | 0x00, 265 | 0x00, 266 | 0x00, 267 | 0x00, 268 | 0x00, 269 | 0x00, 270 | 0x00, 271 | 0x00, 272 | 0x00, 273 | 0x00, 274 | 0x00, 275 | 0x00, 276 | 0x00, 277 | 0x00, 278 | 0x00, 279 | 0x00, 280 | 0x00, 281 | 0x00, 282 | 0x00, 283 | 0x00, 284 | 0x00, 285 | 0x00, 286 | 0x00, 287 | 0x00, 288 | 0x00, 289 | 0x00, 290 | 0x00, 291 | 0x00, 292 | 0x00, 293 | 0x00, 294 | 0x00, 295 | 0x00, 296 | 0x00, 297 | 0x00, 298 | 0x00, 299 | 0x00, 300 | 0x00, 301 | 0x00, 302 | 0x00, 303 | 0x00, 304 | 0x00, 305 | 0x00, 306 | 0x00, 307 | 0x00, 308 | 0x00, 309 | 0x00, 310 | 0x00, 311 | 0x00, 312 | 0x00, 313 | 0x00, 314 | 0x00, 315 | 0x00, 316 | 0x00, 317 | 0x00, 318 | 0x00, 319 | 0x00, 320 | 0x00, 321 | 0x00, 322 | 0x00, 323 | 0x00, 324 | 0x00, 325 | 0x05, 326 | 0x00, 327 | 0x00, 328 | 0x00, 329 | 0x00, 330 | 0x00, 331 | 0x00, 332 | 0x00, 333 | 0x00, 334 | 0x00, 335 | 0x00, 336 | 0x00, 337 | 0x00, 338 | 0x00, 339 | 0x00, 340 | 0x00, 341 | 0x00, 342 | 0x00, 343 | 0x00, 344 | 0x00, 345 | 0x00, 346 | 0x00, 347 | 0x00, 348 | 0x00, 349 | 0x00, 350 | 0x00, 351 | 0x00, 352 | 0x00, 353 | 0x00, 354 | 0x00, 355 | 0x00, 356 | 0x00, 357 | 0x00, 358 | 0x00, 359 | 0x00, 360 | 0x00, 361 | 0x00, 362 | 0x00, 363 | 0x00, 364 | 0x00, 365 | 0x00, 366 | 0x00, 367 | 0x00, 368 | 0x00, 369 | 0x00, 370 | 0x00, 371 | 0x00, 372 | 0x00, 373 | 0x21, 374 | 0x00, 375 | 0x00, 376 | 0x00, 377 | 0x00, 378 | 0x00, 379 | 0x01, 380 | 0x00, 381 | 0x00, 382 | 0x00, 383 | 0x00, 384 | 0x00, 385 | 0x00, 386 | 0x00, 387 | 0x00, 388 | 0x00, 389 | 0x00, 390 | 0x00, 391 | 0x00, 392 | 0x00, 393 | 0x00, 394 | 0x00, 395 | 0x72, 396 | 0x33, 397 | 0x00, 398 | 0x20, 399 | 0x00, 400 | 0x00 401 | -------------------------------------------------------------------------------- /Dev/WiFi/RS9110-N-2x/Firmware/iuinst2: -------------------------------------------------------------------------------- 1 | 0x00, 2 | 0x00, 3 | 0x00, 4 | 0x00 5 | -------------------------------------------------------------------------------- /Dev/WiFi/RS9110-N-2x/Firmware/sbdata1: -------------------------------------------------------------------------------- 1 | 0x00, 2 | 0x00, 3 | 0x00, 4 | 0x00, 5 | 0xb2, 6 | 0x0f, 7 | 0x00, 8 | 0x00, 9 | 0x20, 10 | 0xd4, 11 | 0x01, 12 | 0x00, 13 | 0x00, 14 | 0x00, 15 | 0x00, 16 | 0x00, 17 | 0x5e, 18 | 0x2b, 19 | 0x00, 20 | 0x00, 21 | 0x20, 22 | 0xd4, 23 | 0x01, 24 | 0x00, 25 | 0x00, 26 | 0x00, 27 | 0x00, 28 | 0x00, 29 | 0x00, 30 | 0x00, 31 | 0x00, 32 | 0x00 33 | -------------------------------------------------------------------------------- /Dev/WiFi/RS9110-N-2x/Firmware/sbdata2: -------------------------------------------------------------------------------- 1 | 0x28, 2 | 0x14, 3 | 0x28, 4 | 0x44 5 | -------------------------------------------------------------------------------- /Dev/WiFi/RS9110-N-2x/Firmware/sbinst1: -------------------------------------------------------------------------------- 1 | 0x07, 2 | 0x10, 3 | 0x08, 4 | 0x20, 5 | 0x4c, 6 | 0x00, 7 | 0x4c, 8 | 0x00, 9 | 0x07, 10 | 0x10, 11 | 0x8a, 12 | 0x21, 13 | 0x4c, 14 | 0x00, 15 | 0x4c, 16 | 0x00 17 | -------------------------------------------------------------------------------- /Dev/WiFi/RS9110-N-2x/net_dev_rs9110n2x.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * RS9110-N-2x 23 | * 24 | * Filename : net_dev_rs9110n2x.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | * Note(s) : (1) Assumes uC/TCP-IP V3.00.00 (or more recent version) is included in the project build. 28 | * 29 | * (2) Device driver compatible with these hardware: 30 | * 31 | * (a) RS9110-N-22 32 | * (b) RS9110-N-23 33 | * 34 | * (3) Redpine firmware V4.7.1 command: 35 | * 36 | * (a) Band. 37 | * (1) RS9110-N-22 support only band 2.4 Ghz. 38 | * (2) RS9110-N-23 support band 2.4 Ghz and 5Ghz 39 | * 40 | * The band is set when the device is started (NetDev_Start()). Currently it's NOT possible to 41 | * change the band after the start is completed. 42 | * 43 | * (b) The initialization command is sent when the device is started (NetDev_Start()). 44 | * 45 | * (c) Scan is FULLY supported. 46 | * 47 | * (d) Join 48 | * 49 | * (c) Query MAC address and Netowrk Type of Scanned Networks is NOT currently supported. 50 | * 51 | * (d) Scan 52 | * 53 | * (e) Power Save 54 | * 55 | * (f) Query Connection status 56 | ********************************************************************************************************* 57 | */ 58 | 59 | /* 60 | ********************************************************************************************************* 61 | * MODULE 62 | ********************************************************************************************************* 63 | */ 64 | 65 | #ifndef NET_DEV_RS9110N2X_MODULE_PRESENT 66 | #define NET_DEV_RS9110N2X_MODULE_PRESENT 67 | #ifdef NET_IF_WIFI_MODULE_EN 68 | 69 | /* 70 | ********************************************************************************************************* 71 | * INCLUDE FILES 72 | ********************************************************************************************************* 73 | */ 74 | 75 | #include "../Manager/Generic/net_wifi_mgr.h" 76 | 77 | 78 | /* 79 | ********************************************************************************************************* 80 | * DEVICE DRIVER ERROR CODES 81 | * 82 | * Note(s) : (1) ALL device-independent error codes #define'd in 'net_err.h'; 83 | * ALL device-specific error codes #define'd in this 'net_dev_&&&.h'. 84 | * 85 | * (2) Network error code '11,000' series reserved for network device drivers. 86 | * See 'net_err.h NETWORK DEVICE ERROR CODES' to ensure that device-specific 87 | * error codes do NOT conflict with device-independent error codes. 88 | ********************************************************************************************************* 89 | */ 90 | 91 | 92 | /* 93 | ********************************************************************************************************* 94 | * GLOBAL VARIABLES 95 | ********************************************************************************************************* 96 | */ 97 | 98 | extern const NET_DEV_API_WIFI NetDev_API_RS9110N2x; 99 | 100 | 101 | /* 102 | ********************************************************************************************************* 103 | * CONFIGURATION ERRORS 104 | ********************************************************************************************************* 105 | */ 106 | 107 | 108 | /* 109 | ********************************************************************************************************* 110 | * MODULE END 111 | ********************************************************************************************************* 112 | */ 113 | 114 | #endif /* NET_IF_WIFI_MODULE_EN */ 115 | #endif /* NET_DEV_RS9110N2X_MODULE_PRESENT */ 116 | -------------------------------------------------------------------------------- /Dev/WiFi/Template/net_dev_wifi_template_spi.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK DEVICE DRIVER 21 | * 22 | * WIRELESS SPI TEMPLATE 23 | * 24 | * Filename : net_dev_wifi_template_spi.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | */ 28 | 29 | /* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #ifndef NET_DEV_TEMPLATE_WIFI_SPI_MODULE_PRESENT 36 | #define NET_DEV_TEMPLATE_WIFI_SPI_MODULE_PRESENT 37 | #ifdef NET_IF_WIFI_MODULE_EN 38 | #include 39 | 40 | 41 | /* 42 | ********************************************************************************************************* 43 | * DEVICE DRIVER ERROR CODES 44 | * 45 | * Note(s) : (1) ALL device-independent error codes #define'd in 'net_err.h'; 46 | * ALL device-specific error codes #define'd in this 'net_dev_&&&.h'. 47 | * 48 | * (2) Network error code '11,000' series reserved for network device drivers. 49 | * See 'net_err.h NETWORK DEVICE ERROR CODES' to ensure that device-specific 50 | * error codes do NOT conflict with device-independent error codes. 51 | ********************************************************************************************************* 52 | */ 53 | 54 | 55 | /* 56 | ********************************************************************************************************* 57 | * GLOBAL VARIABLES 58 | ********************************************************************************************************* 59 | */ 60 | 61 | extern const NET_DEV_API_WIFI NetDev_API_TemplateWiFiSpi; 62 | 63 | 64 | /* 65 | ********************************************************************************************************* 66 | * CONFIGURATION ERRORS 67 | ********************************************************************************************************* 68 | */ 69 | 70 | 71 | /* 72 | ********************************************************************************************************* 73 | * MODULE END 74 | ********************************************************************************************************* 75 | */ 76 | 77 | #endif /* NET_IF_WIFI_MODULE_EN */ 78 | #endif /* NET_DEV_TEMPLATE_WIFI_SPI_MODULE_PRESENT */ 79 | 80 | -------------------------------------------------------------------------------- /Examples/Multicast/mcast_echo_client.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | 3 | #* 4 | #******************************************************************************************************** 5 | # 6 | # MULTICAST EXAMPLE 7 | # 8 | # Filename : mcast_echo_client.py 9 | # Version : V3.05.04 10 | #******************************************************************************************************** 11 | # Argument(s) : IPv4 Address of the remote host 12 | # 13 | # IPv4 Multicast group address 14 | # 15 | # Remote Port 16 | #******************************************************************************************************** 17 | #* 18 | 19 | #------------------ 20 | # MODULE TO IMPORT 21 | #------------------ 22 | import time 23 | import struct 24 | import socket 25 | import sys 26 | 27 | 28 | #---------------------- 29 | # ARGUMENTS VALIDATION 30 | #---------------------- 31 | if (len(sys.argv) > 3): 32 | sys.stderr.write('Invalid number of arguments!\n') 33 | sys.exit(-1) 34 | #end if 35 | 36 | 37 | GROUP = sys.argv[1] 38 | PORT = sys.argv[2] 39 | 40 | ANY = "0.0.0.0" 41 | 42 | # Datagram (udp) socket 43 | try : 44 | s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 45 | print('Socket created') 46 | 47 | except socket.error : 48 | print('Failed to create socket. Error Code : ' + str(socket.error[0]) + ' Message ' + socket.error[1]) 49 | sys.exit() 50 | #end try 51 | 52 | 53 | try: 54 | # Set a timeout so the socket does not block indefinitely when trying to receive data. 55 | s.settimeout(1) 56 | 57 | # Set the time-to-live for messages to 1 so they do not go past the local network segment. 58 | ttl = struct.pack('b', 1) 59 | s.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, ttl) 60 | 61 | #The sender is bound on (0.0.0.0:1501) 62 | s.bind((ANY, int(PORT))) 63 | print("The sender is bound: (" + ANY + ":" + PORT + ")") 64 | 65 | except socket.error : 66 | print('Failed to create socket. Error Code : ' + str(socket.error[0]) + ' Message ' + socket.error[1]) 67 | s.close() 68 | sys.exit() 69 | #end try 70 | 71 | 72 | multicast_group = (GROUP, int(PORT)) 73 | 74 | while(1) : 75 | msg = 'Hello World' 76 | msg_bytes = bytes(msg, 'UTF-8') 77 | 78 | try : 79 | #Set the whole string 80 | s.sendto(msg_bytes, multicast_group) 81 | print("Message sent: " + msg) 82 | 83 | # receive data from client (data, addr) 84 | d = s.recvfrom(1024) 85 | reply = d[0] 86 | addr = d[1] 87 | print('Server reply : ' + reply.decode('UTF-8')) 88 | 89 | except socket.timeout as msg_error: 90 | print('Timeout') 91 | 92 | except socket.error as msg_error: 93 | print('Socket Error : ' + msg_error[0]) 94 | s.close() 95 | sys.exit() 96 | #end try 97 | #end while 98 | -------------------------------------------------------------------------------- /Examples/Socket/Script/tcp_server.py: -------------------------------------------------------------------------------- 1 | #* 2 | #******************************************************************************************************** 3 | # EXAMPLE CODE 4 | # 5 | # This file is provided as an example on how to use Micrium products. 6 | # 7 | # Please feel free to use any application code labeled as 'EXAMPLE CODE' in 8 | # your application products. Example code may be used as is, in whole or in 9 | # part, or may be used as a reference only. This file can be modified as 10 | # required to meet the end-product requirements. 11 | # 12 | #******************************************************************************************************** 13 | #* 14 | 15 | 16 | #!/usr/bin/env python 17 | 18 | import asyncio 19 | import time 20 | import socket 21 | import struct 22 | 23 | class EchoServerClientProtocol(asyncio.Protocol): 24 | def connection_made(self, transport): 25 | self.transport = transport 26 | 27 | peername = transport.get_extra_info('peername') 28 | print('Connection from {}'.format(peername)) 29 | 30 | sock = transport.get_extra_info('socket') 31 | sock.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, struct.pack('ii', 1, 0)) 32 | 33 | 34 | def data_received(self, data): 35 | message = data.decode() 36 | print('Data received: {!r}'.format(message)) 37 | 38 | print('Send: {!r}'.format(message)) 39 | self.transport.write(data) 40 | 41 | time.sleep(0.02) 42 | 43 | print('Close the client socket') 44 | self.transport.close() 45 | 46 | 47 | loop = asyncio.get_event_loop() 48 | # Each client connection will create a new protocol instance 49 | coro = loop.create_server(EchoServerClientProtocol, '0.0.0.0', 10001) 50 | server = loop.run_until_complete(coro) 51 | 52 | # Serve requests until CTRL+c is pressed 53 | print('Serving on {}'.format(server.sockets[0].getsockname())) 54 | try: 55 | loop.run_forever() 56 | except KeyboardInterrupt: 57 | pass 58 | 59 | # Close the server 60 | server.close() 61 | loop.run_until_complete(server.wait_closed()) 62 | loop.close() 63 | -------------------------------------------------------------------------------- /FS/Template/net_fs_template.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK FILE SYSTEM PORT LAYER 21 | * 22 | * TEMPLATE 23 | * 24 | * Filename : net_fs_template.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | * Note(s) : (1) Assumes the following versions (or more recent) of software modules are included in 28 | * the project build : 29 | * 30 | * (a) uC/FS V4.03 31 | * (b) uC/Clk V3.09 if uC/FS V4.04 (or more recent) is included 32 | * 33 | * (2) Should be compatible with the following TCP/IP application versions (or more recent): 34 | * 35 | * (a) uC/FTPc V1.93.01 36 | * (b) uC/FTPs V1.95.02 37 | * (c) uC/HTTPs V1.98.00 38 | * (d) uC/TFTPc V1.92.01 39 | * (e) uC/TFTPs V1.91.02 40 | ********************************************************************************************************* 41 | */ 42 | 43 | /* 44 | ********************************************************************************************************* 45 | * MODULE 46 | ********************************************************************************************************* 47 | */ 48 | 49 | #ifndef NET_FS_V4_MODULE_PRESENT 50 | #define NET_FS_V4_MODULE_PRESENT 51 | 52 | 53 | /* 54 | ********************************************************************************************************* 55 | * INCLUDE FILES 56 | ********************************************************************************************************* 57 | */ 58 | 59 | #include 60 | 61 | 62 | /* 63 | ********************************************************************************************************* 64 | * LOCAL DEFINES 65 | ********************************************************************************************************* 66 | */ 67 | 68 | 69 | /* 70 | ********************************************************************************************************* 71 | * GLOBAL VARIABLES 72 | ********************************************************************************************************* 73 | */ 74 | 75 | extern const NET_FS_API NetFS_API_Template; 76 | 77 | 78 | /* 79 | ********************************************************************************************************* 80 | * FUNCTION PROTOTYPES 81 | ********************************************************************************************************* 82 | */ 83 | 84 | 85 | /* 86 | ********************************************************************************************************* 87 | * CONFIGURATION ERRORS 88 | ********************************************************************************************************* 89 | */ 90 | 91 | 92 | /* 93 | ********************************************************************************************************* 94 | * MODULE END 95 | ********************************************************************************************************* 96 | */ 97 | 98 | #endif /* End of net fs template module include. */ 99 | 100 | 101 | -------------------------------------------------------------------------------- /Modules/Common/net_base64.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK UTILITY LIBRARY 21 | * 22 | * Filename : net_base64.h 23 | * Version : V3.06.01 24 | ********************************************************************************************************* 25 | * Note(s) : (1) N O compiler-supplied standard library functions are used by the network protocol suite. 26 | * 'net_util.*' implements ALL network-specific library functions. 27 | * 28 | * See also 'net.h NETWORK INCLUDE FILES Note #3'. 29 | ********************************************************************************************************* 30 | */ 31 | 32 | /* 33 | ********************************************************************************************************* 34 | ********************************************************************************************************* 35 | * MODULE 36 | ********************************************************************************************************* 37 | ********************************************************************************************************* 38 | */ 39 | 40 | #ifndef NET_BASE64_MODULE_PRESENT 41 | #define NET_BASE64_MODULE_PRESENT 42 | 43 | 44 | /* 45 | ********************************************************************************************************* 46 | ********************************************************************************************************* 47 | * INCLUDE FILES 48 | ********************************************************************************************************* 49 | ********************************************************************************************************* 50 | */ 51 | 52 | #include 53 | #include 54 | 55 | 56 | /* 57 | ********************************************************************************************************* 58 | * BASE 64 ENCODER DEFINES 59 | * 60 | * Note(s) : (1) The size of the output buffer the base 64 encoder produces is typically bigger than the 61 | * input buffer by a factor of (4 x 3). However, when padding is necessary, up to 3 62 | * additional characters could by appended. Finally, one more character is used to NULL 63 | * terminate the buffer. 64 | ********************************************************************************************************* 65 | */ 66 | 67 | #define NET_BASE64_ENCODER_OCTETS_IN_GRP 3 68 | #define NET_BASE64_ENCODER_OCTETS_OUT_GRP 4 69 | 70 | #define NET_BASE64_DECODER_OCTETS_IN_GRP 4 71 | #define NET_BASE64_DECODER_OCTETS_OUT_GRP 3 72 | 73 | #define NET_BASE64_ENCODER_PAD_CHAR '=' 74 | /* See Note #1. */ 75 | #define NET_BASE64_ENCODER_OUT_MAX_LEN(length) (((length / 3) * 4) + ((length % 3) == 0 ? 0 : 4) + 1) 76 | 77 | 78 | 79 | void NetBase64_Encode (CPU_CHAR *pin_buf, 80 | CPU_INT16U in_len, 81 | CPU_CHAR *pout_buf, 82 | CPU_INT16U out_len, 83 | NET_ERR *p_err); 84 | 85 | void NetBase64_Decode (CPU_CHAR *pin_buf, 86 | CPU_INT16U in_len, 87 | CPU_CHAR *pout_buf, 88 | CPU_INT16U out_len, 89 | NET_ERR *p_err); 90 | 91 | #endif 92 | -------------------------------------------------------------------------------- /Modules/Common/net_md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK CRYPTO MD5 UTILITY 21 | * 22 | * Filename : net_md5.h 23 | * Version : V3.06.01 24 | ********************************************************************************************************* 25 | */ 26 | 27 | /* 28 | ********************************************************************************************************* 29 | ********************************************************************************************************* 30 | * INCLUDES FILES 31 | ********************************************************************************************************* 32 | ********************************************************************************************************* 33 | */ 34 | 35 | #include 36 | #include 37 | 38 | 39 | /* 40 | ********************************************************************************************************* 41 | ********************************************************************************************************* 42 | * LOCAL DEFINES 43 | ********************************************************************************************************* 44 | ********************************************************************************************************* 45 | */ 46 | 47 | 48 | /* 49 | ********************************************************************************************************* 50 | ********************************************************************************************************* 51 | * LOCAL FUNCTION PROTOTYPTES 52 | ********************************************************************************************************* 53 | ********************************************************************************************************* 54 | */ 55 | 56 | #ifndef NET_MD5_MODULE_PRESENT 57 | #define NET_MD5_MODULE_PRESENT 58 | 59 | 60 | 61 | typedef struct MD5Context NET_MD5_CONTEXT; 62 | 63 | struct MD5Context { 64 | CPU_INT32U state [ 4u]; 65 | CPU_INT32U count [ 2u]; 66 | CPU_INT08U buffer[64u]; 67 | }; 68 | 69 | void NetMD5_Init ( NET_MD5_CONTEXT *p_context); 70 | 71 | void NetMD5_Update ( NET_MD5_CONTEXT *p_context, 72 | const CPU_INT08U *p_buf, 73 | CPU_INT32U len); 74 | 75 | void NetMD5_Final ( CPU_INT08U digest[16u], 76 | NET_MD5_CONTEXT *p_context); 77 | 78 | void NetMD5_Transform ( CPU_INT32U state[ 4u], 79 | const CPU_INT08U block[64u]); 80 | 81 | 82 | 83 | #endif /* !MD5_H */ 84 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | ATTENTION ALL USERS OF THIS REPOSITORY: 2 | 3 | The original work found in this repository is provided by Silicon Labs under the 4 | Apache License, Version 2.0. 5 | 6 | Any third party may contribute derivative works to the original work in which 7 | modifications are clearly identified as being licensed under: 8 | 9 | (1) the Apache License, Version 2.0 or a compatible open source license; or 10 | (2) under a proprietary license with a copy of such license deposited. 11 | 12 | All posted derivative works must clearly identify which license choice has been 13 | elected. 14 | 15 | No such posted derivative works will be considered to be a “Contribution” under 16 | the Apache License, Version 2.0. 17 | 18 | SILICON LABS MAKES NO WARRANTY WITH RESPECT TO ALL POSTED THIRD PARTY CONTENT 19 | AND DISCLAIMS ALL OTHER WARRANTIES OR LIABILITIES, INCLUDING ALL WARRANTIES OF 20 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, OWNERSHIP, 21 | NON-INFRINGEMENT, AND NON-MISAPPROPRIATION. 22 | 23 | In the event a derivative work is desired to be submitted to Silicon Labs as a 24 | “Contribution” under the Apache License, Version 2.0, a “Contributor” must give 25 | written email notice to micrium@weston-embedded.com. Unless an email response in 26 | the affirmative to accept the derivative work as a “Contribution”, such email 27 | submission should be considered to have not been incorporated into the original 28 | work. 29 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | .. raw:: html 2 | 3 | 4 |

5 | 6 |

7 |
8 | 9 | µC/OS is a full-featured embedded operating system originally developed by Micriµm™. In addition to the two highly popular kernels, µC/OS features support for TCP/IP, USB-Device, USB-Host, and Modbus, as well as a robust File System. 10 | 11 | Since its founding in 1999 as a private company, Micriµm and its team of engineers have offered world-class embedded software components for the most critical and demanding real-time applications. Recognized as having some of the cleanest code in the industry, with easy-to-understand documentation, the Micrium real-time kernels, and software components have successfully been deployed in thousands of products worldwide across a broad range of industries. Micrium’s µC/OS-II™ kernel has been certified for use in safety-critical applications and remains a respected favorite in the medical, aerospace, and industrial markets. µC/OS continues to be the RTOS of choice for engineers requiring the most reliable and trusted solution for their mission-critical applications. 12 | 13 | ---------- 14 | 15 | .. raw:: HTML 16 | 17 | 18 |

19 | 20 |

21 |
22 | 23 | Founded by a team of former Micrium employees, Weston Embedded Solutions is the official custodian for the µC/OS RTOS and Stacks software repository to ensure it remains the trusted choice for embedded engineers around the world. 24 | 25 | ---------- 26 | 27 | Product Documentation and Release Notes 28 | *************** 29 | https://micrium.atlassian.net/ 30 | 31 | Technical Support 32 | ***************** 33 | https://weston-embedded.com/micrium-support 34 | 35 | Example Projects 36 | ********* 37 | https://weston-embedded.com/micrium-examples 38 | 39 | Commercial Licensing Option 40 | ********* 41 | https://weston-embedded.com/products/cesium 42 | 43 | Who to Contact 44 | ********* 45 | https://weston-embedded.com/company/contact -------------------------------------------------------------------------------- /Secure/Segger/Cfg/net_secure_emssl_cfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK SECURITY PORT LAYER 21 | * 22 | * SEGGER emSSL 23 | * 24 | * Filename : net_secure_emssl_cfg.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | * Note(s) : (1) Assumes the following versions (or more recent) of software modules are included in 28 | * the project build : 29 | * 30 | * (a) SEGGER emSSL V2.54a 31 | * (b) uC/Clk V3.09 32 | * 33 | * See also 'net.h Note #1'. 34 | ********************************************************************************************************* 35 | */ 36 | 37 | /* 38 | ********************************************************************************************************* 39 | ********************************************************************************************************* 40 | * MODULE 41 | ********************************************************************************************************* 42 | ********************************************************************************************************* 43 | */ 44 | 45 | #ifndef NET_SECURE_EMSSL_CFG_MODULE_PRESENT 46 | #define NET_SECURE_EMSSL_CFG_MODULE_PRESENT 47 | 48 | #ifdef NET_SECURE_MODULE_EN 49 | 50 | 51 | /* 52 | ********************************************************************************************************* 53 | ********************************************************************************************************* 54 | * DEFINES 55 | ********************************************************************************************************* 56 | ********************************************************************************************************* 57 | */ 58 | 59 | #define EMSSL_CFG_MIN_FOOTPRINT_EN DEF_ENABLED /* Minimal configuration. */ 60 | /* Install DHE cipher suite. Key agreement is slow ... */ 61 | #define EMSSL_CFG_DHE_RSA_CIPHER_SUITE DEF_DISABLED /* ... so it should be left disabled by default. */ 62 | #define EMSSL_CFG_ECDHE_ECDSA_CIPHER_SUITE_EN DEF_ENABLED /* Install ECDHE-ECDSA cipher suites. */ 63 | #define EMSSL_CFG_ECDHE_RSA_CIPHER_SUITE_EN DEF_ENABLED /* Install ECDHE-RSA cipher suites. */ 64 | #define EMSSL_CFG_ECDH_ECDSA_CIPHER_SUITE_EN DEF_ENABLED /* Install ECDH-ECDSA cipher suites. */ 65 | #define EMSSL_CFG_ECDH_RSA_CIPHER_SUITE_EN DEF_ENABLED /* Install ECDH-RSA cipher suites. */ 66 | #define EMSSL_CFG_RSA_CIPHER_SUITE_EN DEF_ENABLED /* Install static RSA cipher suites. */ 67 | /* Install insecure NULL cipher suites for debugging...*/ 68 | #define EMSSL_CFG_NULL_CIPHER_SUITE_EN DEF_DISABLED /* ...purposes. No block encipherment. */ 69 | 70 | #if (NET_SECURE_CFG_HW_CRYPTO_EN == DEF_ENABLED) 71 | #include 72 | #endif 73 | 74 | #endif 75 | #endif -------------------------------------------------------------------------------- /Secure/Segger/HW/ST/STM32F7/net_secure_emssl_hw.c: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * 4 | * NETWORK SECURITY HARDWARE LAYER 5 | * 6 | * SEGGER emSSL 7 | * 8 | * Filename : net_secure_emssl_hw.c 9 | * Version : V3.06.01 10 | ********************************************************************************************************* 11 | * Note(s) : (1) Assumes the following versions (or more recent) of software modules are included in 12 | * the project build : 13 | * 14 | * (a) SEGGER emSSL V2.54a 15 | * (b) uC/Clk V3.09 16 | * 17 | * See also 'net.h Note #1'. 18 | ********************************************************************************************************* 19 | */ 20 | 21 | /* 22 | ********************************************************************************************************* 23 | ********************************************************************************************************* 24 | * INCLUDE FILES 25 | ********************************************************************************************************* 26 | ********************************************************************************************************* 27 | */ 28 | 29 | #define MICRIUM_SOURCE 30 | #define NET_SECURE_MODULE 31 | 32 | #include "net_secure_emssl_hw.h" 33 | #include "../../../net_secure_emssl.h" 34 | #include 35 | #include 36 | 37 | 38 | /* 39 | ********************************************************************************************************* 40 | ********************************************************************************************************* 41 | * FUNCTION PROTOTYPES 42 | ********************************************************************************************************* 43 | ********************************************************************************************************* 44 | */ 45 | 46 | void NetSecure_EmSSL_HW_RNG_Init (void); 47 | void NetSecure_EmSSL_HW_HASH_Init (void); 48 | void NetSecure_EmSSL_HW_CRYPTO_Init(void); 49 | 50 | 51 | /* 52 | ********************************************************************************************************* 53 | * NetSecure_EmSSL_HW_RNG_Init() 54 | * 55 | * Description : Configures the hardware random number generator for emSSL to use. 56 | * 57 | * Argument(s) : none. 58 | * 59 | * Return(s) : none. 60 | * 61 | * Note(s) : none. 62 | ********************************************************************************************************* 63 | */ 64 | 65 | void NetSecure_EmSSL_HW_RNG_Init (void) 66 | { 67 | #if defined(RNG) 68 | __HAL_RCC_RNG_CLK_ENABLE(); 69 | __HAL_RCC_RNG_FORCE_RESET(); 70 | __HAL_RCC_RNG_RELEASE_RESET(); 71 | /* Install external random number generator. */ 72 | CRYPTO_RNG_InstallEx(&CRYPTO_RNG_HW_STM32_RNG, &CRYPTO_RNG_HW_STM32_RNG); 73 | #endif 74 | } 75 | 76 | 77 | /* 78 | ********************************************************************************************************* 79 | * NetSecure_EmSSL_HW_HASH_Init() 80 | * 81 | * Description : Configures the hardware hashing unit for emSSL to use. 82 | * 83 | * Argument(s) : none. 84 | * 85 | * Return(s) : none. 86 | * 87 | * Note(s) : none. 88 | ********************************************************************************************************* 89 | */ 90 | 91 | void NetSecure_EmSSL_HW_HASH_Init (void) 92 | { 93 | #if defined(HASH) 94 | __HAL_RCC_HASH_CLK_ENABLE(); 95 | __HAL_RCC_HASH_FORCE_RESET(); 96 | __HAL_RCC_HASH_RELEASE_RESET(); 97 | #endif 98 | } 99 | 100 | 101 | /* 102 | ********************************************************************************************************* 103 | * NetSecure_EmSSL_HW_CRYPTO_Init() 104 | * 105 | * Description : Configures the hardware cryptoengine for emSSL to use. 106 | * 107 | * Argument(s) : none. 108 | * 109 | * Return(s) : none. 110 | * 111 | * Note(s) : none. 112 | ********************************************************************************************************* 113 | */ 114 | 115 | void NetSecure_EmSSL_HW_CRYPTO_Init (void) 116 | { 117 | #if defined(CRYP) 118 | /* Turn on clocks to the CRYP accelerator and reset it. */ 119 | __HAL_RCC_CRYP_CLK_ENABLE(); 120 | __HAL_RCC_CRYP_FORCE_RESET(); 121 | __HAL_RCC_CRYP_RELEASE_RESET(); 122 | 123 | /* Install hardware assistance. */ 124 | CRYPTO_AES_Install(&CRYPTO_CIPHER_AES_HW_STM32_CRYP, NULL); 125 | CRYPTO_TDES_Install(&CRYPTO_CIPHER_TDES_HW_STM32_CRYP, NULL); 126 | #endif 127 | } 128 | -------------------------------------------------------------------------------- /Secure/Segger/HW/ST/STM32F7/net_secure_emssl_hw.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * 4 | * NETWORK SECURITY HARDWARE LAYER 5 | * 6 | * SEGGER emSSL 7 | * 8 | * Filename : net_secure_emssl_hw.h 9 | * Version : V3.06.01 10 | ********************************************************************************************************* 11 | * Note(s) : (1) Assumes the following versions (or more recent) of software modules are included in 12 | * the project build : 13 | * 14 | * (a) SEGGER emSSL V2.54a 15 | * (b) uC/Clk V3.09 16 | * 17 | * See also 'net.h Note #1'. 18 | ********************************************************************************************************* 19 | */ 20 | 21 | /* 22 | ********************************************************************************************************* 23 | ********************************************************************************************************* 24 | * MODULE 25 | ********************************************************************************************************* 26 | ********************************************************************************************************* 27 | */ 28 | 29 | #ifdef NET_SECURE_MODULE_EN 30 | #define NET_SECURE_EMSSL_MODULE 31 | 32 | 33 | /* 34 | ********************************************************************************************************* 35 | ********************************************************************************************************* 36 | * INCLUDE FILES 37 | ********************************************************************************************************* 38 | ********************************************************************************************************* 39 | */ 40 | 41 | #ifndef NET_SECURE_EMSSL_HW_MODULE_PRESENT 42 | #define NET_SECURE_EMSSL_HW_MODULE_PRESENT 43 | 44 | 45 | /* 46 | ********************************************************************************************************* 47 | ********************************************************************************************************* 48 | * FUNCTION PROTOTYPES 49 | ********************************************************************************************************* 50 | ********************************************************************************************************* 51 | */ 52 | 53 | extern void NetSecure_EmSSL_HW_RNG_Init (void); 54 | extern void NetSecure_EmSSL_HW_HASH_Init (void); 55 | extern void NetSecure_EmSSL_HW_CRYPTO_Init(void); 56 | 57 | #define NET_SECURE_HW_ACCEL_INIT() do { \ 58 | NetSecure_EmSSL_HW_RNG_Init(); \ 59 | NetSecure_EmSSL_HW_HASH_Init(); \ 60 | NetSecure_EmSSL_HW_CRYPTO_Init(); \ 61 | } while (0u) 62 | 63 | #endif 64 | #endif -------------------------------------------------------------------------------- /Secure/Segger/net_secure_emssl.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK SECURITY PORT LAYER 21 | * 22 | * SEGGER emSSL 23 | * 24 | * Filename : net_secure_emssl.h 25 | * Version : V3.06.01 26 | ********************************************************************************************************* 27 | * Note(s) : (1) Assumes the following versions (or more recent) of software modules are included in 28 | * the project build : 29 | * 30 | * (a) SEGGER emSSL V2.54a 31 | * (b) uC/Clk V3.09 32 | * 33 | * See also 'net.h Note #1'. 34 | ********************************************************************************************************* 35 | */ 36 | 37 | /* 38 | ********************************************************************************************************* 39 | ********************************************************************************************************* 40 | * MODULE 41 | ********************************************************************************************************* 42 | ********************************************************************************************************* 43 | */ 44 | 45 | #ifndef NET_SECURE_EMSSL_MODULE 46 | #define NET_SECURE_EMSSL_MODULE 47 | 48 | 49 | /* 50 | ********************************************************************************************************* 51 | ********************************************************************************************************* 52 | * INCLUDE FILES 53 | ********************************************************************************************************* 54 | ********************************************************************************************************* 55 | */ 56 | 57 | #include 58 | #include 59 | #include 60 | #include 61 | 62 | #ifdef NET_SECURE_MODULE_EN 63 | 64 | 65 | /* 66 | ********************************************************************************************************* 67 | ********************************************************************************************************* 68 | * GLOBAL FUNCTION PROTOTYPES 69 | ********************************************************************************************************* 70 | ********************************************************************************************************* 71 | */ 72 | 73 | void SSL_X_Config (void); 74 | void SSL_OS_Init (void); 75 | void CRYPTO_OS_Init (void); 76 | void CRYPTO_X_Config(void); 77 | 78 | #endif 79 | #endif -------------------------------------------------------------------------------- /Source/net_icmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK ICMP GENERIC LAYER 21 | * (INTERNET CONTROL MESSAGE PROTOCOL) 22 | * 23 | * Filename : net_icmp.h 24 | * Version : V3.06.01 25 | ********************************************************************************************************* 26 | */ 27 | 28 | /* 29 | ********************************************************************************************************* 30 | ********************************************************************************************************* 31 | * MODULE 32 | ********************************************************************************************************* 33 | ********************************************************************************************************* 34 | */ 35 | 36 | #ifndef NET_ICMP_MODULE_PRESENT 37 | #define NET_ICMP_MODULE_PRESENT 38 | 39 | 40 | /* 41 | ********************************************************************************************************* 42 | ********************************************************************************************************* 43 | * INCLUDE FILES 44 | ********************************************************************************************************* 45 | ********************************************************************************************************* 46 | */ 47 | 48 | #include "net_cfg_net.h" 49 | #include "net_err.h" 50 | #include "net_ip.h" 51 | 52 | 53 | /* 54 | ********************************************************************************************************* 55 | ********************************************************************************************************* 56 | * FUNCTION PROTOTYPES 57 | ********************************************************************************************************* 58 | ********************************************************************************************************* 59 | */ 60 | 61 | /* 62 | ********************************************************************************************************* 63 | * EXTERNAL C LANGUAGE LINKAGE 64 | * 65 | * Note(s) : (1) C++ compilers MUST 'extern'ally declare ALL C function prototypes & variable/object 66 | * declarations for correct C language linkage. 67 | ********************************************************************************************************* 68 | */ 69 | 70 | #ifdef __cplusplus 71 | extern "C" { 72 | #endif 73 | 74 | /* 75 | ********************************************************************************************************* 76 | * PUBLIC API 77 | ********************************************************************************************************* 78 | */ 79 | 80 | CPU_BOOLEAN NetICMP_TxEchoReq(CPU_INT08U *p_addr_dest, 81 | NET_IP_ADDR_LEN addr_len, 82 | CPU_INT32U timeout_ms, 83 | void *p_data, 84 | CPU_INT16U data_len, 85 | NET_ERR *p_err); 86 | 87 | 88 | /* 89 | ********************************************************************************************************* 90 | * INTERNAL FUNCTIONS 91 | ********************************************************************************************************* 92 | */ 93 | 94 | 95 | void NetICMP_Init (NET_ERR *p_err); 96 | 97 | void NetICMP_LockAcquire(NET_ERR *p_err); 98 | 99 | void NetICMP_LockRelease(void); 100 | 101 | void NetICMP_RxEchoReply(CPU_INT16U id, 102 | CPU_INT16U seq, 103 | CPU_INT08U *p_data, 104 | CPU_INT16U data_len, 105 | NET_ERR *p_err); 106 | 107 | /* 108 | ********************************************************************************************************* 109 | * EXTERNAL C LANGUAGE LINKAGE END 110 | ********************************************************************************************************* 111 | */ 112 | 113 | #ifdef __cplusplus 114 | } 115 | #endif 116 | 117 | #endif /* NET_ICMP_MODULE_PRESENT */ 118 | -------------------------------------------------------------------------------- /Source/net_ip.c: -------------------------------------------------------------------------------- 1 | /* 2 | ********************************************************************************************************* 3 | * uC/TCP-IP 4 | * The Embedded TCP/IP Suite 5 | * 6 | * Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com 7 | * 8 | * SPDX-License-Identifier: APACHE-2.0 9 | * 10 | * This software is subject to an open source license and is distributed by 11 | * Silicon Laboratories Inc. pursuant to the terms of the Apache License, 12 | * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0. 13 | * 14 | ********************************************************************************************************* 15 | */ 16 | 17 | /* 18 | ********************************************************************************************************* 19 | * 20 | * NETWORK IP GENERIC LAYER 21 | * (INTERNET PROTOCOL) 22 | * 23 | * Filename : net_ip.c 24 | * Version : V3.06.01 25 | ********************************************************************************************************* 26 | * Note(s) : (1) This module is responsible to initialize different IP version enabled. 27 | ********************************************************************************************************* 28 | */ 29 | 30 | /* 31 | ********************************************************************************************************* 32 | ********************************************************************************************************* 33 | * INCLUDE FILES 34 | ********************************************************************************************************* 35 | ********************************************************************************************************* 36 | */ 37 | 38 | #define MICRIUM_SOURCE 39 | #define NET_IP_MODULE 40 | #include "net_cfg_net.h" 41 | #include "net_ip.h" 42 | 43 | 44 | #ifdef NET_IPv4_MODULE_EN 45 | #include "../IP/IPv4/net_ipv4.h" 46 | #endif 47 | #ifdef NET_IPv6_MODULE_EN 48 | #include "../IP/IPv6/net_ipv6.h" 49 | #endif 50 | 51 | 52 | /* 53 | ********************************************************************************************************* 54 | * NetIP_Init() 55 | * 56 | * Description : Initialize IP modules. 57 | * 58 | * 59 | * Argument(s) : none. 60 | * 61 | * Return(s) : none. 62 | * 63 | * Caller(s) : Net_Init(). 64 | * 65 | * This function is an INTERNAL network protocol suite function & MUST NOT be called by 66 | * application function(s). 67 | * 68 | * Note(s) : none. 69 | ********************************************************************************************************* 70 | */ 71 | 72 | void NetIP_Init (NET_ERR *p_err) 73 | { 74 | #ifdef NET_IPv4_MODULE_EN 75 | NetIPv4_Init(); 76 | *p_err = NET_ERR_NONE; 77 | #endif 78 | 79 | #ifdef NET_IPv6_MODULE_EN 80 | NetIPv6_Init(p_err); 81 | if (*p_err == NET_IPv6_ERR_NONE) { 82 | *p_err = NET_ERR_NONE; 83 | } 84 | #endif 85 | } 86 | 87 | 88 | 89 | /* 90 | ********************************************************************************************************* 91 | * NetIP_IF_Init() 92 | * 93 | * Description : Initialize IP objects for given Interface. 94 | * 95 | * Argument(s) : if_nbr Network Interface number to initialize. 96 | * 97 | * p_err Pointer to variable that will receive the return error code from this function : 98 | * 99 | * NET_ERR_NONE 100 | * 101 | * ----------- RETURNED BY NetIF_LinkStateSubscribeHandler() : ------------ 102 | * See NetIF_LinkStateSubscribeHandler() for additional return error codes. 103 | * 104 | * Return(s) : None. 105 | * 106 | * Caller(s) : NetIF_Add(). 107 | * 108 | * Note(s) : None. 109 | ********************************************************************************************************* 110 | */ 111 | 112 | void NetIP_IF_Init (NET_IF_NBR if_nbr, 113 | NET_ERR *p_err) 114 | { 115 | 116 | #ifdef NET_IPv4_MODULE_EN 117 | *p_err = NET_ERR_NONE; 118 | #endif 119 | 120 | #ifdef NET_IPv6_MODULE_EN 121 | /* --------- INIT IPv6 LINK CHANGE SUBSCRIBE ---------- */ 122 | NetIF_LinkStateSubscribeHandler(if_nbr, 123 | &NetIPv6_LinkStateSubscriber, 124 | p_err); 125 | switch (*p_err) { 126 | case NET_IF_ERR_NONE: 127 | *p_err = NET_ERR_NONE; 128 | break; 129 | 130 | 131 | default: 132 | return; 133 | } 134 | #endif 135 | 136 | (void)&if_nbr; 137 | } 138 | --------------------------------------------------------------------------------