2 * @brief LPC18xx/43xx State Configurable Timer 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 __SCT_18XX_43XX_H_
\r
33 #define __SCT_18XX_43XX_H_
\r
39 /** @defgroup SCT_18XX_43XX CHIP: LPC18xx/43xx State Configurable Timer driver
\r
40 * @ingroup CHIP_18XX_43XX_Drivers
\r
45 * @brief Initialize SCT
\r
46 * @param pSCT : Pointer to SCT register block
\r
49 void Chip_SCT_Init(LPC_SCT_T *pSCT);
\r
52 * @brief Shutdown SCT
\r
53 * @param pSCT : Pointer to SCT register block
\r
56 void Chip_SCT_DeInit(LPC_SCT_T *pSCT);
\r
59 * @brief Configure SCT
\r
60 * @param pSCT : Pointer to SCT register block
\r
61 * @param value : SCT Configuration register value
\r
63 * Initialise the SCT configuration register with \a value
\r
65 STATIC INLINE void Chip_SCT_Config(LPC_SCT_T *pSCT, uint32_t value)
\r
67 IP_SCT_Config(pSCT, value);
\r
71 * @brief Set or Clear the Control register
\r
72 * @param pSCT : Pointer to SCT register block
\r
73 * @param value : SCT Control register value
\r
74 * @param ena : ENABLE - To set the fields specified by value
\r
75 * : DISABLE - To clear the field specified by value
\r
77 * Set or clear the control register bits as specified by the \a value
\r
78 * parameter. If \a ena is set to ENABLE, the mentioned register fields
\r
79 * will be set. If \a ena is set to DISABLE, the mentioned register
\r
80 * fields will be cleared
\r
82 STATIC INLINE void Chip_SCT_ControlSetClr(LPC_SCT_T *pSCT, uint32_t value, FunctionalState ena)
\r
84 IP_SCT_ControlSetClr(pSCT, value, ena);
\r
88 * @brief Set the conflict resolution
\r
89 * @param pSCT : Pointer to SCT register block
\r
90 * @param outnum : Output number
\r
91 * @param value : Output value
\r
92 * - SCT_RES_NOCHANGE :No change
\r
93 * - SCT_RES_SET_OUTPUT :Set output
\r
94 * - SCT_RES_CLEAR_OUTPUT :Clear output
\r
95 * - SCT_RES_TOGGLE_OUTPUT :Toggle output
\r
96 * : SCT_RES_NOCHANGE
\r
97 * : DISABLE - To clear the field specified by value
\r
99 * Set conflict resolution for the output \a outnum
\r
101 STATIC INLINE void Chip_SCT_ConflictResolutionSet(LPC_SCT_T *pSCT, uint8_t outnum, uint8_t value)
\r
103 IP_SCT_ConflictResolutionSet(pSCT, outnum, value);
\r
107 * @brief Clear the SCT event flag
\r
108 * @param pSCT : Pointer to SCT register block
\r
109 * @param even_num : SCT Event number
\r
111 * Clear the SCT event flag for the specified event \a even_num
\r
113 STATIC INLINE void Chip_SCT_EventFlagClear(LPC_SCT_T *pSCT, uint8_t even_num)
\r
115 IP_SCT_EventFlagClear(pSCT, even_num);
\r
126 #endif /* __SCT_18XX_43XX_H_ */
\r