blob: 6083c53a5fc80aaf4909f25c4f1bf57cc736ba7d [file] [log] [blame]
Daniel Lezcano7c15fad2016-02-18 15:57:43 +00001/*
2 * Power debug tool (powerdebug)
Amit Aroraed3e5652010-10-27 12:02:53 +05303 *
Daniel Lezcano7c15fad2016-02-18 15:57:43 +00004 * Copyright (C) 2016, Linaro Limited.
Amit Aroraed3e5652010-10-27 12:02:53 +05305 *
Daniel Lezcano7c15fad2016-02-18 15:57:43 +00006 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
Amit Aroraed3e5652010-10-27 12:02:53 +053010 *
Daniel Lezcano7c15fad2016-02-18 15:57:43 +000011 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 *
20 */
Amit Aroraed3e5652010-10-27 12:02:53 +053021
Daniel Lezcano269de4f2011-08-25 15:46:13 +020022enum { CLOCK, REGULATOR, SENSOR, GPIO };
Daniel Lezcano4120e262011-06-15 15:45:12 +020023
Daniel Lezcanob301b082011-06-15 15:45:12 +020024struct display_ops {
Daniel Lezcanod577aaa2011-06-21 00:57:08 +020025 int (*display)(bool refresh);
Daniel Lezcanob301b082011-06-15 15:45:12 +020026 int (*select)(void);
Daniel Lezcanoa12163d2011-06-21 00:57:08 +020027 int (*find)(const char *);
Daniel Lezcano73b40022011-06-21 00:57:08 +020028 int (*selectf)(void);
Shaojie Sun8ac4a2e2013-07-29 20:11:46 +080029 int (*change)(int keyvalue);
Daniel Lezcanob301b082011-06-15 15:45:12 +020030};
Daniel Lezcanod96731a2011-06-15 15:45:12 +020031
Daniel Lezcano5e659d72016-02-19 20:22:12 +000032struct powerdebug_options;
33
Daniel Lezcano971515a2011-06-15 15:45:12 +020034extern int display_print_line(int window, int line, char *str,
35 int bold, void *data);
36
Daniel Lezcanod42d7ad2016-02-22 15:02:57 +010037extern int display_print_error(int window, int line, char *str);
38
Daniel Lezcano971515a2011-06-15 15:45:12 +020039extern int display_refresh_pad(int window);
40extern int display_reset_cursor(int window);
41extern void *display_get_row_data(int window);
42
Daniel Lezcano5e659d72016-02-19 20:22:12 +000043extern int display_init(struct powerdebug_options *opt);
Daniel Lezcanob301b082011-06-15 15:45:12 +020044extern int display_register(int win, struct display_ops *ops);
Daniel Lezcano372ffba2011-06-21 00:57:08 +020045extern int display_column_name(const char *line);
Nishanth Menon962d1c42011-09-20 11:31:17 +020046
47#define NAME_MAX 255