1 Star 0 Fork 1

forest_555/skyeye_rawos

forked from hehe/skyeye_rawos 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
test_block.c 989 Bytes
一键复制 编辑 原始数据 按行查看 历史
嵌入式-老费 提交于 2014-06-30 00:17 +08:00 . add all rawos files
#include <raw_api.h>
#define TEST_TASK_STK_SIZE 1024
static RAW_TASK_OBJ test_task_obj;
static PORT_STACK test_task_stack1[TEST_TASK_STK_SIZE];
static RAW_U8 buffer[1024];
static RAW_U8* p_block;
static MEM_POOL mem_pool;
static RAW_U8 count = 0;
static void test_task1(void * pParam)
{
RAW_U8* addr;
while(1) {
if(RAW_SUCCESS == raw_block_allocate(&mem_pool, (void**)&addr)) {
count ++;
__put_char("ok ", 3);
}else {
__put_char("error ", 6);
}
raw_sleep(20);
}
}
extern int test_switch;
void test_block()
{
if(1 == test_switch) {
return;
}
test_switch = 1;
if (RAW_SUCCESS != raw_block_pool_create(&mem_pool,
"pool_block1",
32,
buffer,
1024)) {
__put_char("error ", 6);
return;
}
raw_task_create(&test_task_obj, (RAW_U8 *)"task1", 0,
5, 10, test_task_stack1,
TEST_TASK_STK_SIZE , test_task1, 1);
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/forest555/skyeye_rawos.git
git@gitee.com:forest555/skyeye_rawos.git
forest555
skyeye_rawos
skyeye_rawos
master

搜索帮助