1 /*
2  * board.h
3  *
4  * Copyright (c) 2007-2020 Allwinnertech Co., Ltd.
5  * Author: zhengxiaobin <zhengxiaobin@allwinnertech.com>
6  *
7  * This software is licensed under the terms of the GNU General Public
8  * License version 2, as published by the Free Software Foundation, and
9  * may be copied, distributed, and modified under those terms.
10  *
11  * 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  */
17 #ifndef _DISP_BOARD_CONFIG_H
18 #define _DISP_BOARD_CONFIG_H
19 
20 #include <stdio.h>
21 #include <stdint.h>
22 #include <stdlib.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 enum proerty_type {
29     PROPERTY_UNDEFINED = 0,
30     PROPERTY_INTGER,
31     PROPERTY_STRING,
32     /*for the pins which function is GPIO(IN or OUT)*/
33     PROPERTY_GPIO,
34     /*for the pins which function is not GPIO*/
35     PROPERTY_PIN,
36     /*for axp power*/
37     PROPERTY_POWER,
38 };
39 
40 /**
41  * pro
42  */
43 struct property_t {
44     char name[40];
45     enum proerty_type type;
46     union value_t {
47         u32 value;
48         char str[40];
49         struct disp_gpio_set_t gpio_list;
50         struct disp_power_t power;
51     } v;
52 };
53 
54 u32 disp_get_property_value(const char *main_name, const char *sub_name, void *value);
55 
56 struct disp_gpio_set_t *disp_get_all_pin_property(const char *main_name,
57                          u32 *list_len);
58 
59 #ifdef __cplusplus
60 }
61 #endif
62 
63 #endif /*End of file*/
64