[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] About context saving in Vectors
From: |
Dave Hylands |
Subject: |
Re: [avr-gcc-list] About context saving in Vectors |
Date: |
Wed, 14 Jan 2009 17:27:37 -0800 |
Hi Daniel,
>> And here's some code that implements such a ring buffer. As David
>> Kelly points out, as long as the index type is uint8_t, then nothing
>> special is required (which for this particular implementation means
>> that buffers upto 128 entries would be supported)
>>
>> <http://websvn.hylands.org/filedetails.php?repname=Projects&path=%2Fcommon%
>>2FCBUF.h&rev=0&sc=0>
>>
>> It's important that the queue be declared volatile (as myQ is in the
>> sample).
>
> And I was just about to ask if someone could post some well tested code! :)
Yes - I use this for all of my UART stuff.
You can find interrupt based UART code which uses CBUF over here:
<http://websvn.hylands.org/filedetails.php?repname=Projects&path=%2Fcommon%2Favr%2FUART.h&rev=0&sc=0>
<http://websvn.hylands.org/filedetails.php?repname=Projects&path=%2Fcommon%2Favr%2FUART.c&rev=0&sc=0>
A typical Config.h (which can be different for each project) looks like this:
<http://websvn.hylands.org/filedetails.php?repname=Projects&path=%2Favr%2FFlash-LED-robostix%2FConfig.h&rev=0&sc=0>
--
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/
- Re: [avr-gcc-list] About context saving in Vectors, (continued)
- Re: [avr-gcc-list] About context saving in Vectors, Paulo Marques, 2009/01/15
- Re: [avr-gcc-list] About context saving in Vectors, dlc, 2009/01/14
- Re: [avr-gcc-list] About context saving in Vectors, David Kelly, 2009/01/14
- Re: [avr-gcc-list] About context saving in Vectors, dlc, 2009/01/14
- Re: [avr-gcc-list] About context saving in Vectors, David Kelly, 2009/01/14
- Re: [avr-gcc-list] About context saving in Vectors, Preston Wilson, 2009/01/14
Re: [avr-gcc-list] About context saving in Vectors, Dave Hylands, 2009/01/14
Re: [avr-gcc-list] About context saving in Vectors,
Dave Hylands <=
Re: [avr-gcc-list] About context saving in Vectors, Daniel O'Connor, 2009/01/14
RE: [avr-gcc-list] About context saving in Vectors, Weddington, Eric, 2009/01/14