]> git.sur5r.net Git - freertos/blob
43ae6adaad7bcf14ce3cc9061e2ff579bdace5f4
[freertos] /
1 /**********************************************************************\r
2 * $Id$          lpc18xx_rgu.h           2011-06-02\r
3 *//**\r
4 * @file         lpc18xx_rgu.h\r
5 * @brief        Contains all macro definitions and function prototypes\r
6 *                       support for RGU firmware library on LPC18xx\r
7 * @version      1.0\r
8 * @date         02. June. 2011\r
9 * @author       NXP MCU SW Application Team\r
10 *\r
11 * Copyright(C) 2011, NXP Semiconductor\r
12 * All rights reserved.\r
13 *\r
14 ***********************************************************************\r
15 * Software that is described herein is for illustrative purposes only\r
16 * which provides customers with programming information regarding the\r
17 * products. This software is supplied "AS IS" without any warranties.\r
18 * NXP Semiconductors assumes no responsibility or liability for the\r
19 * use of the software, conveys no license or title under any patent,\r
20 * copyright, or mask work right to the product. NXP Semiconductors\r
21 * reserves the right to make changes in the software without\r
22 * notification. NXP Semiconductors also make no representation or\r
23 * warranty that such application will be suitable for the specified\r
24 * use without further testing or modification.\r
25 **********************************************************************/\r
26 \r
27 /* Peripheral group ----------------------------------------------------------- */\r
28 /** @defgroup RGU RGU (Reset Generation Unit)\r
29  * @ingroup LPC1800CMSIS_FwLib_Drivers\r
30  * @{\r
31  */\r
32 \r
33 #ifndef LPC18XX_RGU_H_\r
34 #define LPC18XX_RGU_H_\r
35 \r
36 /* Includes ------------------------------------------------------------------- */\r
37 #include "LPC18xx.h"\r
38 #include "lpc_types.h"\r
39 \r
40 \r
41 #ifdef __cplusplus\r
42 extern "C"\r
43 {\r
44 #endif\r
45 /* Public Types --------------------------------------------------------------- */\r
46 /** @defgroup RGU_Public_Types RGU Public Types\r
47  * @{\r
48  */\r
49 \r
50 /*********************************************************************//**\r
51  * @brief RGU enumeration\r
52  **********************************************************************/\r
53 /** @brief Out Reset Signal Generated by RGU */\r
54 typedef enum\r
55 {\r
56         RGU_SIG_CORE  = 0,                                      /**< Core reset signal                  */\r
57         RGU_SIG_PERIPH,                                         /**< Peripheral reset signal    */\r
58         RGU_SIG_MASTER,                                         /**< Master reset signal                */\r
59         RGU_SIG_WWDT = 4,                                       /**< WWDT reset signal                  */\r
60         RGU_SIG_CREG,                                           /**< CREG reset signal                  */\r
61         RGU_SIG_BUS = 8,                                        /**< Bus reset signal                   */\r
62         RGU_SIG_SCU,                                            /**< SCU reset signal                   */\r
63         RGU_SIG_PINMUX,                                         /**< Pin mux reset signal               */\r
64         RGU_SIG_M3 = 13,                                        /**< Cortex-M3 reset signal             */\r
65         RGU_SIG_LCD = 16,                                       /**< LCD reset signal                   */\r
66         RGU_SIG_USB0,                                           /**< USB0 reset signal                  */\r
67         RGU_SIG_USB1,                                           /**< USB1 reset signal                  */\r
68         RGU_SIG_DMA,                                            /**< DMA reset signal                   */\r
69         RGU_SIG_SDIO,                                           /**< SDIO reset signal                  */\r
70         RGU_SIG_EMC,                                            /**< EMC reset signal                   */\r
71         RGU_SIG_ETHERNET,                                       /**< Ethernet reset signal              */\r
72         RGU_SIG_AES,                                            /**< AES reset signal                   */\r
73         RGU_SIG_GPIO = 28,                                      /**< GPIO reset signal                  */\r
74         RGU_SIG_TIMER0 = 32,                            /**< TIMER 0 reset signal               */\r
75         RGU_SIG_TIMER1,                                         /**< TIMER 1 reset signal               */\r
76         RGU_SIG_TIMER2,                                         /**< TIMER 2 reset signal               */\r
77         RGU_SIG_TIMER3,                                         /**< TIMER 3 reset signal               */\r
78         RGU_SIG_RITIMER,                                        /**< RIT timer reset signal             */\r
79         RGU_SIG_SCT,                                            /**< SCT reset signal                   */\r
80         RGU_SIG_MOTOCONPWM,                                     /**< Motor control reset signal */\r
81         RGU_SIG_QEI,                                            /**< QEI reset signal                   */\r
82         RGU_SIG_ADC0,                                           /**< ADC0 reset signal                  */\r
83         RGU_SIG_ADC1,                                           /**< ADC1 reset signal                  */\r
84         RGU_SIG_DAC,                                            /**< DAC reset signal                   */\r
85         RGU_SIG_UART0 = 44,                                     /**< UART0 reset signal                 */\r
86         RGU_SIG_UART1,                                          /**< UART1 reset signal                 */\r
87         RGU_SIG_UART2,                                          /**< UART2 reset signal                 */\r
88         RGU_SIG_UART3,                                          /**< UART3 reset signal                 */\r
89         RGU_SIG_I2C0,                                           /**< I2C0 reset signal                  */\r
90         RGU_SIG_I2C1,                                           /**< I2C1 reset signal                  */\r
91         RGU_SIG_SSP0,                                           /**< SSP0 reset signal                  */\r
92         RGU_SIG_SSP1,                                           /**< SSP1 reset signal                  */\r
93         RGU_SIG_I2S,                                            /**< I2S reset signal                   */\r
94         RGU_SIG_SPIFI,                                          /**< SPIFI reset signal                 */\r
95         RGU_SIG_CAN = 55                                        /**< CAN reset signal                   */\r
96 }RGU_SIG;\r
97 \r
98 /** @brief Reset Cause Source */\r
99 typedef enum {\r
100         RGU_SRC_NONE,                                           /**< No source                          */\r
101         RGU_SRC_SOFT,                                           /**< Software reset source      */\r
102         RGU_SRC_EXT,                                            /**< External reset source      */\r
103         RGU_SRC_CORE,                                           /**< Core reset source          */\r
104         RGU_SRC_PERIPH,                                         /**< Peripheral reset source*/\r
105         RGU_SRC_MASTER,                                         /**< Master reset source        */\r
106         RGU_SRC_BOD,                                            /**< BOD reset source           */\r
107         RGU_SRC_WWDT                                            /**< WWDT reset source          */\r
108 }RGU_SRC;\r
109 /**\r
110  * @}\r
111  */\r
112 \r
113 \r
114 /* Public Functions ----------------------------------------------------------- */\r
115 /** @defgroup RGU_Public_Functions RGU Public Functions\r
116  * @{\r
117  */\r
118 /* RGU peripheral control function ----------------*/\r
119 void RGU_SoftReset(RGU_SIG ResetSignal);\r
120 RGU_SRC RGU_GetSource(RGU_SIG ResetSignal);\r
121 Bool RGU_GetSignalStatus(RGU_SIG ResetSignal);\r
122 \r
123 /**\r
124  * @}\r
125  */\r
126 \r
127 \r
128 #ifdef __cplusplus\r
129 }\r
130 #endif\r
131 \r
132 \r
133 #endif /* LPC18XX_RGU_H_ */\r
134 \r
135 /**\r
136  * @}\r
137  */\r
138 \r
139 /* --------------------------------- End Of File ------------------------------ */\r