皮皮学,免费搜题
登录
搜题
【简答题】
已知下列程序通过μC/OS-II系统,在51内核上实现了字符串数据接收,以及字符串解析的功能,其中任务A进行字符串数据的接收,优先级为5,任务B进行字符串数据的解析,优先级为6,请补全代码。(部分空格可能需要多行代码,只要逻辑正确,不一定要按照题目要求填写) #include #include ......//其他必要的h文件 #define STK_SIZE 64 OS_STK stk1[STK_SIZE],stk2[STK_SIZE]; BOOL fin = FALSE; char* buff[64],pt = 0; void analyze_msg(char* buff);//字符串解析函数,略 void TaskA(void* param); void TaskB(void* param); void main(void) { SYSInit();//系统硬件初始化,略 OSInit(); _________________________(第1空,该处推荐填写两行) OSStart(); } //串口读取任务 void TaskA(void* param) { while(1) { if(RI) { RI = 0; ________________________;(第2空,该处推荐填写1行) if((buff[pt++] = SBUF)=='\0') { fin = TRUE; } OSSchedUnlock(); } } } //字符串解析任务 void TaskB(void* param) { while(1) { BOOL fin2 = FALSE; char* buff2[64],pt2; OSSchedLock(); if(fin) { ______________________(第3空,该处推荐填写4行) } ______________________(第4空,该处推荐填写1行) if(fin2) { cmd_analyze(buff2); } } }
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
.
..
皮皮学刷刷变学霸
举一反三
【判断题】影响舌面元音发音的因素有舌面高低、舌面前后、唇形圆展。( )
A.
正确
B.
错误
【单选题】The dilemma facing the European Monetary Union is the contradiction between ______.
A.
universal policy and different economies
B.
monetary consensus and different opinions among member nations
C.
member nations' serious budget deficits with the Union's restriction
D.
original member nations and new member nations
【单选题】设主串的长度为m,子串的长度为n,那么KMP模式匹配算法的时间复杂度为( )。
A.
O(m)
B.
O(n)
C.
O(m*n)
D.
O(m+n)
【判断题】企业经营管理是对整个生产经营活动进行决策、计划、组织、指挥、控制、协调,并对成员进行激励,以实现目标的一系列工作和过程的总称。()
A.
正确
B.
错误
【简答题】Prosperous alumni helped make 2006 a recorded fund-raising year for colleges and universities, which hauled in $28 billion—a 9. 4 percent jump from 2005. (67) There were increases across the board, bu...
【单选题】当损失频率为( )时风险最大。
A.
0
B.
0.618
C.
0.5
D.
1
【单选题】In this article, the writer mainly wants to tell the readers______.
A.
that the universe is so large that we cannot imagine it
B.
where the planets in the universe came from
C.
how the high mountains were formed on the sun
D.
why the tides over the surface of the sun were so powerful
【单选题】党员在受到撤销党内职务处分后的( )内,不得让其在党内担任和向党外推荐担任与其原职务相当或高于原职务的工作。
A.
半年
B.
一年
C.
两年
D.
三年
【单选题】关于经营分析的价值,错误的是 ( )
A.
经营分析是管理会计职能的重要组成部分
B.
经营分析在管理会计中居于承上启下的中枢位置 , 融合业务活动的全过 程,使管理会计成为完整的循环 , 能够贯穿于预算、决策、控制、评价和考核等 各个管理环节,有助于单位管理水平的提升
C.
经营分析主要反映企业预算执行情况以及绩效考核目标的完成情况 , 寻找 差异产生的原因,提出管理建议与改进对策
D.
经营分析的主要作用是为决策提供信息支持 , 强调事后控制
【单选题】Kepler reconciled astronomy with physics, and substituted for fictitious clockwork a universe of material bodies not unlike the earth, freely floating and turning in space, moved by forces______.
A.
acted on them
B.
being acted on it
C.
acting on them
D.
having acted on it
相关题目: