summaryrefslogtreecommitdiff
path: root/nuttx/arch/pjrc-8051/src/up_initialize.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/pjrc-8051/src/up_initialize.c')
-rw-r--r--nuttx/arch/pjrc-8051/src/up_initialize.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/nuttx/arch/pjrc-8051/src/up_initialize.c b/nuttx/arch/pjrc-8051/src/up_initialize.c
index 20d2e8122..ae297d585 100644
--- a/nuttx/arch/pjrc-8051/src/up_initialize.c
+++ b/nuttx/arch/pjrc-8051/src/up_initialize.c
@@ -51,9 +51,13 @@
* Private Data
************************************************************/
-/* TRUE if processing an interrupt */
+/* This is the top of the stack containing the interrupt stack frame. It
+ * is set when processing an interrupt. It is also cleared when the
+ * interrupt returns so this can also be used like a boolean indication that
+ * we are in an interrupt.
+ */
-boolean g_ininterrupt;
+ubyte g_irqtos;
/************************************************************
* Private Functions
@@ -87,12 +91,16 @@ void up_initialize(void)
{
/* Initialize global variables */
- g_ininterrupt = FALSE;
+ g_irqtos = 0;
/* Initialize the interrupt subsystem */
+ up_irqinitialize();
+
/* Initialize the system timer interrupt */
+ up_timerinit();
+
/* Initialize the serial console support */
}