2 * @brief LPC18xx/43xx ATimer chip driver
\r
5 * Copyright(C) NXP Semiconductors, 2012
\r
6 * All rights reserved.
\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
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
32 #ifndef __ATIMER_18XX_43XX_H_
\r
33 #define __ATIMER_18XX_43XX_H_
\r
35 /** @defgroup ATIMER_18XX_43XX CHIP: LPC18xx/43xx ATimer Driver
\r
36 * @ingroup CHIP_18XX_43XX_Drivers
\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
46 void Chip_ATIMER_Init(LPC_ATIMER_T *pATIMER, uint32_t PresetValue);
\r
49 * @brief Close ATIMER device
\r
50 * @param pATIMER : The base of ATIMER peripheral on the chip
\r
53 STATIC INLINE void Chip_ATIMER_DeInit(LPC_ATIMER_T *pATIMER)
\r
55 IP_ATIMER_DeInit(pATIMER);
\r
59 * @brief Enable ATIMER Interrupt
\r
60 * @param pATIMER : The base of ATIMER peripheral on the chip
\r
63 STATIC INLINE void Chip_ATIMER_IntEnable(LPC_ATIMER_T *pATIMER)
\r
65 IP_ATIMER_IntEnable(pATIMER);
\r
69 * @brief Disable ATIMER Interrupt
\r
70 * @param pATIMER : The base of ATIMER peripheral on the chip
\r
73 STATIC INLINE void Chip_ATIMER_IntDisable(LPC_ATIMER_T *pATIMER)
\r
75 IP_ATIMER_IntDisable(pATIMER);
\r
79 * @brief Clear ATIMER Interrupt Status
\r
80 * @param pATIMER : The base of ATIMER peripheral on the chip
\r
83 STATIC INLINE void Chip_ATIMER_ClearIntStatus(LPC_ATIMER_T *pATIMER)
\r
85 IP_ATIMER_ClearIntStatus(pATIMER);
\r
89 * @brief Set ATIMER Interrupt Status
\r
90 * @param pATIMER : The base of ATIMER peripheral on the chip
\r
93 STATIC INLINE void Chip_ATIMER_SetIntStatus(LPC_ATIMER_T *pATIMER)
\r
95 IP_ATIMER_SetIntStatus(pATIMER);
\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
104 STATIC INLINE void Chip_ATIMER_UpdatePresetValue(LPC_ATIMER_T *pATIMER, uint32_t PresetValue)
\r
106 IP_ATIMER_UpdatePresetValue(pATIMER, PresetValue);
\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
114 STATIC INLINE uint32_t Chip_ATIMER_GetPresetValue(LPC_ATIMER_T *pATIMER)
\r
116 return IP_ATIMER_GetPresetValue(pATIMER);
\r
123 #endif /* __ATIMER_18XX_43XX_H_ */
\r