1 /**
2   ******************************************************************************
3   * @file    rtl8721d_pinmap.h
4   * @author
5   * @version V1.0.0
6   * @date    2016-05-17
7   * @brief   This file provides firmware functions to manage the following
8   *          functionalities of pin control:
9   *           - pinmux
10   *           - active pad pull up & pull down
11   *           - sleep pad pull up & pull down
12   ******************************************************************************
13   * @attention
14   *
15   * This module is a confidential and proprietary property of RealTek and
16   * possession or use of this module requires written permission of RealTek.
17   *
18   * Copyright(c) 2015, Realtek Semiconductor Corporation. All rights reserved.
19   ******************************************************************************
20   */
21 
22 #ifndef _RTL8710B_PINMAP_H_
23 #define _RTL8710B_PINMAP_H_
24 
25 /** @addtogroup AmebaD_Platform
26   * @{
27   */
28 
29 /** @defgroup PIN
30   * @brief PIN driver modules
31   * @{
32   */
33 
34 /** @defgroup PINMAP
35   * @brief PINMAP driver modules
36   * @{
37   */
38 
39 /** @addtogroup PINMAP
40   * @verbatim
41   *****************************************************************************************
42   * PINMAP
43   *****************************************************************************************
44   *   you can use pinmap to config pinmux instead of Pinmux_Config function
45   *   you can use pinmap to config GPIO pull high/low status for power save when enter power save mode
46   *****************************************************************************************
47   * How To Use
48   *****************************************************************************************
49   *	-1) ENABLE MACRO: CONFIG_PINMAP_ENABLE
50   *	-2) Set all pins function in pmap_func based on your board
51   *	-3) Bootloader will call pinmap_init, then all pinmux will be set based on pmap_func
52   *	-4) pinmap_sleep will be called when enter sleep mode, all GPIO will pull high or low based on pmap_func
53   *	-5) pinmap_wake will be called when wake from sleep mode, all GPIO will back to active mode
54   *****************************************************************************************
55   * @endverbatim
56   */
57 
58 /* Exported types ------------------------------------------------------------*/
59 
60 /** @defgroup PINMAP_Exported_Types PINMAP Exported Types
61   * @{
62   */
63 
64 /**
65   * @brief  PINMAP Init structure definition
66   */
67 typedef struct
68 {
69 	u32 PinName; /*!< Specifies the pin name, This parameter can be a value of @ref PINMUX_Pin_Name_definitions */
70 	u32 FuncPuPd;/*!< Specifies the pin function PU/PD, This parameter can be a value of @ref GPIO_Pull_parameter_definitions */
71 	u32 SleepPuPd;/*!< Specifies the pin sleep PU/PD, This parameter can be a value of @ref GPIO_Pull_parameter_definitions */
72 	u32 DSleepPuPd;/*!< Specifies the pin deep sleep PU/PD, This parameter can be a value of @ref GPIO_Pull_parameter_definitions */
73 	u32 LowPowerPin;/*!< Specifies if it is a low power pin or touch pin, if so, this pin will keep state in DSLP state */
74 } PMAP_TypeDef;
75 
76 /**
77   * @}
78   */
79 
80 /* Exported functions --------------------------------------------------------*/
81 /** @defgroup PINMAP_Exported_Functions PINMAP Exported Functions
82   * @{
83   */
84 void pinmap_init(void);
85 void pinmap_sleep(void);
86 void pinmap_deepsleep(void);
87 void pinmap_wake(void);
88 /**
89   * @}
90   */
91 
92 /**
93   * @}
94   */
95 
96 /**
97   * @}
98   */
99 
100 /**
101   * @}
102   */
103 
104 /* Other definations --------------------------------------------------------*/
105 #define GPIO_PuPd_KEEP	0xFF /* keep pupd unchanged */
106 #endif //_RTL8710B_PINMAP_H_
107 /******************* (C) COPYRIGHT 2016 Realtek Semiconductor *****END OF FILE****/
108