[En-Nut-Discussion] Cortex ih_xxx_interuptY code duplication, continued

Harald Kipp harald.kipp at egnite.de
Mon Jul 30 16:23:00 CEST 2012

Hi Ole,

On 19.07.2012 13:26, Ole Reinhardt wrote:
> What about my idea to use the totally same code for all IRQs by changing
> the API a little and pass the sig_xxx struct to IrqCtl and to the signal
> handler as well (which could then read the users argument from the
> struct).
> Unfortunately my approach would need changes in the NutRegisterIrq as
> well. So we would have to adjust all platforms accordingly.
> @Harald: What do you think about this idea?

Frankly, I haven't been able to follow this discussion in detail, because my knowledge about Cortex peripheral architectures is quite limited.

In the first place I'd recommend to keep the API compatible. It is quite frustrating for non regular Nut/OS users to find their applications not compiling after upgrading Nut/OS. Or, to put it the other way: It was quite enjoyable to see my I2C apps compiling and running fine, even after Ulrich significantly changed the I2C API. That was good work! (Side note: It would have been even better without the typo in "Tranceiver".)

On the other hand, if you don't see a chance to keep downward compatibility:

1) Not many applications will not use their own interrupt registration. Instead they will use existing drivers.

2) Change it now. Moving from Nut/OS major version 4 to 5 implies, that major things changed. After 5.x is out, such changes are less acceptable.



More information about the En-Nut-Discussion mailing list