With SDCC it's necessary to have interrupt prototypes in
your sourcefile containing main(). This can be easily
solved by inserting prototypes for all interrupts in a
device-specific header file. But you must also add
the 'using' keyword if you intend to use that in the
definition of the ISR. For this there is no general solution
because you don't know about it's priority beforehand.
I don't know if the keyword 'using' can be used in non-
interrupt functions or not. The documentation is unclear
on that. But what I would like to see is that I can leave
out 'using' on the ISR prototype and apply it to the
definition alone. This shouldn't be a problem since
interrupts are the root of a calling tree anyway and
without passed parameters or return value.
Even better would be if I didn't have to put prototypes
near main() at all and the interrupt vectors were filled
together with the interrupt definitions. This would also
leave room for optimization of really small ISR's into the
vector table itself, maybe even using vector-table space
for unused interrupts.
Log in to post a comment.