新建项目

This commit is contained in:
gitea committed 2023-04-29 09:09:12 +08:00
1 parent 5e2e890cfc
commit 633d9b872b
1351 files changed
+730564

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
#include "stm32g0xx_hal.h"
#include <easyflash.h>
#include <stdlib.h>
#include <string.h>
// 获取uint32_t 的数值
uint32_t ef_get_integer(const char * key)
{
uint32_t integer = NULL;
char * value_ptr;
/* get the boot count number from Env */
value_ptr = ef_get_env (key);
integer = atol (value_ptr);
return integer;
}
// 获取double 的数值
double ef_get_double(const char * key)
{
double ffloat = NULL;
char * value_ptr;
/* get the boot count number from Env */
value_ptr = ef_get_env (key);
ffloat = atof (value_ptr);
return ffloat;
}
// 获取字符串的数值
char * ef_get_string(const char * key)
{
char * value_ptr;
/* get the boot count number from Env */
value_ptr = ef_get_env (key);
return value_ptr;
}