⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 port.h

📁 本程序将ucosii移入了QF框架
💻 H
字号:
/////////////////////////////////////////////////////////////////////
// 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -