chore: sdk compiles almost w/o warnings?

This commit is contained in:
2024-12-17 03:13:08 +06:00
parent 31efbc726f
commit 7c7b36a6b3
55 changed files with 658 additions and 514 deletions

View File

@@ -9,6 +9,7 @@
#include "utils/includes.h"
#include "utils/common.h"
#include "tls.h"
#include "wifi_eap_config.h"
#define DEBUG_LEVEL 0 // For debug: 5

View File

@@ -78,14 +78,14 @@ void judge_station_disconnect(void)
}
}
void eap_disconnected_hdl(char *buf, int buf_len, int flags, void* handler_user_data){
// printf("disconnected\n");
wifi_unreg_event_handler(WIFI_EVENT_EAPOL_RECVD, eap_eapol_recvd_hdl);
wifi_unreg_event_handler(WIFI_EVENT_DISCONNECT, eap_disconnected_hdl);
eap_peer_unregister_methods();
eap_sm_deinit();
//reset_config();
}
// void eap_disconnected_hdl(char *buf, int buf_len, int flags, void* handler_user_data){
// // printf("disconnected\n");
// wifi_unreg_event_handler(WIFI_EVENT_EAPOL_RECVD, eap_eapol_recvd_hdl);
// wifi_unreg_event_handler(WIFI_EVENT_DISCONNECT, eap_disconnected_hdl);
// eap_peer_unregister_methods();
// eap_sm_deinit();
// //reset_config();
// }
/*
void eap_config(void){

View File

@@ -0,0 +1,69 @@
#ifndef __WIFI_EAP_CONFIG_H
#define __WIFI_EAP_CONFIG_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include "basic_types.h"
// Function declarations
/**
* @brief Set the EAP phase flag
* @param is_trigger_eap Flag value to set
*/
void set_eap_phase(unsigned char is_trigger_eap);
/**
* @brief Get the current EAP phase
* @return Current EAP phase value
*/
int get_eap_phase(void);
/**
* @brief Get the current EAP method
* @return Current EAP method value
*/
int get_eap_method(void);
/**
* @brief Reset all EAP configuration parameters to NULL
*/
void reset_config(void);
/**
* @brief Start the EAP authentication process
* @param method The EAP method to use ("peap", "tls", or "ttls")
* @return 0 on success, -1 on failure
*/
int eap_start(char *method);
/**
* @brief Handle auto-reconnection for EAP
* @param method_id The EAP method ID to use for reconnection
*/
void eap_autoreconnect_hdl(u8 method_id);
/**
* @brief Initialize EAP certificates
* @return 0 on success, -1 on failure
*/
int eap_cert_init(void);
/**
* @brief Free client certificate resources
*/
void eap_client_cert_free(void);
/**
* @brief Free server certificate resources
*/
void eap_server_cert_free(void);
#ifdef __cplusplus
}
#endif
#endif /* __WIFI_EAP_CONFIG_H */