Copyright (c) 2019 Microchip Technology Inc.
and its subsidiaries.
#include "asf.h"
#include <stdio.h>
#include <string.h>
#include "lwip/tcpip.h"
#include "lwip/dhcp.h"
#include "lwip/autoip.h"
#include "netif/etharp.h"
#include "net_init.h"
#include "driver/include/m2m_wifi.h"
#include "driver/include/m2m_types.h"
#include "tinyservices.h"
#include "conf_tinyservices.h"
Macros | |
#define | NET_S_AUTOIP_RUNNING 0x4 |
#define | NET_S_DHCP_RUNNING 0x2 |
#define | NET_S_DHCP_SVR_RUNNING 0x8 |
#define | NET_S_NET_UP 0x1 |
Functions | |
void | app_network_down (void) |
void | app_network_up (uint8_t *ipv4_addr, uint8_t *ipv4_mask, uint8_t *ipv6_addr) |
void | net_add_winc_netif (void) |
int | net_in_tcpip_task (void) |
void | net_init (void) |
void | net_interface_down (uint32_t net_if) |
static void | net_interface_down_imp (uint32_t net_if) |
void | net_interface_up (uint32_t net_if) |
static void | net_interface_up_imp (uint32_t net_if) |
void | net_remove_winc_netif (void) |
void | net_set_mode (uint32_t net_if, uint32_t mode) |
int | random_number (void) |
void | socket_in_tcpip_task (void) |
static void | status_callback (struct netif *netif) |
static void | tcpip_init_done (void *arg) |
err_t | winc_netif_init (struct netif *netif) |
Initialize lwIP network interface. More... | |
Variables | |
static uint32_t | net_mode_c |
static uint32_t | net_mode_sta |
static xSemaphoreHandle | net_start_sem |
static int | net_started |
static uint32_t | net_state_c |
static uint32_t | net_state_sta |
static xTaskHandle | net_tcpip_task |
struct netif | winc_netif_c_mode |
The netif for the winc1000 in concurrent (AP or WiFi Direct) mode. More... | |
struct netif | winc_netif_sta |
The netif for the winc1000 in station mode. More... | |
#define NET_S_AUTOIP_RUNNING 0x4 |
Referenced by net_interface_down_imp(), and net_interface_up_imp().
#define NET_S_DHCP_RUNNING 0x2 |
Referenced by net_interface_down_imp(), net_interface_up_imp(), and net_set_mode().
#define NET_S_DHCP_SVR_RUNNING 0x8 |
Referenced by net_interface_down_imp(), and net_interface_up_imp().
#define NET_S_NET_UP 0x1 |
Referenced by net_interface_down_imp(), net_interface_up_imp(), and net_set_mode().
void app_network_down | ( | void | ) |
void app_network_up | ( | uint8_t * | ipv4_addr, |
uint8_t * | ipv4_mask, | ||
uint8_t * | ipv6_addr | ||
) |
void net_add_winc_netif | ( | void | ) |
References ip_addr::addr, NET_IF_C, NET_MODE_AP, NET_MODE_USE_DHCP_SVR, net_set_mode(), netif_add(), netif_set_default(), status_callback(), tcpip_input(), winc_netif_c_mode, winc_netif_init(), and winc_netif_sta.
Referenced by os_m2m_wifi_init_imp().
int net_in_tcpip_task | ( | void | ) |
References net_tcpip_task, and xTaskGetCurrentTaskHandle().
void net_init | ( | void | ) |
References net_started, tcpip_init(), tcpip_init_done(), vSemaphoreCreateBinary, vSemaphoreDelete, and xSemaphoreTake.
void net_interface_down | ( | uint32_t | net_if | ) |
References net_interface_down_imp().
|
static |
References NET_IF_STA, NET_MODE_AP, net_mode_c, net_mode_sta, NET_MODE_USE_DHCP, NET_S_AUTOIP_RUNNING, NET_S_DHCP_RUNNING, NET_S_DHCP_SVR_RUNNING, NET_S_NET_UP, net_state_c, net_state_sta, netif_set_down(), netif_set_link_down(), winc_netif_c_mode, and winc_netif_sta.
Referenced by net_interface_down().
void net_interface_up | ( | uint32_t | net_if | ) |
References net_interface_up_imp().
|
static |
References NET_IF_STA, net_mode_c, net_mode_sta, NET_MODE_USE_DHCP, NET_MODE_USE_DHCP_SVR, NET_MODE_USE_LINK_LOCAL, NET_S_AUTOIP_RUNNING, NET_S_DHCP_RUNNING, NET_S_DHCP_SVR_RUNNING, NET_S_NET_UP, net_state_c, net_state_sta, netif_set_link_up(), netif_set_up(), winc_netif_c_mode, and winc_netif_sta.
Referenced by net_interface_up().
void net_remove_winc_netif | ( | void | ) |
References netif_remove(), winc_netif_c_mode, and winc_netif_sta.
void net_set_mode | ( | uint32_t | net_if, |
uint32_t | mode | ||
) |
References NET_IF_STA, net_mode_c, net_mode_sta, NET_MODE_USE_DHCP, NET_S_DHCP_RUNNING, NET_S_NET_UP, net_state_sta, wilc_netif_sta, and winc_netif_sta.
int random_number | ( | void | ) |
void socket_in_tcpip_task | ( | void | ) |
|
static |
References netif::ip_addr, and netif_is_up.
|
static |
References net_tcpip_task, xSemaphoreGive, and xTaskGetCurrentTaskHandle().
Referenced by net_init().
Initialize lwIP network interface.
References ERR_OK, IFNAME0, IFNAME1, netif::linkoutput, netif::name, NET_LINK_SPEED, NETIF_INIT_SNMP, NULL, netif::output, snmp_ifType_ethernet_csmacd, netif::state, winc_netif_low_level_init(), and winc_netif_tx().
Referenced by net_add_winc_netif().
|
static |
Referenced by net_interface_down_imp(), net_interface_up_imp(), and net_set_mode().
|
static |
Referenced by net_interface_down_imp(), net_interface_up_imp(), and net_set_mode().
|
static |
|
static |
Referenced by net_init().
|
static |
Referenced by net_interface_down_imp(), and net_interface_up_imp().
|
static |
Referenced by net_interface_down_imp(), net_interface_up_imp(), and net_set_mode().
|
static |
Referenced by net_in_tcpip_task(), and tcpip_init_done().
struct netif winc_netif_c_mode |
The netif for the winc1000 in concurrent (AP or WiFi Direct) mode.
Referenced by net_add_winc_netif(), net_interface_down_imp(), net_interface_up_imp(), and net_remove_winc_netif().
struct netif winc_netif_sta |
The netif for the winc1000 in station mode.
Referenced by net_add_winc_netif(), net_interface_down_imp(), net_interface_up_imp(), net_remove_winc_netif(), net_set_mode(), winc_netif_rx_callback(), and winc_netif_tx().