diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-02-28 21:51:23 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-02-28 21:51:23 +0000 |
commit | 386b7c38dbcf0124c55cd088fd9a1d491ee39ea9 (patch) | |
tree | 340dca04f5ed2eb70baa0af6d9cc56b3a364a002 /nuttx/configs/ez80f910200zco | |
parent | d24dad139fc6732f277a07158aca093acf874db2 (diff) | |
download | px4-nuttx-386b7c38dbcf0124c55cd088fd9a1d491ee39ea9.tar.gz px4-nuttx-386b7c38dbcf0124c55cd088fd9a1d491ee39ea9.tar.bz2 px4-nuttx-386b7c38dbcf0124c55cd088fd9a1d491ee39ea9.zip |
Can't display interrupt glyph because LEDs are interrupt driven
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1538 42af7a65-404d-4744-a932-0658087f49c3
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; + } } /**************************************************************************** |