You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
LDC is currently unable to use calling convection for interrupts, we need to set Calling CallingConv::AVR_INTR for non-blocking interrupts and CallingConv::AVR_SIGNAL for blocking interrupts (See https://llvm.org/doxygen/CallingConv_8h_source.html).
I am working on several patches for LDC including this one to improve support
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
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)
The text was updated successfully, but these errors were encountered: