diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2011-06-15 15:45:12 +0200 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2011-06-15 15:45:12 +0200 |
commit | b301b089be6e59da46216ce33451063a81e54206 (patch) | |
tree | d63c2406897efd9077b5713a6cf9728bf6328498 /display.c | |
parent | aff647aaca077370451785c8c68b2af3926a7a3d (diff) | |
download | powerdebug-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.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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++; |