Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
simplelink_support.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018, Texas Instruments Incorporated
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*
6
*/
7
8
#ifndef ZEPHYR_DRIVERS_WIFI_SIMPLELINK_SIMPLELINK_SUPPORT_H_
9
#define ZEPHYR_DRIVERS_WIFI_SIMPLELINK_SIMPLELINK_SUPPORT_H_
10
11
#include <
net/wifi_mgmt.h
>
12
13
#ifdef __cplusplus
14
extern
"C"
{
15
#endif
16
17
#define SSID_LEN_MAX (32)
18
#define BSSID_LEN_MAX (6)
19
20
/* Define ID for simplelink_wifi_cb to not conflict with WLAN event IDs: */
21
#define SIMPLELINK_WIFI_CB_IPACQUIRED \
22
(SL_WLAN_EVENT_MAX + SL_NETAPP_EVENT_IPV4_ACQUIRED)
23
#define SIMPLELINK_WIFI_CB_IPV6ACQUIRED \
24
(SL_WLAN_EVENT_MAX + SL_NETAPP_EVENT_IPV6_ACQUIRED)
25
26
struct
sl_connect_state
{
27
uint32_t
gateway_ip
;
28
uint8_t
ssid
[
SSID_LEN_MAX
+ 1];
29
uint8_t
bssid
[
BSSID_LEN_MAX
];
30
uint32_t
ip_addr
;
31
uint32_t
sta_ip
;
32
uint32_t
ipv6_addr
[4];
33
int16_t
error
;
34
};
35
36
/* Callback from SimpleLink Event Handlers: */
37
typedef
void
(*
simplelink_wifi_cb_t
)(
uint32_t
mgmt_event,
38
struct
sl_connect_state
*conn);
39
40
extern
int
z_simplelink_start_scan(
void
);
41
extern
void
z_simplelink_get_scan_result(
int
index
,
42
struct
wifi_scan_result
*scan_result);
43
extern
void
z_simplelink_get_mac(
unsigned
char
*mac);
44
extern
int
z_simplelink_init(
simplelink_wifi_cb_t
wifi_cb);
45
extern
int
z_simplelink_connect(
struct
wifi_connect_req_params
*params);
46
extern
int
z_simplelink_disconnect(
void
);
47
48
#ifdef __cplusplus
49
}
50
#endif
51
56
#endif
/* ZEPHYR_DRIVERS_WIFI_SIMPLELINK_SIMPLELINK_SUPPORT_H_ */
index
ZTEST_BMEM int index[(3)]
Definition:
main.c:32
void
void
Definition:
eswifi_shell.c:15
simplelink_wifi_cb_t
void(* simplelink_wifi_cb_t)(uint32_t mgmt_event, struct sl_connect_state *conn)
Definition:
simplelink_support.h:37
BSSID_LEN_MAX
#define BSSID_LEN_MAX
Definition:
simplelink_support.h:18
SSID_LEN_MAX
#define SSID_LEN_MAX
Definition:
simplelink_support.h:17
uint32_t
__UINT32_TYPE__ uint32_t
Definition:
stdint.h:60
uint8_t
__UINT8_TYPE__ uint8_t
Definition:
stdint.h:58
int16_t
__INT16_TYPE__ int16_t
Definition:
stdint.h:43
sl_connect_state
Definition:
simplelink_support.h:26
sl_connect_state::ssid
uint8_t ssid[(32)+1]
Definition:
simplelink_support.h:28
sl_connect_state::ip_addr
uint32_t ip_addr
Definition:
simplelink_support.h:30
sl_connect_state::gateway_ip
uint32_t gateway_ip
Definition:
simplelink_support.h:27
sl_connect_state::ipv6_addr
uint32_t ipv6_addr[4]
Definition:
simplelink_support.h:32
sl_connect_state::error
int16_t error
Definition:
simplelink_support.h:33
sl_connect_state::bssid
uint8_t bssid[(6)]
Definition:
simplelink_support.h:29
sl_connect_state::sta_ip
uint32_t sta_ip
Definition:
simplelink_support.h:31
wifi_connect_req_params
Definition:
wifi_mgmt.h:96
wifi_scan_result
Definition:
wifi_mgmt.h:87
wifi_mgmt.h
WiFi L2 stack public header.
drivers
wifi
simplelink
simplelink_support.h
Generated on Sun Oct 9 2022 09:21:56 for Zephyr API Documentation by
1.9.4