?? os.h
字號:
//----------------------------------------------------//
//-------Institute Of Computing Technology-----------//
//------------Chinese Academic Science---------------//
//-----中國科學(xué)院計(jì)算技術(shù)研究所先進(jìn)測試技術(shù)實(shí)驗(yàn)室-----//
//----------------------------------------------------//
// **************************************************
// * @copyright:nbicc_lpp
// * @this is OS code
// * @author zhouqiang (zhouhongren@163.com)
// * liulingyi (lingyiliu@ict.ac.cn)
// * @data:2005.11.05
// * @version:0.0.1
// * @updata:$
// **************************************************
#ifndef os_h
#define os_h
#include "project.h"
//原子操作
typedef uint8_t os_atomic_t;
inline os_atomic_t os_atomic_start(void );
inline void os_atomic_end(os_atomic_t oldSreg);
inline void os_atomic_enable_interrupt(void);
//系統(tǒng)函數(shù)
inline void OS_wait(void );
inline void OS_sleep(void );
inline void OS_sched_init(void );
inline bool OS_run_next_task(void);
inline void OS_run_task(void);
bool OS_post(void (*tp)(void));
inline void error(char * info);
//參數(shù)設(shè)置
typedef struct _OS_sched_entry_T {
void (*tp)(void);
}OS_sched_entry_T;
enum OS_CON{
OS_MAX_TASKS = 8,
OS_TASK_BITMASK = OS_MAX_TASKS - 1
};
volatile OS_sched_entry_T OS_queue[OS_MAX_TASKS];
uint8_t OS_sched_full;
volatile uint8_t OS_sched_free;
#endif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -