Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
#include <stdlib.h>
#include <string.h>
#include "simplelink_log.h"
#include <zephyr.h>
#include <stdint.h>
#include <ti/drivers/net/wifi/simplelink.h>
#include <ti/net/slnetif.h>
#include <ti/net/slnetutils.h>
#include <ti/drivers/net/wifi/slnetifwifi.h>
#include <CC3220SF_LAUNCHXL.h>
#include "simplelink_support.h"
Data Structures | |
struct | nwp_status |
Macros | |
#define | SET_STATUS_BIT(status, bit) {status |= (1 << (bit)); } |
#define | CLR_STATUS_BIT(status, bit) {status &= ~(1 << (bit)); } |
#define | GET_STATUS_BIT(status, bit) (0 != (status & (1 << (bit)))) |
#define | SL_STOP_TIMEOUT (200) |
#define | ASSERT_ON_ERROR(ret, e) __ASSERT(ret >= 0, e) |
#define | DEVICE_ERROR "See \"DEVICE ERRORS CODES\" in SimpleLink errors.h" |
#define | WLAN_ERROR "See \"WLAN ERRORS CODES\" in SimpleLink errors.h" |
#define | NETAPP_ERROR "See \"NETAPP ERRORS CODES\" in SimpleLink errors.h" |
#define | CHANNEL_MASK_ALL (0x1FFF) |
#define | RSSI_TH_MAX (-95) |
#define | SLNET_IF_WIFI_PRIO (5) |
#define | SLNET_IF_WIFI_NAME "CC32xx" |
Enumerations | |
enum | status_bits { STATUS_BIT_NWP_INIT = 0 , STATUS_BIT_CONNECTION , STATUS_BIT_IP_LEASED , STATUS_BIT_IP_ACQUIRED , STATUS_BIT_IPV6_ACQUIRED } |
Functions | |
LOG_MODULE_DECLARE (wifi_simplelink) | |
static int32_t | configure_simplelink (void) |
void | SimpleLinkWlanEventHandler (SlWlanEvent_t *wlan_event) |
SimpleLinkWlanEventHandler. More... | |
void | SimpleLinkNetAppEventHandler (SlNetAppEvent_t *netapp_event) |
SimpleLinkNetAppEventHandler. More... | |
void | SimpleLinkGeneralEventHandler (SlDeviceEvent_t *dev_event) |
SimpleLinkGeneralEventHandler. More... | |
void | SimpleLinkFatalErrorEventHandler (SlDeviceFatal_t *fatal_err_event) |
SimpleLinkFatalErrorEventHandler. More... | |
void | SimpleLinkSockEventHandler (SlSockEvent_t *psock) |
void | SimpleLinkHttpServerEventHandler (SlNetAppHttpServerEvent_t *http_event, SlNetAppHttpServerResponse_t *http_resp) |
void | SimpleLinkNetAppRequestEventHandler (SlNetAppRequest_t *netapp_request, SlNetAppResponse_t *netapp_response) |
void | SimpleLinkNetAppRequestMemFreeEventHandler (uint8_t *buffer) |
Variables | |
struct sl_connect_state | sl_conn |
static struct nwp_status | nwp |
static SlNetIf_Config_t | slnetifwifi_config_zephyr |
#define CHANNEL_MASK_ALL (0x1FFF) |
#define CLR_STATUS_BIT | ( | status, | |
bit | |||
) | {status &= ~(1 << (bit)); } |
#define DEVICE_ERROR "See \"DEVICE ERRORS CODES\" in SimpleLink errors.h" |
#define GET_STATUS_BIT | ( | status, | |
bit | |||
) | (0 != (status & (1 << (bit)))) |
#define NETAPP_ERROR "See \"NETAPP ERRORS CODES\" in SimpleLink errors.h" |
#define RSSI_TH_MAX (-95) |
#define SET_STATUS_BIT | ( | status, | |
bit | |||
) | {status |= (1 << (bit)); } |
#define SL_STOP_TIMEOUT (200) |
#define SLNET_IF_WIFI_NAME "CC32xx" |
#define SLNET_IF_WIFI_PRIO (5) |
#define WLAN_ERROR "See \"WLAN ERRORS CODES\" in SimpleLink errors.h" |
enum status_bits |
LOG_MODULE_DECLARE | ( | wifi_simplelink | ) |
void SimpleLinkFatalErrorEventHandler | ( | SlDeviceFatal_t * | fatal_err_event | ) |
SimpleLinkFatalErrorEventHandler.
This handler gets called whenever a driver error occurs requiring restart of the device in order to recover.
void SimpleLinkGeneralEventHandler | ( | SlDeviceEvent_t * | dev_event | ) |
SimpleLinkGeneralEventHandler.
This handler gets called whenever a general error is reported by the NWP / Host driver. Since these errors are not fatal, the application can handle them.
void SimpleLinkHttpServerEventHandler | ( | SlNetAppHttpServerEvent_t * | http_event, |
SlNetAppHttpServerResponse_t * | http_resp | ||
) |
void SimpleLinkNetAppEventHandler | ( | SlNetAppEvent_t * | netapp_event | ) |
SimpleLinkNetAppEventHandler.
This handler gets called whenever a Netapp event is reported by the host driver / NWP.
void SimpleLinkNetAppRequestEventHandler | ( | SlNetAppRequest_t * | netapp_request, |
SlNetAppResponse_t * | netapp_response | ||
) |
void SimpleLinkSockEventHandler | ( | SlSockEvent_t * | psock | ) |
void SimpleLinkWlanEventHandler | ( | SlWlanEvent_t * | wlan_event | ) |
SimpleLinkWlanEventHandler.
This handler gets called whenever a WLAN event is reported by the host driver / NWP.
|
static |
struct sl_connect_state sl_conn |
|
static |