summaryrefslogtreecommitdiff
path: root/nuttx/arch/avr/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-06-08 18:10:55 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-06-08 18:10:55 +0000
commitc626aec4434149e17e4cd98174e59095a3a06e05 (patch)
tree7c1b6cbe99bb7af241fce8d7455181d9c025b73c /nuttx/arch/avr/include
parent583f057b1912513fce544714949e29fbe8bdf253 (diff)
downloadpx4-nuttx-c626aec4434149e17e4cd98174e59095a3a06e05.tar.gz
px4-nuttx-c626aec4434149e17e4cd98174e59095a3a06e05.tar.bz2
px4-nuttx-c626aec4434149e17e4cd98174e59095a3a06e05.zip
More AVR context switching logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3683 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/avr/include')
-rw-r--r--nuttx/arch/avr/include/avr/irq.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/nuttx/arch/avr/include/avr/irq.h b/nuttx/arch/avr/include/avr/irq.h
index b387be671..d3026c185 100644
--- a/nuttx/arch/avr/include/avr/irq.h
+++ b/nuttx/arch/avr/include/avr/irq.h
@@ -89,9 +89,14 @@
#define REG_R0 33 /* r0 */
#define REG_R24 34 /* r24 */
+/* The program counter is automatically pushed when the interrupt occurs */
+
+#define REG_PCH 35 /* PC */
+#define REG_PCL 36
+
/* Size of the register state save array (in bytes) */
-#define XCPTCONTEXT_REGS 35
+#define XCPTCONTEXT_REGS 37
/****************************************************************************
* Public Types
@@ -111,8 +116,9 @@ struct xcptcontext
/* These are saved copies of PC and SR used during signal processing.*/
- uint16_t saved_pc;
- uint8_t saved_sr;
+ uint8_t saved_pcl;
+ uint8_t saved_pch;
+ uint8_t saved_sreg;
#endif
/* Register save area */