RE: [avr-libc-dev] Re: C++ Interrupts

2008-01-21 Thread Ron Kreymborg
What about a friend method? There must be a way of specifying the ISR as a friend to the CTimer0 class, allowing it access to the private data. - Dean Yes, making the interrupt a friend works exactly as I want. It solves the problem of an interrupt not having a this pointer. The overhead

RE: [avr-libc-dev] Re: C++ Interrupts

2008-01-20 Thread Ron Kreymborg
which was another line of thought for me. My solution: #define CLASS_ISR(vector, ...) { vector(); } ISR(vector, __VA_ARGS__) That can be applied to any member function in the C file, of any name. Thanks Dean. This looks like it solves all my problems. In fact it can be even more concise:

RE: [avr-libc-dev] Re: C++ Interrupts

2008-01-20 Thread Weddington, Eric
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] org] On Behalf Of Ron Kreymborg Sent: Sunday, January 20, 2008 4:26 AM To: 'Dean Camera'; avr-libc-dev@nongnu.org Subject: RE: [avr-libc-dev] Re: C++ Interrupts which was another line of thought for me

Re: [avr-libc-dev] Re: C++ Interrupts

2008-01-20 Thread Joerg Wunsch
As Dean Camera wrote: My solution: #define CLASS_ISR(vector, ...) { vector(); } ISR(vector, __VA_ARGS__) Thanks! Which means you can name the function anything, and it should be accessible as a normal function, but also link in as an ISR. As I can't seem to get the intermixed

RE: [avr-libc-dev] Re: C++ Interrupts

2008-01-20 Thread Weddington, Eric
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] org] On Behalf Of Joerg Wunsch Sent: Sunday, January 20, 2008 12:29 PM To: avr-libc-dev@nongnu.org Subject: Re: [avr-libc-dev] Re: C++ Interrupts As Dean Camera wrote: My solution: #define

RE: [avr-libc-dev] Re: C++ Interrupts

2008-01-20 Thread Ron Kreymborg
I did not want to call the interrupt myself. My intent was to make the interrupt method private (and so essentially hidden) and with access to private class data. Both of our versions fail in the latter requirement. The method I listed in earlier mails does what I want but I am still looking