aboutsummaryrefslogtreecommitdiff
path: root/display.c
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2011-06-15 15:45:12 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2011-06-15 15:45:12 +0200
commitb301b089be6e59da46216ce33451063a81e54206 (patch)
treed63c2406897efd9077b5713a6cf9728bf6328498 /display.c
parentaff647aaca077370451785c8c68b2af3926a7a3d (diff)
downloadpowerdebug-b301b089be6e59da46216ce33451063a81e54206.tar.gz
Encapsulate the display (6)
Let's create some ops to be registered by the pm blocks to the display. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'display.c')
-rw-r--r--display.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/display.c b/display.c
index 384714b..d55d748 100644
--- a/display.c
+++ b/display.c
@@ -49,6 +49,7 @@ struct rowdata {
struct windata {
WINDOW *win;
WINDOW *pad;
+ struct display_ops *ops;
struct rowdata *rowdata;
char *name;
int nrdata;
@@ -207,6 +208,16 @@ void print_sensor_header(void)
show_header_footer(SENSOR);
}
+int display_register(int win, struct display_ops *ops)
+{
+ if (win < 0 || win >= TOTAL_FEATURE_WINS)
+ return -1;
+
+ windata[win].ops = ops;
+
+ return 0;
+}
+
int display_next_panel(void)
{
current_win++;