summaryrefslogtreecommitdiff
path: root/include/display_7seg.h
diff options
context:
space:
mode:
authorAyushee <ayushee.shah@intel.com>2019-04-05 11:39:51 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-05-02 16:12:40 -0700
commitb7a7ad3ffc436fc074c79b62194c33980e746586 (patch)
tree7332a81c666c66db9f6af9fc4422aae105c5f1b5 /include/display_7seg.h
parent34366869bbab2e7c27a037b4c7d3c15ee5bf151a (diff)
downloadchrome-ec-b7a7ad3ffc436fc074c79b62194c33980e746586.tar.gz
driver/max695x: Add 7 segment display driver
Port80 information and power sequencing states can be displayed on the 7-segment so that we can observe its information without connecting a debugger. Adding this CL to initialize and write to the 7-segment display. For port80, 80(data) gets displayed on the seven segment, for the power states, EC(state) gets displayed on the seven segment. The MAX6958/MAX6959 is a compact multiplexed common - cathode display designed to interface microprocessors with seven - segment numerical LED digits or to discrete LEDs via a 2-wire serial interface compatible with SMBusTM and I2C. The 2-wire serial interface uses fixed logic thresholds of 0.8V/2.1V when the display driver is powered from a 5V supply for compatibility with 2.5V and 3.3V systems. BRANCH=None BUG=b:130738086 TEST=Manually tested on intelrvp, able to write to the 7 segment display Change-Id: I82ba3aca40640e094463669aa1ff106ce7b99b7b Signed-off-by: Ayushee <ayushee.shah@intel.com> Reviewed-on: https://chromium-review.googlesource.com/1574665 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Ayushee Shah <ayushee.shah@intel.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'include/display_7seg.h')
-rw-r--r--include/display_7seg.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/display_7seg.h b/include/display_7seg.h
new file mode 100644
index 0000000000..9574518cb3
--- /dev/null
+++ b/include/display_7seg.h
@@ -0,0 +1,27 @@
+/* Copyright (c) 2019 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* Seven Segment Display module for Chrome EC */
+
+#ifndef __CROS_EC_DISPLAY_7SEG_H
+#define __CROS_EC_DISPLAY_7SEG_H
+
+enum seven_seg_module_display {
+ SEVEN_SEG_CONSOLE_DISPLAY, /* Console data */
+ SEVEN_SEG_EC_DISPLAY, /* power state */
+ SEVEN_SEG_PORT80_DISPLAY, /* port80 data */
+};
+
+/**
+ * Write register to MAX656x 7-segment display.
+ *
+ * @param module which is writing to the display
+ * @param data to be displayed
+ * @return EC_SUCCESS is write is successful
+ */
+int display_7seg_write(enum seven_seg_module_display module, uint16_t data);
+
+#endif /* __CROS_EC_DISPLAY_7SEG_H */
+