inline functions

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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 : ldi r22, 0x00 ; 0
- 0x308 : ldi r23, 0x00 ; 0
- 0x30a : ldi r24, 0x02 ; 2
0x30c : call 0x556

Where is my code?
Without inline code is ok.

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Which compiler version?

This might be a known and fixed, or a not yet known compiler bug.

Better use the avr-gcc mailing list for this kind of questions
(see http://www.avr1.org/)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avr-gcc 20030913

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, then go to the avr-gcc list, and tell it there.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i didn't find exact forum

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not a forum, a classic mailing list. You gotta subscribe first.

http://www.avr1.org/mailman/list...