From 8d95250cdda10b16fe10c5e6511262252b10e35a Mon Sep 17 00:00:00 2001 From: zhaohe Date: Wed, 4 Oct 2023 16:49:32 +0800 Subject: [PATCH] update --- .settings/stm32cubeide.project.prefs | 2 +- sdk | 2 +- usrc/main.cpp | 9 +++++++++ usrc/project_configs.h | 4 ++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.settings/stm32cubeide.project.prefs b/.settings/stm32cubeide.project.prefs index 79688aa..85236e6 100644 --- a/.settings/stm32cubeide.project.prefs +++ b/.settings/stm32cubeide.project.prefs @@ -1,5 +1,5 @@ 635E684B79701B039C64EA45C3F84D30=C8B026EBE17C208F17FB66CE4235156C 66BE74F758C12D739921AEA421D593D3=1 8DF89ED150041C4CBC7CB9A9CAA90856=31CD5EEFA9F35C65D8E334D24F421EB1 -DC22A860405A8BF2F2C095E5B6529F12=31CD5EEFA9F35C65D8E334D24F421EB1 +DC22A860405A8BF2F2C095E5B6529F12=E957E899AF7563EEB25643F04F5B7D97 eclipse.preferences.version=1 diff --git a/sdk b/sdk index 16805d6..46b99dd 160000 --- a/sdk +++ b/sdk @@ -1 +1 @@ -Subproject commit 16805d65cf10fd324f3f36e82581c7c754d5ede3 +Subproject commit 46b99dd9fdb301314155efa2d5728cc863f59636 diff --git a/usrc/main.cpp b/usrc/main.cpp index 6fa3a30..b4ae1cf 100644 --- a/usrc/main.cpp +++ b/usrc/main.cpp @@ -4,12 +4,17 @@ #include "sdk/components/step_motor_ctrl_module/step_motor_ctrl_module.hpp" #include "sdk/components/zcancmder_module/zcan_step_motor_ctrl_module.hpp" #include "sdk/os/zos.hpp" +#include "sdk\components\flash\zsimple_flash.hpp" #include "sdk\components\mini_servo_motor\feite_servo_motor.hpp" #include "sdk\components\tmc\ic\ztmc4361A.hpp" #include "sdk\components\xy_robot_ctrl_module\xy_robot_ctrl_module.hpp" #include "sdk\components\zcancmder\zcanreceiver.hpp" #include "sdk\components\zcancmder_module\zcan_basic_order_module.hpp" #include "sdk\components\zcancmder_module\zcan_xy_robot_module.hpp" +// +#include "sdk\components\flash\znvs.hpp" +// + #define TAG "main" using namespace iflytop; using namespace std; @@ -41,6 +46,10 @@ void umain() { zos_cfg_t zoscfg; zos_init(&zoscfg); + ZNVS::ins().initialize(); + // ZNVS::ins().set_config_int32("test", 1234); + ZNVS::ins().dumpcfg(); + osDelay(1000); { diff --git a/usrc/project_configs.h b/usrc/project_configs.h index 710a222..49f1bbf 100644 --- a/usrc/project_configs.h +++ b/usrc/project_configs.h @@ -13,6 +13,10 @@ #define IFLYTOP_ENABLE_OS 1 #define IFLYTOP_PREEMPTPRIORITY_DEFAULT 5 +#define IFLYTOP_NVS_CONFIG_MAX_ITEM_NUM 100 +#define IFLYTOP_NVS_CONFIG_FLASH_SECTOR 8 + + #define DEVICE_ID (2) /*********************************************************************************/