[En-Nut-Discussion] a strange "trace" code in usartavr.c
Matthias Ringwald
mringwal at inf.ethz.ch
Tue Mar 6 10:45:09 CET 2007
Hi Michael
> My question is:
> if I move "trace 4" to the end of the function, will it change
> the semantics of this function ?
Nope. It will fix a bug. :) It really should be at the end, I guess
that was my mistake.
I'vll updated the CVS as soon as I can access it. :)
The loop is only added based on a compilte time flag which is set to
false as default
and if the tracer is not enabled, it also doesn't matter.
Thanks for pointing out the mistake,
matthias
..
> #ifdef NUTTRACER
> TRACE_ADD_ITEM
> (TRACE_TAG_INTERRUPT_EXIT,TRACE_INT_UART_RXCOMPL); /* trace 4 */
> #endif
>
> #ifdef UART_READMULTIBYTE
> } while ( inb(UCSRnA) & _BV(RXC) ); // byte in buffer?
>
> // Eventually post event to wake thread
> if (postEvent)
> NutEventPostFromIrq(&rbf->rbf_que);
> #endif
>
> }
>
> ----------------------------------------------------------------------
> ----------------------
>
More information about the En-Nut-Discussion
mailing list