summaryrefslogtreecommitdiff
path: root/nuttx/arch/avr/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-06-07 23:02:34 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-06-07 23:02:34 +0000
commit34f8aab8f0e19cc5bd0dae6bf7db3eb1d164836c (patch)
tree3f168e4ef907c5b7d53e465f31849941e24c2cf3 /nuttx/arch/avr/include
parentcb336ef5d2995014cb4f2ab74db2756621144c74 (diff)
downloadpx4-nuttx-34f8aab8f0e19cc5bd0dae6bf7db3eb1d164836c.tar.gz
px4-nuttx-34f8aab8f0e19cc5bd0dae6bf7db3eb1d164836c.tar.bz2
px4-nuttx-34f8aab8f0e19cc5bd0dae6bf7db3eb1d164836c.zip
More AVR build fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3680 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/avr/include')
-rw-r--r--nuttx/arch/avr/include/at90usb/irq.h17
-rw-r--r--nuttx/arch/avr/include/atmega/irq.h17
-rw-r--r--nuttx/arch/avr/include/avr/irq.h6
3 files changed, 3 insertions, 37 deletions
diff --git a/nuttx/arch/avr/include/at90usb/irq.h b/nuttx/arch/avr/include/at90usb/irq.h
index 6d2b9166c..c2f9db4e6 100644
--- a/nuttx/arch/avr/include/at90usb/irq.h
+++ b/nuttx/arch/avr/include/at90usb/irq.h
@@ -104,23 +104,6 @@
****************************************************************************/
#ifndef __ASSEMBLY__
-
-/* Save the current interrupt enable state & disable all interrupts */
-
-static inline irqstate_t irqsave(void)
-{
- /* Needs to return the current interrupt state, then disable interrupts */
-#warning "Not implemented"
- return 0
-}
-
-/* Restore saved interrupt state */
-
-static inline void irqrestore(irqstate_t flags)
-{
- /* Based on the provided interrupt flags, conditionally enable interrupts */
-#warning "Not implemented"
-}
#endif /* __ASSEMBLY__ */
/****************************************************************************
diff --git a/nuttx/arch/avr/include/atmega/irq.h b/nuttx/arch/avr/include/atmega/irq.h
index ea5b02060..aabf227ee 100644
--- a/nuttx/arch/avr/include/atmega/irq.h
+++ b/nuttx/arch/avr/include/atmega/irq.h
@@ -101,23 +101,6 @@
****************************************************************************/
#ifndef __ASSEMBLY__
-
-/* Save the current interrupt enable state & disable all interrupts */
-
-static inline irqstate_t irqsave(void)
-{
- /* Needs to return the current interrupt state, then disable interrupts */
-#warning "Not implemented"
- return 0
-}
-
-/* Restore saved interrupt state */
-
-static inline void irqrestore(irqstate_t flags)
-{
- /* Based on the provided interrupt flags, conditionally enable interrupts */
-#warning "Not implemented"
-}
#endif /* __ASSEMBLY__ */
/****************************************************************************
diff --git a/nuttx/arch/avr/include/avr/irq.h b/nuttx/arch/avr/include/avr/irq.h
index c18f6c4b8..07b875a0a 100644
--- a/nuttx/arch/avr/include/avr/irq.h
+++ b/nuttx/arch/avr/include/avr/irq.h
@@ -98,7 +98,7 @@ struct xcptcontext
static inline irqstate_t getsreg(void)
{
irqstate_t sreg;
- asm volatile ("in %0, __SREG__" : =r (sreg) :: );
+ asm volatile ("in %0, __SREG__" : "=r" (sreg) :: );
return sreg;
}
@@ -127,7 +127,7 @@ static inline irqstate_t irqsave(void)
asm volatile
(
"\tin %0, __SREG__\n"
- "\tcli\n
+ "\tcli\n"
: "=&r" (sreg) ::
);
return sreg;
@@ -137,7 +137,7 @@ static inline irqstate_t irqsave(void)
static inline void irqrestore(irqstate_t flags)
{
- asm volatile ("out __SREG__, %s" : : "r" (flags) : );
+ asm volatile ("out __SREG__, %0" : : "r" (flags) : );
}
#endif /* __ASSEMBLY__ */