C++ ISR using class method?
<p>Is it possible to use a class method as the Interrupt Service Routine?</p>

<p>I have an ISR written and working in C using a function:</p>

<pre><code>    static void interrupt far ISR(...) {}
</code></pre>

<p>I've tried in C++ to create a method (prototype):</p>

<pre><code>    void interrupt far ISR(...);
</code></pre>

<p>Then the implementation:</p>

<pre><code>    #pragma interrupt
    void interrupt far MyClass::ISR(...) {
    ...
    }
</code></pre>

<p>But I get all sorts of errors when I try to use this with 'setvect':</p>

<pre><code>    setvect(muint16Vector, &amp;ISR);
</code></pre>

<p>I'm trying to write a class to service a serial port, the ISR would service the Rx of data from the port.  The ISR would then use instance specific members.</p>

<p>I have 3 serial ports, so I would like to create 3 instances of the class.</p>