📄 os_dep.h
字号:
/***********************************************************************************************
* 操作系统相关的接口头文件
*
*
* Create by ZHW, 050925
*
*
*************************************************************************************************/
#ifndef _OS_DEP_H_
#define _OS_DEP_H_
#include <ucos_ii.h>
#define E_OK OS_NO_ERR
////////////////////////////////////////////////////
//Task DEFINE one BY one
////////////////////////////////////////////////////
void drvTask_Main(void *pd);
void mmiTask_Main(void *pd);
//drv task
#define TSK_DRV_PRIORITY 5
#define TSKID_DRV TSK_DRV_PRIORITY
#define TSK_DRV_STACK_SIZE 512 //*sizeof(OS_STK) (4)
#define TSK_DRV_START_FUNC drvTask_Main
//mmi task
#define TSK_MMI_PRIORITY 6
#define TSKID_MMI TSK_MMI_PRIORITY
#define TSK_MMI_STACK_SIZE 512 //*sizeof(OS_STK) (4)
#define TSK_MMI_START_FUNC mmiTask_Main
////////////////////////////////////////////////////
//Task DEFINE end //
////////////////////////////////////////////////////
////////////////////////////////////////////////////
//MailBox Queque define //
////////////////////////////////////////////////////
//drv
#define ID_MB_DRV 0
#define MB_DRV_SIZE 16
#define ID_MB_MMI 1
#define MB_MMI_SIZE 64
////////////////////////////////////////////////////
// MailBox Queque DEFINE end //
////////////////////////////////////////////////////
////////////////////////////////////////////////////
//Fix Size Memory Pool define //
////////////////////////////////////////////////////
//mem pool 0
#define MEMID_0 0
#define MEM_0_BLOCK_SIZE 8
#define MEM_0_BLOCK_COUNT 64
//mem pool 1
#define MEMID_1 1
#define MEM_1_BLOCK_SIZE 32
#define MEM_1_BLOCK_COUNT 32
//mem pool 2
#define MEMID_2 2
#define MEM_2_BLOCK_SIZE 64
#define MEM_2_BLOCK_COUNT 32
//mem pool 3
#define MEMID_3 3
#define MEM_3_BLOCK_SIZE 256
#define MEM_3_BLOCK_COUNT 16
//to be continued
////////////////////////////////////////////////////
// Memory Pool DEFINE end //
////////////////////////////////////////////////////
/////////////////////////////////////////////////////
//OS function define
/////////////////////////////////////////////////////
INT8U sta_tsk(INT8U tskid, void* pdata);
void* os_malloc(INT16U count);
void os_free(void *pt);
INT8U os_receiveMessage( INT8U msgboxid, void** pmsg);
INT8U os_sendMessage(INT8U msgboxid, void* msg);
void OS_CPU_IRQ_ISR_Handler(void);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -