Update and re-organise the sdk internal definitions. (#267)
This commit is contained in:
parent
2bc87e9414
commit
e48910ea3b
9 changed files with 514 additions and 100 deletions
|
@ -6,26 +6,58 @@
|
|||
Copyright (C) 2015 Espressif Systems. Derived from MIT Licensed SDK libraries.
|
||||
BSD Licensed as described in the file LICENSE.
|
||||
*/
|
||||
#include "sdk_internal.h"
|
||||
|
||||
#ifndef _ESPLIBS_LIBMAIN_H
|
||||
#define _ESPLIBS_LIBMAIN_H
|
||||
|
||||
#include "sdk_internal.h"
|
||||
|
||||
// app_main.o
|
||||
extern uint8_t sdk_user_init_flag;
|
||||
extern struct sdk_info_st sdk_info;
|
||||
|
||||
// ets_timer.o
|
||||
extern uint32_t sdk_debug_timer;
|
||||
extern void *sdk_debug_timerfn;
|
||||
void sdk_ets_timer_init(void);
|
||||
|
||||
// misc.c
|
||||
int sdk_os_get_cpu_frequency(void);
|
||||
|
||||
/* Don't call this function from user code, it doesn't change the CPU
|
||||
* speed. Call sdk_system_update_cpu_freq() instead. */
|
||||
void sdk_os_update_cpu_frequency(int freq);
|
||||
|
||||
// user_interface.c
|
||||
// os_cpu_a.o
|
||||
|
||||
// spi_flash.o
|
||||
extern sdk_flashchip_t sdk_flashchip;
|
||||
sdk_SpiFlashOpResult sdk_SPIRead(uint32_t src_addr, uint32_t *des_addr, uint32_t size);
|
||||
sdk_SpiFlashOpResult sdk_SPIWrite(uint32_t des_addr, uint32_t *src_addr, uint32_t size);
|
||||
|
||||
// timers.o
|
||||
void sdk_os_timer_setfn(ETSTimer *ptimer, ETSTimerFunc *pfunction, void *parg);
|
||||
void sdk_os_timer_arm(ETSTimer *ptimer, uint32_t milliseconds, bool repeat_flag);
|
||||
void sdk_os_timer_disarm(ETSTimer *ptimer);
|
||||
|
||||
// uart.o
|
||||
void sdk_uart_div_modify(uint32_t uart_no, uint32_t new_divisor);
|
||||
|
||||
// user_interface.o
|
||||
extern enum sdk_dhcp_status sdk_dhcpc_flag; // uint8_t in the sdk
|
||||
extern bool sdk_cpu_overclock;
|
||||
extern struct sdk_rst_info sdk_rst_if;
|
||||
extern sdk_wifi_promiscuous_cb_t sdk_promiscuous_cb;
|
||||
void sdk_system_restart_in_nmi(void);
|
||||
int sdk_system_get_test_result(void);
|
||||
void sdk_wifi_param_save_protect(struct sdk_g_ic_saved_st *data);
|
||||
bool sdk_system_overclock(void);
|
||||
bool sdk_system_restoreclock(void);
|
||||
uint32_t sdk_system_relative_time(uint32_t reltime);
|
||||
uint32_t sdk_system_get_checksum(uint8_t *, uint32_t);
|
||||
void sdk_wifi_softap_cacl_mac(uint8_t *, uint8_t *);
|
||||
void sdk_wifi_softap_set_default_ssid(void);
|
||||
|
||||
// xtensa_context.o
|
||||
|
||||
#endif /* _ESPLIBS_LIBMAIN_H */
|
||||
|
||||
|
|
|
@ -6,17 +6,90 @@
|
|||
Copyright (C) 2015 Espressif Systems. Derived from MIT Licensed SDK libraries.
|
||||
BSD Licensed as described in the file LICENSE.
|
||||
*/
|
||||
|
||||
#ifndef _ESPLIBS_LIBNET80211_H
|
||||
#define _ESPLIBS_LIBNET80211_H
|
||||
|
||||
// Defined in wl_cnx.o
|
||||
#include "sdk_internal.h"
|
||||
|
||||
// ieee80211_action.o
|
||||
|
||||
// ieee80211_crypto_ccmp.o
|
||||
extern uint32_t sdk_ccmp;
|
||||
|
||||
// ieee80211_crypto.o
|
||||
|
||||
// ieee80211_crypto_tkip.o
|
||||
extern uint32_t sdk_tkip;
|
||||
|
||||
// ieee80211_crypto_wep.o
|
||||
extern uint32_t sdk_wep;
|
||||
|
||||
// ieee80211_ets.o
|
||||
struct esf_buf *sdk_ieee80211_getmgtframe(void **arg0, uint32_t arg1, uint32_t arg2);
|
||||
|
||||
// ieee80211_hostap.o
|
||||
extern uint8_t sdk_TmpSTAAPCloseAP;
|
||||
extern uint8_t sdk_PendFreeBcnEb;
|
||||
void sdk_ieee80211_hostap_attach(struct sdk_g_ic_st *);
|
||||
void sdk_hostap_handle_timer(struct sdk_netif_conninfo *cnx_node);
|
||||
bool sdk_wifi_softap_start();
|
||||
bool sdk_wifi_softap_stop();
|
||||
|
||||
// ieee80211_ht.o
|
||||
|
||||
// ieee80211_input.o
|
||||
void sdk_ieee80211_deliver_data(struct sdk_g_ic_netif_info *netif_info, struct esf_buf *esf_buf);
|
||||
// The esf_buf is stored in the pbuf->eb slot.
|
||||
void sdk_ieee80211_deliver_data(struct sdk_g_ic_netif_info *netif_info, struct esf_buf *eb);
|
||||
|
||||
// ieee80211.o
|
||||
extern struct sdk_g_ic_st sdk_g_ic;
|
||||
extern uint32_t sdk_xieee80211Queue;
|
||||
void sdk_ieee80211_ifattach(struct sdk_g_ic_st *, uint8_t *);
|
||||
void sdk_wifi_mode_set(uint8_t);
|
||||
|
||||
// ieee80211_output.o
|
||||
int8_t sdk_ieee80211_output_pbuf(struct netif *ifp, struct pbuf* pb);
|
||||
void sdk_ieee80211_send_mgmt(struct sdk_g_ic_netif_info *info, int, int);
|
||||
struct esf_buf *sdk_ieee80211_beacon_alloc(struct sdk_g_ic_netif_info *, uint32_t *);
|
||||
|
||||
// ieee80211_phy.o
|
||||
uint32_t sdk_ieee80211_phy_type_get();
|
||||
void sdk_ieee80211_phy_init(enum sdk_phy_mode);
|
||||
|
||||
// ieee80211_power.o
|
||||
void sdk_ieee80211_pwrsave(void *, struct esf_buf *b);
|
||||
|
||||
// ieee80211_proto.o
|
||||
extern uint8_t sdk_ieee80211_addr_bcast[6];
|
||||
|
||||
// ieee80211_scan.o
|
||||
extern uint32_t sdk_ugScanStruct; // A struct.
|
||||
extern uint8_t sdk_auth_type;
|
||||
extern uint16_t sdk_scannum;
|
||||
void sdk_scan_cancel();
|
||||
|
||||
// ieee80211_sta.o
|
||||
void sdk_ieee80211_sta_new_state(struct sdk_g_ic_st *, int, int);
|
||||
void sdk_sta_status_set(int status);
|
||||
bool sdk_wifi_station_start();
|
||||
bool sdk_wifi_station_stop();
|
||||
|
||||
// wl_chm.o
|
||||
void sdk_chm_set_current_channel(uint32_t *);
|
||||
int sdk_ieee80211_chan2ieee(int *);
|
||||
int sdk_chm_check_same_channel();
|
||||
|
||||
// wl_cnx.o
|
||||
extern ETSTimer sdk_sta_con_timer;
|
||||
|
||||
// Defined in ieee80211_sta.o: .irom0.text+0xcc4
|
||||
bool sdk_wifi_station_stop(void);
|
||||
|
||||
// Defined in ieee80211_hostap.o: .irom0.text+0x1184
|
||||
bool sdk_wifi_softap_stop(void);
|
||||
extern void *sdk_g_cnx_probe_rc_list_cb;
|
||||
void sdk_cnx_sta_leave(struct sdk_g_ic_netif_info *netif_info, void *);
|
||||
void *sdk_cnx_node_search(uint8_t mac[6]);
|
||||
void sdk_cnx_node_leave(struct sdk_g_ic_netif_info *netif, struct sdk_netif_conninfo *conn);
|
||||
void sdk_cnx_rc_update_state_metric(void *, int, int);
|
||||
void sdk_cnx_remove_rc(void *);
|
||||
void sdk_cnx_attach(struct sdk_g_ic_st *);
|
||||
|
||||
#endif /* _ESPLIBS_LIBNET80211_H */
|
||||
|
||||
|
|
|
@ -9,8 +9,57 @@
|
|||
#ifndef _ESPLIBS_LIBPHY_H
|
||||
#define _ESPLIBS_LIBPHY_H
|
||||
|
||||
// Defined in phy_chip_v6_ana.o: .irom0.text+0x12d8
|
||||
#include "sdk_internal.h"
|
||||
|
||||
// phy_chip_v5_ana_romfunc.o
|
||||
|
||||
// phy_chip_v5_cal_romfunc.o
|
||||
|
||||
// phy_chip_v5_romfunc.o
|
||||
|
||||
// phy_chip_v6_ana.o
|
||||
uint32_t sdk_test_tout(bool);
|
||||
uint32_t sdk_readvdd33();
|
||||
|
||||
// phy_chip_v6_cal.o
|
||||
extern uint16_t sdk_loop_pwctrl_pwdet_error_accum_high_power;
|
||||
extern uint8_t sdk_tx_pwctrl_pk_num;
|
||||
extern uint8_t sdk_loop_pwctrl_correct_atten_high_power;
|
||||
extern uint8_t sdk_tx_pwctrl_set_chan_flag;
|
||||
extern uint8_t sdk_rxiq_cover_fail_num;
|
||||
|
||||
// phy_chip_v6.o
|
||||
extern uint16_t sdk_tx_rf_ana_gain;
|
||||
extern uint32_t sdk_rxiq_compute_num;
|
||||
extern uint8_t sdk_rxdc_init_flag;
|
||||
extern uint32_t sdk_check_result;
|
||||
extern uint32_t sdk_chip6_sleep_params;
|
||||
extern uint8_t sdk_chip6_phy_init_ctrl;
|
||||
extern uint32_t sdk_phy_freq_offset;
|
||||
extern uint8_t sdk_do_pwctrl_flag;
|
||||
extern uint8_t sdk_pwctrl_debug;
|
||||
extern uint8_t sdk_txbk_dpdby_flag;
|
||||
extern uint8_t sdk_sw_scan_mode;
|
||||
extern uint32_t sdk_periodic_cal_dc_num;
|
||||
extern uint8_t sdk_periodic_cal_flag;
|
||||
extern uint8_t sdk_bbpll_cal_flag;
|
||||
extern uint8_t sdk_deep_sleep_en;
|
||||
int sdk_register_chipv6_phy(sdk_phy_info_t *);
|
||||
|
||||
// phy_chip_v6_unused.o
|
||||
|
||||
// phy.o
|
||||
void sdk_phy_disable_agc(void);
|
||||
void sdk_phy_enable_agc(void);
|
||||
|
||||
// phy_sleep.o
|
||||
extern uint32_t sdk_chip_version;
|
||||
extern uint8_t sdk_periodic_cal_sat;
|
||||
extern uint8_t sdk_software_slp_reject;
|
||||
extern uint8_t sdk_SDIO_slp_reject;
|
||||
extern uint8_t sdk_hardware_reject;
|
||||
void sdk_sleep_reset_analog_rtcreg_8266(void);
|
||||
|
||||
|
||||
#endif /* _ESPLIBS_LIBPHY_H */
|
||||
|
||||
|
|
|
@ -9,31 +9,67 @@
|
|||
#ifndef _ESPLIBS_LIBPP_H
|
||||
#define _ESPLIBS_LIBPP_H
|
||||
|
||||
// Located in wdev.o
|
||||
extern uint32_t sdk_WdevTimOffSet;
|
||||
#include "sdk_internal.h"
|
||||
|
||||
// Defined in pp.o: .irom0.text+0xa08
|
||||
void sdk_ppRecycleRxPkt(void *);
|
||||
// esf_buf.o
|
||||
struct esf_buf *sdk_esf_rx_buf_alloc(uint32_t n); // n must be 7.
|
||||
struct esf_buf *sdk_esf_buf_alloc(void *, uint32_t n);
|
||||
void sdk_esf_buf_recycle(struct esf_buf *buf, int);
|
||||
void sdk_esf_buf_setup(void);
|
||||
|
||||
// Defined in pm.o: .irom0.text+0x74
|
||||
// if_hwctrl.o
|
||||
extern uint8_t sdk_interface_mask;
|
||||
//extern ? sdk_if_ctrl;
|
||||
void sdk_ic_set_vif(int, int, uint8_t (*)[6], int, int);
|
||||
void sdk_ic_bss_info_update(int, uint8_t (*hwaddr)[], int, int);
|
||||
void sdk_ic_set_sta(int, int, void *, int, int, int, int, int);
|
||||
|
||||
// lmac.o
|
||||
extern uint32_t sdk_lmacConfMib;
|
||||
void sdk_lmacInit(void);
|
||||
|
||||
// mac_frame.o
|
||||
|
||||
// pm.o
|
||||
struct esf_buf *sdk_ieee80211_getmgtframe(void **arg0, uint32_t arg1, uint32_t arg2);
|
||||
void sdk_pm_attach(void);
|
||||
uint32_t sdk_pm_rtc_clock_cali_proc(void);
|
||||
|
||||
// Defined in pm.o: .irom0.text+0xb8
|
||||
void sdk_pm_set_sleep_time(uint32_t);
|
||||
|
||||
// Defined in pm.o: .irom0.text+0x1758
|
||||
uint8_t sdk_pm_is_waked(void);
|
||||
|
||||
// Defined in pm.o: .irom0.text+0x1774
|
||||
bool sdk_pm_is_open(void);
|
||||
|
||||
// Defined in pm.o: .irom0.text+0x19ac
|
||||
bool sdk_pm_post(int);
|
||||
enum sdk_sleep_type sdk_pm_get_sleep_type(void);
|
||||
void sdk_pm_set_sleep_type_from_upper(enum sdk_sleep_type);
|
||||
|
||||
// Defined in wdev.o: .irom0.text+0x450
|
||||
|
||||
// pp.o
|
||||
extern uint16_t sdk_NoiseTimerInterval;
|
||||
extern uint16_t sdk_sleep_start_wait_time;
|
||||
extern uint8_t sdk_pend_flag_noise_check;
|
||||
extern uint8_t sdk_pend_flag_periodic_cal;
|
||||
extern uint8_t sdk_dbg_stop_sw_wdt;
|
||||
extern uint8_t sdk_dbg_stop_hw_wdt;
|
||||
bool sdk_ppRegisterTxCallback(void *, int);
|
||||
bool sdk_ppTxPkt(struct esf_buf *);
|
||||
void sdk_ppRecycleRxPkt(void *);
|
||||
void sdk_pp_attach(void);
|
||||
void sdk_pp_soft_wdt_init(void);
|
||||
void sdk_pp_soft_wdt_feed();
|
||||
void sdk_pp_post(int, int);
|
||||
|
||||
// rate_control.o
|
||||
|
||||
// trc.o
|
||||
|
||||
// wdev.o
|
||||
extern uint8_t sdk_NMIIrqIsOn;
|
||||
extern uint32_t sdk_WdevTimOffSet;
|
||||
uint32_t sdk_wDev_Get_Next_TBTT();
|
||||
void sdk_wDev_Reset_TBTT();
|
||||
void sdk_wDev_SetRxPolicy(int, int, int);
|
||||
void sdk_wDevEnableRx(void);
|
||||
void sdk_wDev_Initialize(void);
|
||||
void sdk_wDev_MacTim1SetFunc(void (*func)(void));
|
||||
|
||||
// Defined in wdev.o: .text+0x4a8
|
||||
void sdk_wDev_MacTim1Arm(uint32_t);
|
||||
|
||||
#endif /* _ESPLIBS_LIBPP_H */
|
||||
|
|
80
open_esplibs/include/esplibs/libwpa.h
Normal file
80
open_esplibs/include/esplibs/libwpa.h
Normal file
|
@ -0,0 +1,80 @@
|
|||
/* Internal function declarations for Espressif SDK libpp functions.
|
||||
|
||||
These are internal-facing declarations, it is not recommended to include these headers in your program.
|
||||
(look at the headers in include/espressif/ instead and use these whenever possible.)
|
||||
|
||||
Copyright (C) 2015 Espressif Systems. Derived from MIT Licensed SDK libraries.
|
||||
BSD Licensed as described in the file LICENSE.
|
||||
*/
|
||||
#ifndef _ESPLIBS_LIBWPA_H
|
||||
#define _ESPLIBS_LIBWPA_H
|
||||
|
||||
#include "sdk_internal.h"
|
||||
|
||||
// aes-internal-dec.o
|
||||
|
||||
// aes-internal-enc.o
|
||||
|
||||
// aes-internal.o
|
||||
|
||||
// aes-unwrap.o
|
||||
|
||||
// aes-wrap.o
|
||||
|
||||
// ap_config.o
|
||||
|
||||
// Seems to be passed 3 args, but only uses 2?
|
||||
int sdk_hostapd_setup_wpa_psk(struct _unknown_softap2 *);
|
||||
|
||||
// common.o
|
||||
|
||||
// ieee802_1x.o
|
||||
|
||||
// md5-internal.o
|
||||
|
||||
// md5.o
|
||||
|
||||
// os_xtensa.o
|
||||
|
||||
// rc4.o
|
||||
|
||||
// sha1-internal.o
|
||||
|
||||
// sha1.o
|
||||
|
||||
// sha1-pbkdf2.o
|
||||
|
||||
// sta_info.o
|
||||
|
||||
// wpa_auth_ie.o
|
||||
|
||||
// wpa_auth.o
|
||||
uint32_t *sdk_wpa_init(uint8_t (*hwaddr)[], struct _unknown_wpa1 *, int);
|
||||
|
||||
// wpabuf.o
|
||||
|
||||
// wpa_common.o
|
||||
|
||||
// wpa_debug.o
|
||||
|
||||
// wpa_ie.o
|
||||
|
||||
// wpa_main
|
||||
void sdk_ppInstallKey(void *, int, int);
|
||||
void sdk_wpa_config_profile(struct sdk_g_ic_st *);
|
||||
void sdk_wpa_config_bss(struct sdk_g_ic_st *g_ic, uint8_t (* hwaddr2)[6]);
|
||||
void sdk_wpa_config_assoc_ie(int , int16_t *, int32_t);
|
||||
void sdk_dhcp_bind_check();
|
||||
void sdk_eagle_auth_done();
|
||||
void sdk_wpa_neg_complete();
|
||||
void sdk_wpa_attach(struct sdk_g_ic_st *);
|
||||
|
||||
// wpa.o
|
||||
void sdk_wpa_set_profile(uint8_t);
|
||||
void sdk_wpa_set_bss(uint8_t *hwaddr1, uint8_t (* hwaddr2)[6], uint8_t, uint8_t, uint8_t *, uint8_t *ssid, int);
|
||||
void sdk_eapol_txcb();
|
||||
void sdk_wpa_register(int, void *, void *, void *, void *, void *);
|
||||
|
||||
// wpas_glue.o
|
||||
|
||||
#endif /* _ESPLIBS_LIBWPA_H */
|
Loading…
Add table
Add a link
Reference in a new issue