port.h

来自「本程序将ucosii移入了QF框架」· C头文件 代码 · 共 33 行

H
33
字号
/////////////////////////////////////////////////////////////////////
// Quantum Framework uCOS-II port (C++ version)
// Copyright (c) 2007 Violent.Wei 
// All Rights Reserved.
/////////////////////////////////////////////////////////////////////
#ifndef port_h
#define port_h

#include "qf_uCOSII.h"
#include "qfpkg.h"

// uCOSII-specific critical section operations
#define QF_PROTECT()            OS_ENTER_CRITICAL()
#define QF_UNPROTECT()          OS_EXIT_CRITICAL()
#define QF_ISR_PROTECT()
#define QF_ISR_UNPROTECT()

// uCOSII-compiler-specific cast
#define Q_STATE_CAST(x_)        reinterpret_cast<QState>(x_)

// uCOSII-specific event pool operations
#define QF_EPOOL                QEPool
#define QF_EPOOL_INIT(p_, poolSto_, nEvts_, evtSize_) \
    (p_)->init(poolSto_, nEvts_, evtSize_); 
#define QF_EPOOL_GET(p_, e_)    ((e_) = (p_)->get())
#define QF_EPOOL_PUT(p_, e_)    ((p_)->put(e_))

// the following constant may be bumped up to 15 (inclusive)
// before redesign of algorithms is necessary 
enum { QF_MAX_ACTIVE = 15 };

#endif // port_h

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?