mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-13 13:01:55 +03:00
Added NONOS SDK 3.0.0 ~ 3.0.5 (again) (#8736)
* Added NONOS SDK 3.0.0 ~ 3.0.5 * Added user_pre_init * rf_cal[0] !=0x05,is 0x00 * # Remove mem_manager.o from libmain.a to use custom heap implementation, and time.o to fix redefinition of time-related functions # Rename `hostname` and `default_hostname` symbols * user_rf_pre_init * Add system_func1() called by system_restart_local() * Add commit log text * Fixed user_rf_pre_init * Style * pio sdks Co-authored-by: TAiGA <> Co-authored-by: Maxim Prokhorov <prokhorov.max@outlook.com>
This commit is contained in:
@ -25,6 +25,26 @@
|
||||
#ifndef __USER_INTERFACE_H__
|
||||
#define __USER_INTERFACE_H__
|
||||
|
||||
#if defined(NONOSDK3V0)
|
||||
#define NONOSDK (0x30000 - 1)
|
||||
#elif defined(NONOSDK300)
|
||||
#define NONOSDK (0x30000)
|
||||
#elif defined(NONOSDK301)
|
||||
#define NONOSDK (0x30100)
|
||||
#elif defined(NONOSDK302)
|
||||
#define NONOSDK (0x30200)
|
||||
#elif defined(NONOSDK303)
|
||||
#define NONOSDK (0x30300)
|
||||
#elif defined(NONOSDK304)
|
||||
#define NONOSDK (0x30400)
|
||||
#elif defined(NONOSDK305)
|
||||
#define NONOSDK (0x30500)
|
||||
#elif defined(NONOSDK306)
|
||||
#define NONOSDK (0x30600)
|
||||
#else
|
||||
#define NONOSDK (0x22100)
|
||||
#endif
|
||||
|
||||
#include "os_type.h"
|
||||
#ifdef LWIP_OPEN_SRC
|
||||
|
||||
@ -249,13 +269,19 @@ typedef struct {
|
||||
struct station_config {
|
||||
uint8 ssid[32];
|
||||
uint8 password[64];
|
||||
#if (NONOSDK >= (0x30200))
|
||||
uint8 channel;
|
||||
#endif
|
||||
uint8 bssid_set; // Note: If bssid_set is 1, station will just connect to the router
|
||||
// with both ssid[] and bssid[] matched. Please check about this.
|
||||
uint8 bssid[6];
|
||||
wifi_fast_scan_threshold_t threshold;
|
||||
#ifdef NONOSDK3V0
|
||||
#if (NONOSDK >= (0x30000 - 1))
|
||||
bool open_and_wep_mode_disable; // Can connect to open/wep router by default.
|
||||
#endif
|
||||
#if (NONOSDK >= (0x30200))
|
||||
bool all_channel_scan;
|
||||
#endif
|
||||
};
|
||||
|
||||
bool wifi_station_get_config(struct station_config *config);
|
||||
@ -438,7 +464,7 @@ typedef enum {
|
||||
MODEM_SLEEP_T
|
||||
} sleep_type_t;
|
||||
|
||||
#ifdef NONOSDK3V0
|
||||
#if (NONOSDK >= (0x30000 - 1))
|
||||
|
||||
typedef enum {
|
||||
MIN_SLEEP_T,
|
||||
@ -771,6 +797,70 @@ bool wifi_set_country(wifi_country_t *country);
|
||||
*/
|
||||
bool wifi_get_country(wifi_country_t *country);
|
||||
|
||||
#if (NONOSDK >= (0x30000))
|
||||
|
||||
typedef enum {
|
||||
SYSTEM_PARTITION_INVALID = 0,
|
||||
SYSTEM_PARTITION_BOOTLOADER, /* user can't modify this partition address, but can modify size */
|
||||
SYSTEM_PARTITION_OTA_1, /* user can't modify this partition address, but can modify size */
|
||||
SYSTEM_PARTITION_OTA_2, /* user can't modify this partition address, but can modify size */
|
||||
SYSTEM_PARTITION_RF_CAL, /* user must define this partition */
|
||||
SYSTEM_PARTITION_PHY_DATA, /* user must define this partition */
|
||||
SYSTEM_PARTITION_SYSTEM_PARAMETER, /* user must define this partition */
|
||||
SYSTEM_PARTITION_AT_PARAMETER,
|
||||
SYSTEM_PARTITION_SSL_CLIENT_CERT_PRIVKEY,
|
||||
SYSTEM_PARTITION_SSL_CLIENT_CA,
|
||||
SYSTEM_PARTITION_SSL_SERVER_CERT_PRIVKEY,
|
||||
SYSTEM_PARTITION_SSL_SERVER_CA,
|
||||
SYSTEM_PARTITION_WPA2_ENTERPRISE_CERT_PRIVKEY,
|
||||
SYSTEM_PARTITION_WPA2_ENTERPRISE_CA,
|
||||
|
||||
SYSTEM_PARTITION_CUSTOMER_BEGIN = 100, /* user can define partition after here */
|
||||
SYSTEM_PARTITION_MAX
|
||||
} partition_type_t;
|
||||
|
||||
typedef struct {
|
||||
partition_type_t type; /* the partition type */
|
||||
uint32_t addr; /* the partition address */
|
||||
uint32_t size; /* the partition size */
|
||||
} partition_item_t;
|
||||
|
||||
/**
|
||||
* @brief regist partition table information, user MUST call it in user_pre_init()
|
||||
*
|
||||
* @param partition_table: the partition table
|
||||
* @param partition_num: the partition number in partition table
|
||||
* @param map: the flash map
|
||||
*
|
||||
* @return true : succeed
|
||||
* @return false : fail
|
||||
*/
|
||||
bool system_partition_table_regist(
|
||||
const partition_item_t* partition_table,
|
||||
uint32_t partition_num,
|
||||
uint32_t map
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief get ota partition size
|
||||
*
|
||||
* @return the size of ota partition
|
||||
*/
|
||||
uint32_t system_partition_get_ota_partition_size(void);
|
||||
|
||||
/**
|
||||
* @brief get partition information
|
||||
*
|
||||
* @param type: the partition type
|
||||
* @param partition_item: the point to store partition information
|
||||
*
|
||||
* @return true : succeed
|
||||
* @return false : fail
|
||||
*/
|
||||
bool system_partition_get_item(partition_type_t type, partition_item_t* partition_item);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user