适配HSP更新
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
获取HSP子仓库
|
||||||
|
git submodule init
|
||||||
|
git submodule update
|
||||||
编译:
|
编译:
|
||||||
./build.sh all embed
|
./build.sh all embed
|
||||||
运行:
|
运行:
|
||||||
|
|||||||
Submodule has_platform updated: 3f12088b32...304f035f44
@@ -1,11 +1,20 @@
|
|||||||
#include "has_platform.h"
|
#include "has_platform.h"
|
||||||
|
|
||||||
|
static void timer_cb(void *arg)
|
||||||
|
{
|
||||||
|
(void)arg;
|
||||||
|
printf("hello timer\n");
|
||||||
|
has_timer_set(timer_cb, NULL, 1000);
|
||||||
|
}
|
||||||
|
|
||||||
static OS_THREAD_ID gui_tid;
|
static OS_THREAD_ID gui_tid;
|
||||||
void *gui_task(void *param)
|
void *gui_task(void *param)
|
||||||
{
|
{
|
||||||
|
(void)param;
|
||||||
uint8_t data[2];
|
uint8_t data[2];
|
||||||
data[0] = 0x5a;
|
data[0] = 0x5a;
|
||||||
data[1] = 0x5b;
|
data[1] = 0x5b;
|
||||||
|
has_timer_set(timer_cb, NULL, 1000);
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
has_msg_publish(GUI, data, sizeof(data));
|
has_msg_publish(GUI, data, sizeof(data));
|
||||||
|
|||||||
@@ -21,19 +21,25 @@
|
|||||||
{WIFI, 1, {GUI}}, \
|
{WIFI, 1, {GUI}}, \
|
||||||
{ACM, 2, {WIFI, GUI}}, \
|
{ACM, 2, {WIFI, GUI}}, \
|
||||||
}
|
}
|
||||||
|
#define CEHCK_CONFIG_H 1 // 如果打开,代码初始化时会检查config是否写错,开发时应该打开
|
||||||
|
|
||||||
/* 如果打开,代码初始化时会检查config是否写错,开发时应该打开 */
|
/* 4.选择操作系统 */
|
||||||
#define CEHCK_CONFIG_H 1
|
|
||||||
|
|
||||||
#define HAS_OS_LINUX // Linux系统
|
#define HAS_OS_LINUX // Linux系统
|
||||||
// #define HAS_OS_freeRTOS // freeRTOS系统
|
// #define HAS_OS_freeRTOS // freeRTOS系统
|
||||||
// #define HAS_OS_RT_THREAD // rt-thread系统
|
// #define HAS_OS_RT_THREAD // rt-thread系统
|
||||||
// #define HAS_OS_NONE_OR_OSAL // 裸机或osal
|
// #define HAS_OS_NONE_OR_OSAL // 裸机或osal
|
||||||
// #define HAS_OS_USER_DEFINED // 自定义,806
|
// #define HAS_OS_USER_DEFINED // 自定义,806
|
||||||
|
|
||||||
#ifdef HAS_OS_USER_DEFINED
|
#ifdef HAS_OS_USER_DEFINED
|
||||||
/* 这里包含自定义的头文件 */
|
/* 这里包含自定义的头文件 */
|
||||||
#include "has_806_os_port/has_os_806_port.h"
|
#include "has_806_os_port/has_os_806_port.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* 5.打开需要的模块 */
|
||||||
|
#define HAS_ENABLE_TIMER // 启用软件定时器模块
|
||||||
|
#define HAS_ENABLE_IOBUFFER // 协议数据缓冲区管理
|
||||||
|
#define HAS_ENABLE_PROTOCOL // HAS协议模块
|
||||||
|
// #define HAS_ENABLE_CRC // CRC
|
||||||
|
// #define HAS_ENABLE_CJSON // CJSON
|
||||||
|
// #define HAS_ENABLE_MD5 // MD5
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user