中级会员
 
- 积分
- 399
- 金钱
- 399
- 注册时间
- 2014-11-7
- 在线时间
- 44 小时
|

楼主 |
发表于 2017-5-23 10:06:26
|
显示全部楼层
//LED0任务
void LED0_task(void *p_arg)
{
OS_ERR err;
u16 Wind_press = 0;
while(1)
{
LED0 = !LED0;
Get_Real_date(buff); //得到 年 月 日 buf 为3元素数字首地址
Get_Real_time(buff+3); //得到 时 分 秒 buf 为3元素数字首地址
//时时刻刻显示自己风压
buff[6] = Rresssensor_Read(); //取值四舍五入
OSQPost((OS_Q*)&Wind_PressQ, (void*)buff, (OS_MSG_SIZE)8,(OS_OPT)OS_OPT_P OST_FIFO,(OS_ERR*)&err);
OSTimeDlyHMSM(0,0,1,0,OS_OPT_TIME_HMSM_STRICT,&err);//延时1s
}
}
Get_Real_date(buff); (1)
Get_Real_time(buff+3); (2)
buff[6] = Rresssensor_Read(); (3)
(1) (2) (3) 均为IIC读取器件 , 那么问题来了? 他们会被 SysTICK 中断所影响么? 我是不是应该在此处加上 临界资源保护??? |
|