avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] inline functions


From: brb
Subject: [avr-gcc-list] inline functions
Date: Sun, 26 Oct 2003 16:28:52 -0500

What do I do wrong?
static inline void data_in ( void ) {
asm volatile ("sbi 0x12,1;"); // PORTD |= 2;
asm volatile ("cbi 0x12,0;"); // PORTD &= ~1;
asm volatile ("cbi 0x11,1;"); // DDRD &= ~2;
}

static inline bool rd_data ( void ) { // return ( PIND & 2 );
asm volatile ("eor r24,r24;");
asm volatile ("sbic 0x10,1;");
asm volatile ("ori r24, 1;");
}



181 data_in();
182 while ( rd_data () == TRUE ) sleep ( SLP_TMO, 0 );
- 0x306 <sht_read+90>: ldi r22, 0x00 ; 0
- 0x308 <sht_read+92>: ldi r23, 0x00 ; 0
- 0x30a <sht_read+94>: ldi r24, 0x02 ; 2
0x30c <sht_read+96>: call 0x556

Where is my code?
Without inline code is ok.

Thanks


reply via email to

[Prev in Thread] Current Thread [Next in Thread]