diff options
Diffstat (limited to 'nuttx/configs/ez80f910200zco')
-rw-r--r-- | nuttx/configs/ez80f910200zco/include/board.h | 2 | ||||
-rw-r--r-- | nuttx/configs/ez80f910200zco/src/ez80_leds.c | 20 |
2 files changed, 17 insertions, 5 deletions
diff --git a/nuttx/configs/ez80f910200zco/include/board.h b/nuttx/configs/ez80f910200zco/include/board.h index 54cf5e2c4..ecbd4aee6 100644 --- a/nuttx/configs/ez80f910200zco/include/board.h +++ b/nuttx/configs/ez80f910200zco/include/board.h @@ -55,7 +55,7 @@ #define LED_IRQSENABLED 2 /* 'E' N/A */ #define LED_STACKCREATED 3 /* 'C' N/A */ #define LED_IDLE 4 /* 'R' N/A */ -#define LED_INIRQ 5 /* 'I' (previous) */ +#define LED_INIRQ 5 /* (ignored) (ignored) */ #define LED_ASSERTION 6 /* 'A' (previous) */ #define LED_SIGNAL 7 /* 'S' (previous) */ #define LED_PANIC 8 /* '*' (previous) */ diff --git a/nuttx/configs/ez80f910200zco/src/ez80_leds.c b/nuttx/configs/ez80f910200zco/src/ez80_leds.c index 0acfd6ad3..8f0e4d3dc 100644 --- a/nuttx/configs/ez80f910200zco/src/ez80_leds.c +++ b/nuttx/configs/ez80f910200zco/src/ez80_leds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/ez80f910200zco/src/ez80_leds.c * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <spudmonkey@racsa.co.cr> * * Redistribution and use in source and binary forms, with or without @@ -200,6 +200,7 @@ static const ubyte *g_prevglyph = g_chspace; static ubyte g_anodecol = 1; static ubyte g_cathoderow = 0; +static sbyte g_intcount = 0; /**************************************************************************** * Private Functions @@ -252,8 +253,8 @@ void up_ledon(int led) break; case LED_INIRQ: - g_currglyph = g_chI; - break; + g_intcount++; + return; case LED_ASSERTION: g_currglyph = g_chA; @@ -280,7 +281,18 @@ void up_ledon(int led) void up_ledoff(int led) { - g_currglyph = g_prevglyph; + if (led == LED_INIRQ) + { + g_intcount--; + } + else if (led == LED_PANIC && g_intcount > 0) + { + g_currglyph = g_chI; + } + else + { + g_currglyph = g_prevglyph; + } } /**************************************************************************** |