currently interrupts must be done by defining methods using magic names like __vector_4 for interrupt 4 (which needs to be looked up from the specific board header)
In C there is a macro
ISR(INT0_vect)
{
// code
}
which can achieve this easily.
In D I would like to still provide auto completion support (= not all code as string), while also avoiding wrong usage like trying to call the interrupt as a function (because it returns using reti instead of ret)
A possibility would be a template mixin with a delegate parameter or a function name that gets called. Would still need some work to make it work with betterC (even with CTFE) right now though.
(needs input)
currently interrupts must be done by defining methods using magic names like
__vector_4for interrupt 4 (which needs to be looked up from the specific board header)In C there is a macro
which can achieve this easily.
In D I would like to still provide auto completion support (= not all code as string), while also avoiding wrong usage like trying to call the interrupt as a function (because it returns using reti instead of ret)
A possibility would be a template mixin with a delegate parameter or a function name that gets called. Would still need some work to make it work with betterC (even with CTFE) right now though.
(needs input)