- In the establishment of the project, the start Task StartTask () started the task MyTask (), also set up a message queue, and then send a message queue, send out their own deleted themselves, the receiver has been able to receive data??? Why???
Because our message queue is not emptied, there is always data in the message queue, of course, in the execution of MyTask's task, mytask inside has this sentence waiting for message queue ss=osqpend (STR_Q,0,&ERR); Request Message Queue, if inside the task MyTask we clear message queue tender? Ah, is there no data to receive??? Sure,,, after emptying nothing to receive ...
StartTask () Start the task program:
S100= "The value of Ostime is from now!!";
Pc_dispchar (0x80, 0, showtable[1], 0);
Osqpostfront (str_q,s100); Send
MyTask of the program:
Osqflush (STR_Q); Empty the message queue under the tangle can't receive haha
Ss=osqpend (Str_q,0,&err); Request Message Queue Request There's no bird, nothing.
Pc_dispstr (3,++y,ss,disp_fgnd_red+disp_bgnd_light_gray); Easy Arm software value to receive data once
Results: With Zlg's easy ARM display, nothing is displayed.
Start Task StartTask () sends out the message queue itself to delete, the receiver has been displaying data with Osqflush (STR_Q); Empty the message queue under the tangle can't receive haha