]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/ThirdParty/LPCOpen/lpc_core/lpc_chip/chip_18xx_43xx/atimer_18xx_43xx.h
Update LPC18xx FreeRTOS+UDP demo to use LPCOpen USB and Ethernet drivers.
[freertos] / FreeRTOS-Plus / Demo / FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC / ThirdParty / LPCOpen / lpc_core / lpc_chip / chip_18xx_43xx / atimer_18xx_43xx.h
1 /*\r
2  * @brief LPC18xx/43xx ATimer chip driver\r
3  *\r
4  * @note\r
5  * Copyright(C) NXP Semiconductors, 2012\r
6  * All rights reserved.\r
7  *\r
8  * @par\r
9  * Software that is described herein is for illustrative purposes only\r
10  * which provides customers with programming information regarding the\r
11  * LPC products.  This software is supplied "AS IS" without any warranties of\r
12  * any kind, and NXP Semiconductors and its licensor disclaim any and\r
13  * all warranties, express or implied, including all implied warranties of\r
14  * merchantability, fitness for a particular purpose and non-infringement of\r
15  * intellectual property rights.  NXP Semiconductors assumes no responsibility\r
16  * or liability for the use of the software, conveys no license or rights under any\r
17  * patent, copyright, mask work right, or any other intellectual property rights in\r
18  * or to any products. NXP Semiconductors reserves the right to make changes\r
19  * in the software without notification. NXP Semiconductors also makes no\r
20  * representation or warranty that such application will be suitable for the\r
21  * specified use without further testing or modification.\r
22  *\r
23  * @par\r
24  * Permission to use, copy, modify, and distribute this software and its\r
25  * documentation is hereby granted, under NXP Semiconductors' and its\r
26  * licensor's relevant copyrights in the software, without fee, provided that it\r
27  * is used in conjunction with NXP Semiconductors microcontrollers.  This\r
28  * copyright, permission, and disclaimer notice must appear in all copies of\r
29  * this code.\r
30  */\r
31 \r
32 #ifndef __ATIMER_18XX_43XX_H_\r
33 #define __ATIMER_18XX_43XX_H_\r
34 \r
35 /** @defgroup ATIMER_18XX_43XX CHIP: LPC18xx/43xx ATimer Driver\r
36  * @ingroup CHIP_18XX_43XX_Drivers\r
37  * @{\r
38  */\r
39 \r
40 /**\r
41  * @brief       Initialize Alarm Timer\r
42  * @param       pATIMER         : The base of ATIMER peripheral on the chip\r
43  * @param       PresetValue     : Count of 1 to 1024s for Alarm\r
44  * @return      None\r
45  */\r
46 void Chip_ATIMER_Init(LPC_ATIMER_T *pATIMER, uint32_t PresetValue);\r
47 \r
48 /**\r
49  * @brief       Close ATIMER device\r
50  * @param       pATIMER : The base of ATIMER peripheral on the chip\r
51  * @return      None\r
52  */\r
53 STATIC INLINE void Chip_ATIMER_DeInit(LPC_ATIMER_T *pATIMER)\r
54 {\r
55         IP_ATIMER_DeInit(pATIMER);\r
56 }\r
57 \r
58 /**\r
59  * @brief       Enable ATIMER Interrupt\r
60  * @param       pATIMER : The base of ATIMER peripheral on the chip\r
61  * @return      None\r
62  */\r
63 STATIC INLINE void Chip_ATIMER_IntEnable(LPC_ATIMER_T *pATIMER)\r
64 {\r
65         IP_ATIMER_IntEnable(pATIMER);\r
66 }\r
67 \r
68 /**\r
69  * @brief       Disable ATIMER Interrupt\r
70  * @param       pATIMER : The base of ATIMER peripheral on the chip\r
71  * @return      None\r
72  */\r
73 STATIC INLINE void Chip_ATIMER_IntDisable(LPC_ATIMER_T *pATIMER)\r
74 {\r
75         IP_ATIMER_IntDisable(pATIMER);\r
76 }\r
77 \r
78 /**\r
79  * @brief       Clear ATIMER Interrupt Status\r
80  * @param       pATIMER : The base of ATIMER peripheral on the chip\r
81  * @return      None\r
82  */\r
83 STATIC INLINE void Chip_ATIMER_ClearIntStatus(LPC_ATIMER_T *pATIMER)\r
84 {\r
85         IP_ATIMER_ClearIntStatus(pATIMER);\r
86 }\r
87 \r
88 /**\r
89  * @brief       Set ATIMER Interrupt Status\r
90  * @param       pATIMER : The base of ATIMER peripheral on the chip\r
91  * @return      None\r
92  */\r
93 STATIC INLINE void Chip_ATIMER_SetIntStatus(LPC_ATIMER_T *pATIMER)\r
94 {\r
95         IP_ATIMER_SetIntStatus(pATIMER);\r
96 }\r
97 \r
98 /**\r
99  * @brief       Update Preset value\r
100  * @param       pATIMER         : The base of ATIMER peripheral on the chip\r
101  * @param       PresetValue     : updated preset value\r
102  * @return      Nothing\r
103  */\r
104 STATIC INLINE void Chip_ATIMER_UpdatePresetValue(LPC_ATIMER_T *pATIMER, uint32_t PresetValue)\r
105 {\r
106         IP_ATIMER_UpdatePresetValue(pATIMER, PresetValue);\r
107 }\r
108 \r
109 /**\r
110  * @brief       Read value of preset register\r
111  * @param       pATIMER : The base of ATIMER peripheral on the chip\r
112  * @return      Value of capture register\r
113  */\r
114 STATIC INLINE uint32_t Chip_ATIMER_GetPresetValue(LPC_ATIMER_T *pATIMER)\r
115 {\r
116         return IP_ATIMER_GetPresetValue(pATIMER);\r
117 }\r
118 \r
119 /**\r
120  * @}\r
121  */\r
122 \r
123  #endif /* __ATIMER_18XX_43XX_H_ */\r