[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] [bug #28881] nop() macro for NOP instruction
From: |
Joerg Wunsch |
Subject: |
Re: [avr-libc-dev] [bug #28881] nop() macro for NOP instruction |
Date: |
Sat, 13 Feb 2010 08:56:54 +0100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
As Weddington, Eric wrote:
> I agree that there is not a convenient place to put such a
> macro. But I would also argue now that we do not need to have such a
> macro in avr-libc. The only use for the NOP instruction is for some
> sort of delay, typically by a specific number of cycles.
Well, there are situations where you have to delay for just a single
cycle (e.g. if you're setting a port output, and want to read back an
input that depends from it). Sure, it's possible to use
__delay_cycles(1) but most people probably find it more "natural" to
just insert a single NOP there.
Maybe we could add something like <avr/cpufunc.h> or such.
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)