]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/ThirdParty/CMSISv2p10_LPC18xx_DriverLib/inc/lpc18xx_rit.h
Slight modification to license blub text in header comments.
[freertos] / FreeRTOS-Plus / Demo / FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC / ThirdParty / CMSISv2p10_LPC18xx_DriverLib / inc / lpc18xx_rit.h
1 /**********************************************************************\r
2 * $Id$          lpc18xx_rit.h           2011-06-02\r
3 *//**\r
4 * @file         lpc18xx_rit.h\r
5 * @brief        Contains all macro definitions and function prototypes\r
6 *                       support for RIT 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 RIT RIT (Repetitive Interrupt Timer)\r
29  * @ingroup LPC1800CMSIS_FwLib_Drivers\r
30  * @{\r
31  */\r
32 \r
33 #ifndef LPC18XX_RIT_H_\r
34 #define LPC18XX_RIT_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 \r
46 \r
47 /* Private Macros ------------------------------------------------------------- */\r
48 /** @defgroup RIT_Private_Macros RIT Private Macros\r
49  * @{\r
50  */\r
51 \r
52 /* --------------------- BIT DEFINITIONS -------------------------------------- */\r
53 /*********************************************************************//**\r
54  * Macro defines for RIT control register\r
55  **********************************************************************/\r
56 /**     Set interrupt flag when the counter value equals the masked compare value */\r
57 #define RIT_CTRL_INTEN  ((uint32_t) (1))\r
58 /** Set timer enable clear to 0 when the counter value equals the masked compare value  */\r
59 #define RIT_CTRL_ENCLR  ((uint32_t) _BIT(1))\r
60 /** Set timer enable on debug */\r
61 #define RIT_CTRL_ENBR   ((uint32_t) _BIT(2))\r
62 /** Set timer enable */\r
63 #define RIT_CTRL_TEN    ((uint32_t) _BIT(3))\r
64 \r
65 /** Macro to determine if it is valid RIT peripheral */\r
66 #define PARAM_RITx(n)   (((uint32_t *)n)==((uint32_t *)LPC_RITIMER))\r
67 /**\r
68  * @}\r
69  */\r
70 \r
71 \r
72 \r
73 /* Public Functions ----------------------------------------------------------- */\r
74 /** @defgroup RIT_Public_Functions RIT Public Functions\r
75  * @{\r
76  */\r
77 /* RIT Init/DeInit functions */\r
78 void RIT_Init(LPC_RITIMER_Type *RITx);\r
79 void RIT_DeInit(LPC_RITIMER_Type *RITx);\r
80 \r
81 /* RIT config timer functions */\r
82 void RIT_TimerConfig(LPC_RITIMER_Type *RITx, uint32_t time_interval);\r
83 \r
84 /* Enable/Disable RIT functions */\r
85 void RIT_TimerClearCmd(LPC_RITIMER_Type *RITx, FunctionalState NewState);\r
86 void RIT_Cmd(LPC_RITIMER_Type *RITx, FunctionalState NewState);\r
87 void RIT_TimerDebugCmd(LPC_RITIMER_Type *RITx, FunctionalState NewState);\r
88 \r
89 /* RIT Interrupt functions */\r
90 IntStatus RIT_GetIntStatus(LPC_RITIMER_Type *RITx);\r
91 \r
92 /**\r
93  * @}\r
94  */\r
95 \r
96 #ifdef __cplusplus\r
97 }\r
98 #endif\r
99 \r
100 #endif /* LPC18XX_RIT_H_ */\r
101 \r
102 /**\r
103  * @}\r
104  */\r
105 \r
106 /* --------------------------------- End Of File ------------------------------ */\r