summaryrefslogtreecommitdiff
path: root/common/port80.c
diff options
context:
space:
mode:
authorAyushee <ayushee.shah@intel.com>2019-04-17 13:14:13 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-05-03 02:11:27 -0700
commitf5a218a8c36bf7562cd8e9c588111cc6ef45d401 (patch)
tree5673c31cfb8275a4528d11f714973a68d0e162ac /common/port80.c
parent3081e4a737875bf35d8cd8e357283a4968611de4 (diff)
downloadchrome-ec-f5a218a8c36bf7562cd8e9c588111cc6ef45d401.tar.gz
7-seg display: Add config to display port80 msg and power states
Adding this CL to display port80 message and power states of EC & SOC on the 7-segment display. BRANCH=None BUG=b:130738086 TEST=Manually tested on intelrvp, able to verify the power states and port80 message displayed on the 7 segment display Change-Id: I4437cfcd60662c8637e406e425f98fad1a4ba7ed Signed-off-by: Ayushee <ayushee.shah@intel.com> Reviewed-on: https://chromium-review.googlesource.com/1575433 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Ayushee Shah <ayushee.shah@intel.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'common/port80.c')
-rw-r--r--common/port80.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/port80.c b/common/port80.c
index 8cd392e1a7..0dc4d2135e 100644
--- a/common/port80.c
+++ b/common/port80.c
@@ -7,6 +7,7 @@
#include "common.h"
#include "console.h"
+#include "display_7seg.h"
#include "hooks.h"
#include "host_command.h"
#include "port80.h"
@@ -74,6 +75,7 @@ static void port80_dump_buffer(void)
int printed = 0;
int i;
int head, tail;
+ int last_e = 0;
/*
* Print the port 80 writes so far, clipped to the length of our
@@ -107,9 +109,14 @@ static void port80_dump_buffer(void)
cflush();
}
ccprintf(" %02x", e);
+ last_e = e;
}
}
ccputs(" <--new\n");
+
+ /* Displaying last port80 msg on 7-segment if it is enabled */
+ if (IS_ENABLED(CONFIG_SEVEN_SEG_DISPLAY) && last_e)
+ display_7seg_write(SEVEN_SEG_PORT80_DISPLAY, last_e);
}
/*****************************************************************************/