diff --git a/interface/src/luat_base_ec7xx.c b/interface/src/luat_base_ec7xx.c index fc16f26..ad511f5 100644 --- a/interface/src/luat_base_ec7xx.c +++ b/interface/src/luat_base_ec7xx.c @@ -16,7 +16,7 @@ #include "mbedtls/md5.h" #include "luat_network_adapter.h" #include "networkmgr.h" - +#include "luat_hmeta.h" #define LUAT_LOG_TAG "base" #include "luat_log.h" @@ -294,7 +294,7 @@ const char* luat_os_bsp(void) { #if defined(LUAT_MODEL_AIR201) memcpy(model_name_buff, "Air201", strlen("Air201") + 1); return model_name_buff; - #elif defined(LUAT_MODEL_AIR780EPS) || defined(LUAT_MODEL_AIR780EP) || defined(LUAT_MODEL_AIR780EQ) || defined(LUAT_MODEL_AIR700ECQ) || defined(LUAT_MODEL_AIR700EAQ) || defined(LUAT_MODEL_AIR700EMQ) + #elif defined(LUAT_MODEL_AIR780EPS) || defined(LUAT_MODEL_AIR780EP) || defined(LUAT_MODEL_AIR780EQ) || defined(LUAT_MODEL_AIR700ECQ) || defined(LUAT_MODEL_AIR700EAQ) || defined(LUAT_MODEL_AIR700EMQ) || defined(LUAT_MODEL_AIR780EPM) memset(model_name_buff, 0, sizeof(model_name_buff)); luat_hmeta_model_name(model_name_buff); return model_name_buff; diff --git a/interface/src/luat_mem_ec7xx.c b/interface/src/luat_mem_ec7xx.c index 0ab3cf6..b52d16f 100644 --- a/interface/src/luat_mem_ec7xx.c +++ b/interface/src/luat_mem_ec7xx.c @@ -52,7 +52,7 @@ void* luat_heap_zalloc(size_t _size) { void luat_heap_free(void* ptr) { #ifdef __LUATOS__ - if ((uint32_t)ptr >= (PSRAM_P2_START_ADDR|PSRAM_PCACHE2_BASE + LUAT_HEAP_SIZE) && (uint32_t)ptr <= PSRAM_END_ADDR) { + if ((uint32_t)ptr >= ((PSRAM_P2_START_ADDR|PSRAM_PCACHE2_BASE) + LUAT_HEAP_SIZE) && (uint32_t)ptr <= PSRAM_END_ADDR) { #else if ((uint32_t)ptr >= (PSRAM_P2_START_ADDR|PSRAM_PCACHE2_BASE) && (uint32_t)ptr <= PSRAM_END_ADDR) { #endif diff --git a/project/luatos/inc/luat_conf_bsp.h b/project/luatos/inc/luat_conf_bsp.h index 173d6e9..2b39679 100644 --- a/project/luatos/inc/luat_conf_bsp.h +++ b/project/luatos/inc/luat_conf_bsp.h @@ -17,6 +17,7 @@ // #define LUAT_MODEL_AIR700ECQ 1 // #define LUAT_MODEL_AIR700EAQ 1 // #define LUAT_MODEL_AIR700EMQ 1 +// #define LUAT_MODEL_AIR780EPM 1 #if defined(LUAT_MODEL_AIR780EPS) #include "luat_conf_bsp_air780eps.h" @@ -28,6 +29,8 @@ #include "luat_conf_bsp_air780ep.h" #elif (defined(LUAT_MODEL_AIR700ECQ) || defined(LUAT_MODEL_AIR700EAQ)) || defined(LUAT_MODEL_AIR700EMQ) #include "luat_conf_bsp_air700exq.h" +#elif defined(LUAT_MODEL_AIR780EPM) +#include "luat_conf_bsp_air780epm.h" #else #include "luat_conf_bsp_dft.h" #endif diff --git a/project/luatos/inc/luat_conf_bsp_air780epm.h b/project/luatos/inc/luat_conf_bsp_air780epm.h new file mode 100644 index 0000000..e02593e --- /dev/null +++ b/project/luatos/inc/luat_conf_bsp_air780epm.h @@ -0,0 +1,49 @@ + +// #if !defined(TYPE_EC716U) +// #error("Air780EPS只能是EC718U芯片") +// #endif + + +#define LUAT_USE_UART 1 +#define LUAT_USE_GPIO 1 +#define LUAT_USE_I2C 1 +#define LUAT_USE_SPI 1 +#define LUAT_USE_ADC 1 +#define LUAT_USE_PWM 1 +#define LUAT_USE_WDT 1 +#define LUAT_USE_PM 1 +#define LUAT_USE_MCU 1 +#define LUAT_USE_RTC 1 +#define LUAT_USE_OTP 1 +#define LUAT_USE_WLAN 1 +#define LUAT_USE_SMS 1 +#define LUAT_USE_HMETA 1 + +#define LUAT_USE_IOTAUTH 1 +#define LUAT_USE_MQTT 1 +#define LUAT_USE_FTP 1 +#define LUAT_USE_WEBSOCKET 1 +#define LUAT_USE_SOFT_UART 1 + +#define LUAT_USE_CRYPTO 1 +#define LUAT_USE_CJSON 1 +#define LUAT_USE_ZBUFF 1 +#define LUAT_USE_PACK 1 +#define LUAT_USE_FS 1 +#define LUAT_USE_SENSOR 1 + +#define LUAT_USE_FSKV 1 +#define LUAT_USE_I2CTOOLS 1 +#define LUAT_USE_MINIZ 1 +#define LUAT_USE_BIT64 1 +#define LUAT_USE_ICONV 1 + +#define LUAT_USE_PROTOBUF 1 +#define LUAT_USE_RSA 1 +#define LUAT_USE_XXTEA 1 +#define LUAT_USE_GMSSL 1 + +#define LUAT_SCRIPT_SIZE 512 +#define LUAT_SCRIPT_OTA_SIZE 360 + +#define LUAT_HEAP_SIZE (300*1024)