Op 19-7-2010 17:10, Sébastien Lorquet wrote:
> hi,
>
> i'm playing with interrupts in pic18.
>
The way I use this works. Code is for the uart interrupts:
main.c:
extern _RC_handler;
extern _TX_handler;
DEF_INTHIGH(high_int)
DEF_HANDLER(SIG_RC, _RC_handler)
DEF_HANDLER(SIG_TX, _TX_handler)
END_
Hi,
Thanks for the clarification, I understand the problem.
writing "extern isr_name;" is perfectly fine for me, just had to know it!
Would that make its way into the documentation as a tip?
could this be implemented as a #pragma symbol USED or another declarator
attribute one day or another?
R
Hi,
C is a bit lax with types -- if there is none given, it often assumes int,
as in ''extern portb_isr'', which is (correctly) interpreted as
''extern int portb_isr;''.
>> For a SIGHANDLER that is defined in the SAME file, I have to forward
>> declare it using: SIGHANDLER(portb_isr); ; extern po
> thanks, this weird "extern" statement did the trick. I did not know
> this syntax.
>
> But that's strange:
>
> For a SIGHANDLER that is defined in the SAME file, I have to forward
> declare it using: SIGHANDLER(portb_isr); ; extern portb_isr fails with:
> main.c:162: error 98: conflict with pr
Hi,
thanks, this weird "extern" statement did the trick. I did not know this
syntax.
But that's strange:
For a SIGHANDLER that is defined in the SAME file, I have to forward declare
it using: SIGHANDLER(portb_isr); ; extern portb_isr fails with:
main.c:162: error 98: conflict with previous defin
Op 19-7-2010 17:10, Sébastien Lorquet wrote:
> hi,
>
> i'm playing with interrupts in pic18.
>
The way I use this works. Code is for the uart interrupts:
main.c:
extern _RC_handler;
extern _TX_handler;
DEF_INTHIGH(high_int)
DEF_HANDLER(SIG_RC, _RC_handler)
DEF_HANDLER(SIG_TX, _TX_handler)
END
PS: I have
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08
2.9.4 #5599 (Dec 18 2009) (MINGW32)
Sebastien
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G pho
hi,
i'm playing with interrupts in pic18.
in main.c I have:
#include
SIGHANDLER(i2c_slave_isr); //forward declaration, implementation is
elsewhere
DEF_INTHIGH(high_int)
DEF_HANDLER(SIG_SSP, i2c_slave_isr);
END_DEF
-