Re: Safe way to write interrupt driven circular buffer tx rx?
- From: cs_posting@xxxxxxxxxxx
- Date: Wed, 29 Aug 2007 06:54:55 -0700
On Aug 29, 8:21 am, "Sven" <S...@xxxxxxx> wrote:
Can someone point out source code for a safe circular buffer receiver
transmitter? It's for sending and receiving bytes via RS232.
What I do is let the interrupt process freely modify the buffer count
& head variables.
The interruptible process modifies the buffer variables in only one
small block of code, which is bracketed with interrupt disable &
enable instructions.
Even if your UART only offers a simple result register for the
receive, you should be able to execute the non-interruptible section,
and then the interrupt, fast enough to not miss data at 115200 baud.
.
- Follow-Ups:
- Re: Safe way to write interrupt driven circular buffer tx rx?
- From: Stefan Reuther
- Re: Safe way to write interrupt driven circular buffer tx rx?
- From: David T. Ashley
- Re: Safe way to write interrupt driven circular buffer tx rx?
- References:
- Prev by Date: Safe way to write interrupt driven circular buffer tx rx?
- Next by Date: Re: <CR/LF> or <CR> or <LF>?
- Previous by thread: Safe way to write interrupt driven circular buffer tx rx?
- Next by thread: Re: Safe way to write interrupt driven circular buffer tx rx?
- Index(es):