Professional Documents
Culture Documents
Principales of RTO
Principales of RTO
*p_chcommandduffertail-
!! Read received character from h/w;
If (*p_chcommandbuffertail _ ‘r’)
sc_post (&mboxcommand MSG_COMMAND_ARRIVED, &IERROE);
++p_commandbuffertail;
If(p_chcommandbuffertail _
&a_chcommandbuffer[SIZEOF_CMD_BUFFER])
p_chcommandbuffertail -a_chcommandbuffer
!! Reset the h/w as necessary.
}
Void vinterpretcommandtask (void)
{
Static char *p_chcommandbufferhead – a_chcommandbuffer;
Int ierror;
While (TURE)
{
/*wait for the next command to arrive,*/
Sc_pend (&mboxcommand, WAIT_FOREVER.&ierror);
/*we have a command.*/
!! Interpret the command at p_chcommandbufferhead