static void SetPcifr(void *this_ptr, unsigned pcifrBit) throw() {
static_cast<HWPcir*>(this_ptr)->SetPcifr(pcifrBit);
}
that use a void* as first parameter and then simply wrap the object
methods. In IOReg class we can now drop to explicitly mention the target
type (and instantiate a template class).
In most cases, it is not necessary to manually wrap the getter/setters;
I defined some handy macros for this:
IOREG_SETGET_UCHAR(HWPort, Pin)
which, in this case, defines two static/class methods (GetPin and
SetPin) in class HWPort.
All the static methods are excluded via #ifndef from SWIG.
I had to rename the GetPin method due to a name ambiguity to GetPhysPin
(returns a Pin& instead of normal GetPin method returning the PINx
register).
(make check runs fine, after fixing a rounfing bug in two ADC test cases)
It would be nice if this change could be added...
Cheers,
panic
_______________________________________________
Simulavr-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/simulavr-devel