Hallo,
ich versuche, eine enge und schnelle Interrupt Routine zu bauen - nur
einen Wert auf ein IO-Register nageln.
1 | #include <avr/interrupt.h>
|
2 | ISR(TCC4_CCB_vect)
|
3 | {
|
4 | VPORT2.DIR = portd_dir_mpx_drive;
|
5 | }
|
Paßt soweit, erzeugt aber Standardprolog und -epilog (push Status, push
R1 , ...).
Baue ich das als ISR_NAKED (dann mit inline asm)
1 | ISR(TCC4_OVF_vect, ISR_NAKED)
|
2 | {
|
3 | asm volatile(
|
4 | "push r24" );
|
5 | asm volatile(
|
6 | "out %0, %1" "\n\t"
|
7 | :
|
8 | : "i" (_SFR_IO_ADDR(VPORT2.DIR)), "r" (portd_dir_mpx_drive)
|
9 | : // no clobber here
|
10 | );
|
11 | asm volatile(
|
12 | "pop r24" "\n\t"
|
13 | "reti" "\n\t"
|
14 | );
|
15 | }
|
bekomme ich zwar den gewünschte knappen Code (Status register muß ich ja
nicht pushen, lds und out verändert da nichts), aber auch die Warnung:
Warning type of '__vector_12' defaults to 'int' [-Wimplicit-int]
Wie bekomme ich diese warning weg?
Viele Grüße Wolfgang