Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
simplelink.c File Reference
#include "simplelink_log.h"
#include <zephyr.h>
#include <kernel.h>
#include <device.h>
#include <net/net_if.h>
#include <net/wifi_mgmt.h>
#include <net/net_offload.h>
#include <ti/drivers/net/wifi/wlan.h>
#include "simplelink_support.h"
#include "simplelink_sockets.h"

Data Structures

struct  simplelink_data
 

Macros

#define SCAN_RETRY_DELAY   2000 /* ms */
 
#define FC_TIMEOUT   K_SECONDS(CONFIG_WIFI_SIMPLELINK_FAST_CONNECT_TIMEOUT)
 
#define SIMPLELINK_IPV4   0x1
 
#define SIMPLELINK_IPV6   0x2
 

Functions

 LOG_MODULE_REGISTER (wifi_simplelink)
 
static K_SEM_DEFINE (ip_acquired, 0, 1)
 
static void simplelink_wifi_cb (uint32_t event, struct sl_connect_state *conn)
 
static void simplelink_scan_work_handler (struct k_work *work)
 
static int simplelink_mgmt_scan (const struct device *dev, scan_result_cb_t cb)
 
static int simplelink_mgmt_connect (const struct device *dev, struct wifi_connect_req_params *params)
 
static int simplelink_mgmt_disconnect (const struct device *dev)
 
static int simplelink_dummy_get (sa_family_t family, enum net_sock_type type, enum net_ip_protocol ip_proto, struct net_context **context)
 
static void simplelink_iface_init (struct net_if *iface)
 
static int simplelink_init (const struct device *dev)
 
 NET_DEVICE_OFFLOAD_INIT (simplelink, CONFIG_WIFI_SIMPLELINK_NAME, simplelink_init, NULL, &simplelink_data, NULL, CONFIG_WIFI_INIT_PRIORITY, &simplelink_api, CONFIG_WIFI_SIMPLELINK_MAX_PACKET_SIZE)
 

Variables

static struct simplelink_data simplelink_data
 
static struct net_offload simplelink_offload
 
static const struct net_wifi_mgmt_offload simplelink_api
 

Macro Definition Documentation

◆ FC_TIMEOUT

#define FC_TIMEOUT   K_SECONDS(CONFIG_WIFI_SIMPLELINK_FAST_CONNECT_TIMEOUT)

◆ SCAN_RETRY_DELAY

#define SCAN_RETRY_DELAY   2000 /* ms */

◆ SIMPLELINK_IPV4

#define SIMPLELINK_IPV4   0x1

◆ SIMPLELINK_IPV6

#define SIMPLELINK_IPV6   0x2

Function Documentation

◆ K_SEM_DEFINE()

static K_SEM_DEFINE ( ip_acquired  ,
,
 
)
static

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( wifi_simplelink  )

Copyright (c) 2018 Texas Instruments, Incorporated

SPDX-License-Identifier: Apache-2.0

◆ NET_DEVICE_OFFLOAD_INIT()

NET_DEVICE_OFFLOAD_INIT ( simplelink  ,
CONFIG_WIFI_SIMPLELINK_NAME  ,
simplelink_init  ,
NULL  ,
simplelink_data,
NULL  ,
CONFIG_WIFI_INIT_PRIORITY  ,
simplelink_api,
CONFIG_WIFI_SIMPLELINK_MAX_PACKET_SIZE   
)

◆ simplelink_dummy_get()

static int simplelink_dummy_get ( sa_family_t  family,
enum net_sock_type  type,
enum net_ip_protocol  ip_proto,
struct net_context **  context 
)
static

◆ simplelink_iface_init()

static void simplelink_iface_init ( struct net_if iface)
static

◆ simplelink_init()

static int simplelink_init ( const struct device dev)
static

◆ simplelink_mgmt_connect()

static int simplelink_mgmt_connect ( const struct device dev,
struct wifi_connect_req_params params 
)
static

◆ simplelink_mgmt_disconnect()

static int simplelink_mgmt_disconnect ( const struct device dev)
static

◆ simplelink_mgmt_scan()

static int simplelink_mgmt_scan ( const struct device dev,
scan_result_cb_t  cb 
)
static

◆ simplelink_scan_work_handler()

static void simplelink_scan_work_handler ( struct k_work work)
static

◆ simplelink_wifi_cb()

static void simplelink_wifi_cb ( uint32_t  event,
struct sl_connect_state conn 
)
static

Variable Documentation

◆ simplelink_api

const struct net_wifi_mgmt_offload simplelink_api
static
Initial value:
= {
.iface_api.init = simplelink_iface_init,
}

◆ simplelink_data

◆ simplelink_offload

struct net_offload simplelink_offload
static
Initial value:
= {
.bind = NULL,
.listen = NULL,
.connect = NULL,
.accept = NULL,
.send = NULL,
.sendto = NULL,
.recv = NULL,
.put = NULL,
}