[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Ron Kreymborg
Subject: RE: [avr-libc-dev] Re: C++ Interrupts
Date: Mon, 21 Jan 2008 17:54:18 +1100

> 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 for a way to automatically mangle the name.

I was mistaken in thinking my earlier version gave me access to private
data. The compiler compiled without errors (which misled me) but on testing,
at runtime the interrupt routine executes with a null this pointer.

Class data access is the crux of this idea. It means the class can manage
everything associated with the interrupting device and only present public
methods that supply or remove data. 

The method I have been using for a while where the interrupt handler calls a
public class method allowed private data access but of course the handler
was public and so was the interrupt:


Any further suggestions you have are welcome.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]