blob: fa2e4d400296c80a8935d8224c2b8ba7f5215e17 [file] [log] [blame]
yuezonghe824eb0c2024-06-27 02:32:26 -07001/*******************************************************************************
2* Copyright (C) 2014, ZTE Corporation.
3*
4* File Name:
5* File Mark:
6* Description:
7* Others:
8* Version: V1.0
9* Author: shideyou
10* Date: 2014-04-01
11* History 1:
12* Date:
13* Version:
14* Author:
15* Modification:
16* History 2:
17********************************************************************************/
18#ifndef __DRVS_GPIO_REF_H_
19#define __DRVS_GPIO_REF_H_
20
21/*************************************************************************
22* Include files *
23*************************************************************************/
24#include "drvs_gpio.h"
25/*************************************************************************
26* Macro *
27*************************************************************************/
28
29
30/**************************************************************************
31* Types *
32**************************************************************************/
33typedef struct _T_ZDrvGpio_Config{
34 UINT32 number; //GPIO number
35 const char *name;
36}T_ZDrvGpio_Config;
37
38typedef struct _T_Gpio_ConfigData{
39 T_ZDrvGpio_Config *config_table;
40 UINT32 ngpios;
41}T_Gpio_ConfigData;
42
43typedef struct _T_Gpio_Init{
44 UINT32 number; //gpio number
45 UINT32 topFuncSel; //top func
46 UINT32 pdFuncSel; //pd func
47 UINT32 aonFuncSel; //aon func
48 UINT32 pullUpDownSel; //up down sel
49 T_ZDrvGpio_IoDirection inout;
50 T_ZDrvGpio_IoVal highlow;
51}T_Gpio_Init;
52
53typedef struct _T_Gpio_InitData{
54 T_Gpio_Init *init_table;
55 UINT32 ngpios;
56}T_Gpio_InitData;
57
58
59/**************************************************************************
60* Global Variable *
61**************************************************************************/
62
63
64/**************************************************************************
65* Function Prototypes *
66**************************************************************************/
67
68
69/**************************************************************************
70* Function Defines *
71**************************************************************************/
72
73/**************************************************************************
74* Functin: Gpio_GetConfig
75* Description: This function is used to get the table of gpio config.
76* Parameters:
77* Input:
78* NONE
79*
80* Output:
81* pointer of config table
82*
83* Returns:
84* NONE
85*
86* Others:
87* None.
88**************************************************************************/
89VOID Gpio_GetConfigTable(T_Gpio_ConfigData *gpio_conf, T_Gpio_InitData *gpio_init);
90
91
92#endif