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

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

RE: [avr-gcc-list] How to (efficeiently !!!) test a bit withinamulti-byt


From: Vincent Trouilliez
Subject: RE: [avr-gcc-list] How to (efficeiently !!!) test a bit withinamulti-byte integer ?
Date: Fri, 04 Nov 2005 13:47:22 +0100

On Fri, 2005-11-04 at 13:23 +0100, niklo wrote:
> Does your lcd-routines rely on busy-waiting? That might be the reason why
> opt doesn't work. I don't know but "badly" written wait-loops might e opt'ed
> away.

Yeah I think we got the same idea... I did replace the _delay_us(40)
delay loop by a custom made empty for loop, as it's so much more
efficient, at least in this particular routine. But looks like -Os
doesn't like empty for loops ! I just checked the disassembler output,
and the loop has indeed been simply ignored/deleted !
I know, I know, I should wire the LCD R/W line and poll the 'busy' flag
instead.... I will get round to doing it... later... too many other,
more important pieces of code to write at the moment, plus, I don't
think the program will grow much bigger than 20KB max, and I have 32KB
to play with...
But that's no excuse for using empty loops instead of proper polling, as
polling it the only reliable way of doing it anyway... 


--
Vince, hiding in the corner...








reply via email to

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