[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] How to handle interrupt vectors ?
From: |
Charalampos Alexopoulos |
Subject: |
Re: [avr-gcc-list] How to handle interrupt vectors ? |
Date: |
Tue, 28 Oct 2008 19:34:56 +0200 |
User-agent: |
Thunderbird 2.0.0.16 (X11/20080421) |
Weddington, Eric wrote:
> The easiest way to do interrupt vector handling is to not use C++. Use
> straight C, and read the avr-libc user manual on how to implement an
> Interrupt Service Routine (ISR).
>
> Eric
>
>
>> -----Original Message-----
>> From:
>> address@hidden
>> [mailto:address@hidden
>> org] On Behalf Of Charalampos Alexopoulos
>> Sent: Tuesday, October 28, 2008 10:26 AM
>> To: address@hidden
>> Subject: [avr-gcc-list] How to handle interrupt vectors ?
>>
>> Hi
>> I have only basic knowledge of c++. What i want to do is to make a
>> constant member of a class to point an interrupt vector.
>> Something like :
>>
>> class Timer0:
>> {
>> public:
>> static const vector overflow = _VECTOR(9);
>> ...
>> ...
>> };
>>
>> and then in my main programm to use it as :
>>
>> int main(void)
>> {
>> // some code here
>> }
>>
>> ISR(Timer0::overflow)
>> {
>> ...
>> }
>>
>> I read a lot the last few days but i remain clueless on the vector
>> handling. The best i can wish is somebody to give me an example of how
>> to do it, but i will be thankfull even with a suggestion for further
>> reading on topoic.
>>
>> Thank you in advance
>> Charalampos Alexopoulos
>>
>>
>>
>>
>> _______________________________________________
>> AVR-GCC-list mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
>>
>>
>
>
>
>
Thank you for your answer, but i am not looking for the easiest way. I
want to have some solution similar to previus example. I can use ISR's
even with c++ with no problem, what i need, as i said before, is to
assign a vector as a static class member in a way similar to other
types like :
class foo
{
public:
static constant uint8_t data = 0x0a;
...
}
then you can use it from some other class like:
uint8_t local_data = foo::data;
- [avr-gcc-list] How to handle interrupt vectors ?, Charalampos Alexopoulos, 2008/10/28
- RE: [avr-gcc-list] How to handle interrupt vectors ?, Weddington, Eric, 2008/10/28
- Re: [avr-gcc-list] How to handle interrupt vectors ?,
Charalampos Alexopoulos <=
- RE: [avr-gcc-list] How to handle interrupt vectors ?, Stu Bell, 2008/10/28
- Re: [avr-gcc-list] How to handle interrupt vectors ?, Pink Boy, 2008/10/28
- Re: [avr-gcc-list] How to handle interrupt vectors ?, dlc, 2008/10/28
- Re: [avr-gcc-list] How to handle interrupt vectors ?, Charalampos Alexopoulos, 2008/10/28
- Re: [avr-gcc-list] How to handle interrupt vectors ?, Joerg Wunsch, 2008/10/28
- Re: [avr-gcc-list] How to handle interrupt vectors ?, Charalampos Alexopoulos, 2008/10/29
- Re: [avr-gcc-list] How to handle interrupt vectors ?, Joerg Wunsch, 2008/10/29
- RE: [avr-gcc-list] How to handle interrupt vectors ?, Ron Kreymborg, 2008/10/30
- [avr-gcc-list] Problem when converting old WinAVR project to new WinAVR, Anton James Erasmus, 2008/10/29
Re: [avr-gcc-list] How to handle interrupt vectors ?, Joerg Wunsch, 2008/10/28