mirror of
https://gitee.com/moluo-tech/CodeBrick.git
synced 2025-01-16 04:32:51 +08:00
framework/module.c的编码转换为gb2312编译(和别的文件匹配)
This commit is contained in:
parent
b955f3dbf5
commit
1b9527b7ae
@ -1,5 +1,5 @@
|
||||
/******************************************************************************
|
||||
* @brief 系统模块管理(包含系统初始化,时间片轮询系统)
|
||||
* @brief ϵͳģ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>,ʱ<EFBFBD><EFBFBD>Ƭ<EFBFBD><EFBFBD>ѯϵͳ)
|
||||
*
|
||||
* Copyright (c) 2017~2020, <morro_luo@163.com>
|
||||
*
|
||||
@ -7,19 +7,19 @@
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2016-06-24 Morro 初版完成
|
||||
* 2020-05-23 Morro 增加匿名类型,防止模块重名错误
|
||||
* 2020-06-28 Morro 增加is_timeout超时判断接口
|
||||
* 2020-09-28 Morro 解决伪任务项未初始化timer,导致引用了空指针的问题!
|
||||
* 2016-06-24 Morro <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* 2020-05-23 Morro <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<EFBFBD><EFBFBD>ֹģ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* 2020-06-28 Morro <EFBFBD><EFBFBD><EFBFBD><EFBFBD>is_timeout<EFBFBD><EFBFBD>ʱ<EFBFBD>жϽӿ<EFBFBD>
|
||||
* 2020-09-28 Morro <EFBFBD><EFBFBD><EFBFBD><EFBFBD>α<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>timer<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿<EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⣡
|
||||
*
|
||||
******************************************************************************/
|
||||
#include "module.h"
|
||||
|
||||
|
||||
static volatile unsigned int tick; //系统滴答计时
|
||||
static volatile unsigned int tick; //ϵͳ<EFBFBD>δ<EFBFBD><EFBFBD><EFBFBD>ʱ
|
||||
|
||||
/*
|
||||
* @brief 增加系统节拍数(定时器中断中调用,1ms 1次)
|
||||
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><EFBFBD>е<EFBFBD><EFBFBD><EFBFBD>,1ms 1<EFBFBD><EFBFBD>)
|
||||
*/
|
||||
void systick_increase(unsigned int ms)
|
||||
{
|
||||
@ -27,7 +27,7 @@ void systick_increase(unsigned int ms)
|
||||
}
|
||||
|
||||
/*
|
||||
* @brief 获取系统滴答时钟值(通常单位是1ms)
|
||||
* @brief <EFBFBD><EFBFBD>ȡϵͳ<EFBFBD>δ<EFBFBD>ʱ<EFBFBD><EFBFBD>ֵ(ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD>1ms)
|
||||
*/
|
||||
unsigned int get_tick(void)
|
||||
{
|
||||
@ -35,9 +35,9 @@ unsigned int get_tick(void)
|
||||
}
|
||||
|
||||
/*
|
||||
* @brief 超时判断
|
||||
* @param[in] start - 起始时间
|
||||
* @param[in] timeout - 超时时间(ms)
|
||||
* @brief <EFBFBD><EFBFBD>ʱ<EFBFBD>ж<EFBFBD>
|
||||
* @param[in] start - <EFBFBD><EFBFBD>ʼʱ<EFBFBD><EFBFBD>
|
||||
* @param[in] timeout - <EFBFBD><EFBFBD>ʱʱ<EFBFBD><EFBFBD>(ms)
|
||||
*/
|
||||
bool is_timeout(unsigned int start, unsigned int timeout)
|
||||
{
|
||||
@ -45,31 +45,31 @@ bool is_timeout(unsigned int start, unsigned int timeout)
|
||||
}
|
||||
|
||||
/*
|
||||
* @brief 空处理,用于定位段入口
|
||||
* @brief <EFBFBD>մ<EFBFBD><EFBFBD><EFBFBD>,<EFBFBD><EFBFBD><EFBFBD>ڶ<EFBFBD>λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
*/
|
||||
static void nop_process(void) {}
|
||||
|
||||
//第一个初始化项
|
||||
//<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
const init_item_t init_tbl_start SECTION("init.item.0") = {
|
||||
"", nop_process
|
||||
};
|
||||
//最后个初始化项
|
||||
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
const init_item_t init_tbl_end SECTION("init.item.4") = {
|
||||
"", nop_process
|
||||
};
|
||||
|
||||
//第一个任务项
|
||||
//<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
const task_item_t task_tbl_start SECTION("task.item.0") = {
|
||||
"", nop_process
|
||||
};
|
||||
//最后个任务项
|
||||
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
const task_item_t task_tbl_end SECTION("task.item.2") = {
|
||||
"", nop_process
|
||||
};
|
||||
|
||||
/*
|
||||
* @brief 模块初始处理
|
||||
* 初始化模块优化级 system_init > driver_init > module_init
|
||||
* @brief ģ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* <EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD><EFBFBD>Ż<EFBFBD><EFBFBD><EFBFBD> system_init > driver_init > module_init
|
||||
* @param[in] none
|
||||
* @return none
|
||||
*/
|
||||
@ -82,7 +82,7 @@ void module_task_init(void)
|
||||
}
|
||||
|
||||
/*
|
||||
* @brief 任务轮询处理
|
||||
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
* @param[in] none
|
||||
* @return none
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user