详情见图片
void key_task(void *pdata)
{
u8 Test1[]={0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A};
u8 Test2[]={0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0x0A9,0xAA};
u8 Test3[]={0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A};
while(1)
{
if(TPAD_Scan(0))//´¥Ãþ°´¼ü°´ÏÂ
{
LED1=!LED1;
OSQPostFront(q_msg,(void*)&Test1[0]); //·¢ËͶÓÁÐ1
OSQPostFront(q_msg,(void*)&Test2[0]); //·¢ËͶÓÁÐ2
OSQPost(q_msg,(void*)&Test3[0]); //·¢ËͶÓÁÐ3
delay_ms(10);
}
}
}
void send2_task(void *pdata)
{
u8 *msg1,err;
while(1)
{
msg1=OSQPend(q_msg,0,&err);
printf("%s\r\n",msg1);
delay_ms(10);
}
}
|