MT7687 API Reference  LinkIt SDK v4
smt_api.h
Go to the documentation of this file.
1 /* Copyright Statement:
2  *
3  * (C) 2005-2016 MediaTek Inc. All rights reserved.
4  *
5  * This software/firmware and related documentation ("MediaTek Software") are
6  * protected under relevant copyright laws. The information contained herein
7  * is confidential and proprietary to MediaTek Inc. ("MediaTek") and/or its licensors.
8  * Without the prior written permission of MediaTek and/or its licensors,
9  * any reproduction, modification, use or disclosure of MediaTek Software,
10  * and information contained herein, in whole or in part, shall be strictly prohibited.
11  * You may only use, reproduce, modify, or distribute (as applicable) MediaTek Software
12  * if you have agreed to and been bound by the applicable license agreement with
13  * MediaTek ("License Agreement") and been granted explicit permission to do so within
14  * the License Agreement ("Permitted User"). If you are not a Permitted User,
15  * please cease any access or use of MediaTek Software immediately.
16  * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
17  * THAT MEDIATEK SOFTWARE RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES
18  * ARE PROVIDED TO RECEIVER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
19  * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
21  * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
22  * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
23  * SUPPLIED WITH MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
24  * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
25  * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
26  * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
27  * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
28  * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
29  * CUMULATIVE LIABILITY WITH RESPECT TO MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
30  * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE MEDIATEK SOFTWARE AT ISSUE,
31  * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
32  * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
33  */
34 
102 #ifndef __SMTCN_API_H__
103 #define __SMTCN_API_H__
104 #include <stdint.h>
105 #include "wifi_api.h"
106 
107 #ifdef __cplusplus
108 extern "C" {
109 #endif
110 
117 typedef enum {
122 
125 typedef enum {
129 
141 typedef void (* wifi_smart_connection_callback_t) (wifi_smart_connection_event_t event, void *data);
142 
143 
153 wifi_smart_connection_status_t wifi_smart_connection_init (const uint8_t *key, const uint8_t key_length, wifi_smart_connection_callback_t callback);
154 
160 void wifi_smart_connection_deinit (void);
161 
172 
185 wifi_smart_connection_status_t wifi_smart_connection_get_result (uint8_t *ssid, uint8_t *ssid_length,
186  uint8_t *password, uint8_t *password_length,
187  uint8_t *tlv_data, uint8_t *tlv_data_length);
188 
189 
196 
197 #ifdef __cplusplus
198 }
199 #endif
200 
204 #endif
void(* wifi_smart_connection_callback_t)(wifi_smart_connection_event_t event, void *data)
This callback function should be registered through the wifi_smart_connection_init(), and will be called when a Smart Connection event is received.
Definition: smt_api.h:141
Wi-Fi processor configuration / settings for the STA operations.
Locked channel event.
Definition: smt_api.h:118
void wifi_smart_connection_deinit(void)
This function de-initializes the Smart Connection and releases the resources.
wifi_smart_connection_status_t
Return values for the Smart Connection API.
Definition: smt_api.h:125
wifi_smart_connection_status_t wifi_smart_connection_start(uint16_t timeout_seconds)
This function starts the Smart Connection.
wifi_smart_connection_event_t
Smart Connection event.
Definition: smt_api.h:117
wifi_smart_connection_status_t wifi_smart_connection_init(const uint8_t *key, const uint8_t key_length, wifi_smart_connection_callback_t callback)
This function registers a callback function to establish the Smart Connection.
The operation is successful.
Definition: smt_api.h:127
Smart Connection timeout.
Definition: smt_api.h:120
wifi_smart_connection_status_t wifi_smart_connection_stop(void)
This function is called to inform smart connection task of exiting flag and then the task will automa...
The operation failed.
Definition: smt_api.h:126
The Smart Connection has finished.
Definition: smt_api.h:119
wifi_smart_connection_status_t wifi_smart_connection_get_result(uint8_t *ssid, uint8_t *ssid_length, uint8_t *password, uint8_t *password_length, uint8_t *tlv_data, uint8_t *tlv_data_length)
This function gets the Smart Connection result.