Skip to content

Commit

Permalink
add: 添加air780epm的luatos配置项(测试)
Browse files Browse the repository at this point in the history
  • Loading branch information
wendal committed Dec 5, 2024
1 parent 3ef718b commit 4529d8c
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 3 deletions.
4 changes: 2 additions & 2 deletions interface/src/luat_base_ec7xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion interface/src/luat_mem_ec7xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions project/luatos/inc/luat_conf_bsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
49 changes: 49 additions & 0 deletions project/luatos/inc/luat_conf_bsp_air780epm.h
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 4529d8c

Please sign in to comment.