1 /**************************************************************************//**
2  * @file     ACMP.h
3  * @version  V1.00
4  * @brief    M480 Series ACMP Driver Header File
5  *
6  * SPDX-License-Identifier: Apache-2.0
7  * @copyright (C) 2016-2020 Nuvoton Technology Corp. All rights reserved.
8  ******************************************************************************/
9 #ifndef __ACMP_H__
10 #define __ACMP_H__
11 
12 
13 #ifdef __cplusplus
14 extern "C"
15 {
16 #endif
17 
18 
19 /** @addtogroup Standard_Driver Standard Driver
20   @{
21 */
22 
23 
24 /** @addtogroup ACMP_Driver ACMP Driver
25   @{
26 */
27 
28 
29 /** @addtogroup ACMP_EXPORTED_CONSTANTS ACMP Exported Constants
30   @{
31 */
32 
33 
34 
35 /*---------------------------------------------------------------------------------------------------------*/
36 /* ACMP_CTL constant definitions                                                                           */
37 /*---------------------------------------------------------------------------------------------------------*/
38 #define ACMP_CTL_FILTSEL_OFF         (0UL << ACMP_CTL_FILTSEL_Pos) /*!< ACMP_CTL setting for filter function disabled. \hideinitializer */
39 #define ACMP_CTL_FILTSEL_1PCLK       (1UL << ACMP_CTL_FILTSEL_Pos) /*!< ACMP_CTL setting for 1 PCLK filter count. \hideinitializer */
40 #define ACMP_CTL_FILTSEL_2PCLK       (2UL << ACMP_CTL_FILTSEL_Pos) /*!< ACMP_CTL setting for 2 PCLK filter count. \hideinitializer */
41 #define ACMP_CTL_FILTSEL_4PCLK       (3UL << ACMP_CTL_FILTSEL_Pos) /*!< ACMP_CTL setting for 4 PCLK filter count. \hideinitializer */
42 #define ACMP_CTL_FILTSEL_8PCLK       (4UL << ACMP_CTL_FILTSEL_Pos) /*!< ACMP_CTL setting for 8 PCLK filter count. \hideinitializer */
43 #define ACMP_CTL_FILTSEL_16PCLK      (5UL << ACMP_CTL_FILTSEL_Pos) /*!< ACMP_CTL setting for 16 PCLK filter count. \hideinitializer */
44 #define ACMP_CTL_FILTSEL_32PCLK      (6UL << ACMP_CTL_FILTSEL_Pos) /*!< ACMP_CTL setting for 32 PCLK filter count. \hideinitializer */
45 #define ACMP_CTL_FILTSEL_64PCLK      (7UL << ACMP_CTL_FILTSEL_Pos) /*!< ACMP_CTL setting for 64 PCLK filter count. \hideinitializer */
46 #define ACMP_CTL_INTPOL_RF           (0UL << ACMP_CTL_INTPOL_Pos)  /*!< ACMP_CTL setting for selecting rising edge and falling edge as interrupt condition. \hideinitializer */
47 #define ACMP_CTL_INTPOL_R            (1UL << ACMP_CTL_INTPOL_Pos)  /*!< ACMP_CTL setting for selecting rising edge as interrupt condition. \hideinitializer */
48 #define ACMP_CTL_INTPOL_F            (2UL << ACMP_CTL_INTPOL_Pos)  /*!< ACMP_CTL setting for selecting falling edge as interrupt condition. \hideinitializer */
49 #define ACMP_CTL_POSSEL_P0           (0UL << ACMP_CTL_POSSEL_Pos)  /*!< ACMP_CTL setting for selecting ACMPx_P0 pin as the source of ACMP V+. \hideinitializer */
50 #define ACMP_CTL_POSSEL_P1           (1UL << ACMP_CTL_POSSEL_Pos)  /*!< ACMP_CTL setting for selecting ACMPx_P1 pin as the source of ACMP V+. \hideinitializer */
51 #define ACMP_CTL_POSSEL_P2           (2UL << ACMP_CTL_POSSEL_Pos)  /*!< ACMP_CTL setting for selecting ACMPx_P2 pin as the source of ACMP V+. \hideinitializer */
52 #define ACMP_CTL_POSSEL_P3           (3UL << ACMP_CTL_POSSEL_Pos)  /*!< ACMP_CTL setting for selecting ACMPx_P3 pin as the source of ACMP V+. \hideinitializer */
53 #define ACMP_CTL_NEGSEL_PIN          (0UL << ACMP_CTL_NEGSEL_Pos)  /*!< ACMP_CTL setting for selecting the voltage of ACMP negative input pin as the source of ACMP V-. \hideinitializer */
54 #define ACMP_CTL_NEGSEL_CRV          (1UL << ACMP_CTL_NEGSEL_Pos)  /*!< ACMP_CTL setting for selecting internal comparator reference voltage as the source of ACMP V-. \hideinitializer */
55 #define ACMP_CTL_NEGSEL_VBG          (2UL << ACMP_CTL_NEGSEL_Pos)  /*!< ACMP_CTL setting for selecting internal Band-gap voltage as the source of ACMP V-. \hideinitializer */
56 #define ACMP_CTL_NEGSEL_DAC          (3UL << ACMP_CTL_NEGSEL_Pos)  /*!< ACMP_CTL setting for selecting DAC output voltage as the source of ACMP V-. \hideinitializer */
57 #define ACMP_CTL_HYSTERESIS_30MV     (3UL << ACMP_CTL_HYSSEL_Pos)  /*!< ACMP_CTL setting for enabling the hysteresis function at 30mV. \hideinitializer */
58 #define ACMP_CTL_HYSTERESIS_20MV     (2UL << ACMP_CTL_HYSSEL_Pos)  /*!< ACMP_CTL setting for enabling the hysteresis function at 20mV. \hideinitializer */
59 #define ACMP_CTL_HYSTERESIS_10MV     (1UL << ACMP_CTL_HYSSEL_Pos)  /*!< ACMP_CTL setting for enabling the hysteresis function at 10mV. \hideinitializer */
60 #define ACMP_CTL_HYSTERESIS_DISABLE  (0UL << ACMP_CTL_HYSSEL_Pos)  /*!< ACMP_CTL setting for disabling the hysteresis function. \hideinitializer */
61 
62 /*---------------------------------------------------------------------------------------------------------*/
63 /* ACMP_VREF constant definitions                                                                          */
64 /*---------------------------------------------------------------------------------------------------------*/
65 #define ACMP_VREF_CRVSSEL_VDDA       (0UL << ACMP_VREF_CRVSSEL_Pos)  /*!< ACMP_VREF setting for selecting analog supply voltage VDDA as the CRV source voltage \hideinitializer */
66 #define ACMP_VREF_CRVSSEL_INTVREF    (1UL << ACMP_VREF_CRVSSEL_Pos)  /*!< ACMP_VREF setting for selecting internal reference voltage as the CRV source voltage \hideinitializer */
67 
68 
69 /*@}*/ /* end of group ACMP_EXPORTED_CONSTANTS */
70 
71 
72 /** @addtogroup ACMP_EXPORTED_FUNCTIONS ACMP Exported Functions
73   @{
74 */
75 
76 /*---------------------------------------------------------------------------------------------------------*/
77 /*  Define Macros and functions                                                                            */
78 /*---------------------------------------------------------------------------------------------------------*/
79 
80 
81 /**
82   * @brief This macro is used to enable output inverse function
83   * @param[in] acmp The pointer of the specified ACMP module
84   * @param[in] u32ChNum The ACMP number
85   * @return None
86   * @details This macro will set ACMPOINV bit of ACMP_CTL register to enable output inverse function.
87   * \hideinitializer
88   */
89 #define ACMP_ENABLE_OUTPUT_INVERSE(acmp, u32ChNum) ((acmp)->CTL[(u32ChNum)] |= ACMP_CTL_ACMPOINV_Msk)
90 
91 /**
92   * @brief This macro is used to disable output inverse function
93   * @param[in] acmp The pointer of the specified ACMP module
94   * @param[in] u32ChNum The ACMP number
95   * @return None
96   * @details This macro will clear ACMPOINV bit of ACMP_CTL register to disable output inverse function.
97   * \hideinitializer
98   */
99 #define ACMP_DISABLE_OUTPUT_INVERSE(acmp, u32ChNum) ((acmp)->CTL[(u32ChNum)] &= ~ACMP_CTL_ACMPOINV_Msk)
100 
101 /**
102   * @brief This macro is used to select ACMP negative input source
103   * @param[in] acmp The pointer of the specified ACMP module
104   * @param[in] u32ChNum The ACMP number
105   * @param[in] u32Src is comparator negative input selection. Including:
106   *                  - \ref ACMP_CTL_NEGSEL_PIN
107   *                  - \ref ACMP_CTL_NEGSEL_CRV
108   *                  - \ref ACMP_CTL_NEGSEL_VBG
109   *                  - \ref ACMP_CTL_NEGSEL_DAC
110   * @return None
111   * @details This macro will set NEGSEL (ACMP_CTL[5:4]) to determine the source of negative input.
112   * \hideinitializer
113   */
114 #define ACMP_SET_NEG_SRC(acmp, u32ChNum, u32Src) ((acmp)->CTL[(u32ChNum)] = ((acmp)->CTL[(u32ChNum)] & ~ACMP_CTL_NEGSEL_Msk) | (u32Src))
115 
116 /**
117   * @brief This macro is used to enable hysteresis function and set hysteresis to 30mV
118   * @param[in] acmp The pointer of the specified ACMP module
119   * @param[in] u32ChNum The ACMP number
120   * @return None
121   * \hideinitializer
122   */
123 #define ACMP_ENABLE_HYSTERESIS(acmp, u32ChNum) ((acmp)->CTL[(u32ChNum)] |= ACMP_CTL_HYSTERESIS_30MV)
124 
125 /**
126   * @brief This macro is used to disable hysteresis function
127   * @param[in] acmp The pointer of the specified ACMP module
128   * @param[in] u32ChNum The ACMP number
129   * @return None
130   * @details This macro will clear HYSEL bits of ACMP_CTL register to disable hysteresis function.
131   * \hideinitializer
132   */
133 #define ACMP_DISABLE_HYSTERESIS(acmp, u32ChNum) ((acmp)->CTL[(u32ChNum)] &= ~ACMP_CTL_HYSSEL_Msk)
134 
135 /**
136   * @brief This macro is used to select hysteresis level
137   * @param[in] acmp The pointer of the specified ACMP module
138   * @param[in] u32ChNum The ACMP number
139   * @param[in] u32HysSel The hysteresis function option. Including:
140   *                  - \ref ACMP_CTL_HYSTERESIS_30MV
141   *                  - \ref ACMP_CTL_HYSTERESIS_20MV
142   *                  - \ref ACMP_CTL_HYSTERESIS_10MV
143   *                  - \ref ACMP_CTL_HYSTERESIS_DISABLE
144   * \hideinitializer
145   * @return None
146   */
147 #define ACMP_CONFIG_HYSTERESIS(acmp, u32ChNum, u32HysSel) ((acmp)->CTL[(u32ChNum)] = ((acmp)->CTL[(u32ChNum)] & ~ACMP_CTL_HYSSEL_Msk) | (u32HysSel))
148 
149 /**
150   * @brief This macro is used to enable interrupt
151   * @param[in] acmp The pointer of the specified ACMP module
152   * @param[in] u32ChNum The ACMP number
153   * @return None
154   * @details This macro will set ACMPIE bit of ACMP_CTL register to enable interrupt function.
155   *          If wake-up function is enabled, the wake-up interrupt will be enabled as well.
156   * \hideinitializer
157   */
158 #define ACMP_ENABLE_INT(acmp, u32ChNum) ((acmp)->CTL[(u32ChNum)] |= ACMP_CTL_ACMPIE_Msk)
159 
160 /**
161   * @brief This macro is used to disable interrupt
162   * @param[in] acmp The pointer of the specified ACMP module
163   * @param[in] u32ChNum The ACMP number
164   * @return None
165   * @details This macro will clear ACMPIE bit of ACMP_CTL register to disable interrupt function.
166   * \hideinitializer
167   */
168 #define ACMP_DISABLE_INT(acmp, u32ChNum) ((acmp)->CTL[(u32ChNum)] &= ~ACMP_CTL_ACMPIE_Msk)
169 
170 /**
171   * @brief This macro is used to enable ACMP
172   * @param[in] acmp The pointer of the specified ACMP module
173   * @param[in] u32ChNum The ACMP number
174   * @return None
175   * @details This macro will set ACMPEN bit of ACMP_CTL register to enable analog comparator.
176   * \hideinitializer
177   */
178 #define ACMP_ENABLE(acmp, u32ChNum) ((acmp)->CTL[(u32ChNum)] |= ACMP_CTL_ACMPEN_Msk)
179 
180 /**
181   * @brief This macro is used to disable ACMP
182   * @param[in] acmp The pointer of the specified ACMP module
183   * @param[in] u32ChNum The ACMP number
184   * @return None
185   * @details This macro will clear ACMPEN bit of ACMP_CTL register to disable analog comparator.
186   * \hideinitializer
187   */
188 #define ACMP_DISABLE(acmp, u32ChNum) ((acmp)->CTL[(u32ChNum)] &= ~ACMP_CTL_ACMPEN_Msk)
189 
190 /**
191   * @brief This macro is used to get ACMP output value
192   * @param[in] acmp The pointer of the specified ACMP module
193   * @param[in] u32ChNum The ACMP number
194   * @return  ACMP output value
195   * @details This macro will return the ACMP output value.
196   * \hideinitializer
197   */
198 #define ACMP_GET_OUTPUT(acmp, u32ChNum) (((acmp)->STATUS & (ACMP_STATUS_ACMPO0_Msk<<((u32ChNum))))?1:0)
199 
200 /**
201   * @brief This macro is used to get ACMP interrupt flag
202   * @param[in] acmp The pointer of the specified ACMP module
203   * @param[in] u32ChNum The ACMP number
204   * @return   ACMP interrupt occurred (1) or not (0)
205   * @details This macro will return the ACMP interrupt flag.
206   * \hideinitializer
207   */
208 #define ACMP_GET_INT_FLAG(acmp, u32ChNum) (((acmp)->STATUS & (ACMP_STATUS_ACMPIF0_Msk<<((u32ChNum))))?1:0)
209 
210 /**
211   * @brief This macro is used to clear ACMP interrupt flag
212   * @param[in] acmp The pointer of the specified ACMP module
213   * @param[in] u32ChNum The ACMP number
214   * @return   None
215   * @details This macro will write 1 to ACMPIFn bit of ACMP_STATUS register to clear interrupt flag.
216   * \hideinitializer
217   */
218 #define ACMP_CLR_INT_FLAG(acmp, u32ChNum) ((acmp)->STATUS = (ACMP_STATUS_ACMPIF0_Msk<<((u32ChNum))))
219 
220 /**
221   * @brief This macro is used to clear ACMP wake-up interrupt flag
222   * @param[in] acmp The pointer of the specified ACMP module
223   * @param[in] u32ChNum The ACMP number
224   * @return   None
225   * @details This macro will write 1 to WKIFn bit of ACMP_STATUS register to clear interrupt flag.
226   * \hideinitializer
227   */
228 #define ACMP_CLR_WAKEUP_INT_FLAG(acmp, u32ChNum) ((acmp)->STATUS = (ACMP_STATUS_WKIF0_Msk<<((u32ChNum))))
229 
230 /**
231   * @brief This macro is used to enable ACMP wake-up function
232   * @param[in] acmp The pointer of the specified ACMP module
233   * @param[in] u32ChNum The ACMP number
234   * @return None
235   * @details This macro will set WKEN (ACMP_CTL[16]) to enable ACMP wake-up function.
236   * \hideinitializer
237   */
238 #define ACMP_ENABLE_WAKEUP(acmp, u32ChNum) ((acmp)->CTL[(u32ChNum)] |= ACMP_CTL_WKEN_Msk)
239 
240 /**
241   * @brief This macro is used to disable ACMP wake-up function
242   * @param[in] acmp The pointer of the specified ACMP module
243   * @param[in] u32ChNum The ACMP number
244   * @return None
245   * @details This macro will clear WKEN (ACMP_CTL[16]) to disable ACMP wake-up function.
246   * \hideinitializer
247   */
248 #define ACMP_DISABLE_WAKEUP(acmp, u32ChNum) ((acmp)->CTL[(u32ChNum)] &= ~ACMP_CTL_WKEN_Msk)
249 
250 /**
251   * @brief This macro is used to select ACMP positive input pin
252   * @param[in] acmp The pointer of the specified ACMP module
253   * @param[in] u32ChNum The ACMP number
254   * @param[in] u32Pin Comparator positive pin selection. Including:
255   *                  - \ref ACMP_CTL_POSSEL_P0
256   *                  - \ref ACMP_CTL_POSSEL_P1
257   *                  - \ref ACMP_CTL_POSSEL_P2
258   *                  - \ref ACMP_CTL_POSSEL_P3
259   * @return None
260   * @details This macro will set POSSEL (ACMP_CTL[7:6]) to determine the comparator positive input pin.
261   * \hideinitializer
262   */
263 #define ACMP_SELECT_P(acmp, u32ChNum, u32Pin) ((acmp)->CTL[(u32ChNum)] = ((acmp)->CTL[(u32ChNum)] & ~ACMP_CTL_POSSEL_Msk) | (u32Pin))
264 
265 /**
266   * @brief This macro is used to enable ACMP filter function
267   * @param[in] acmp The pointer of the specified ACMP module
268   * @param[in] u32ChNum The ACMP number
269   * @return None
270   * @details This macro will set OUTSEL (ACMP_CTL[12]) to enable output filter function.
271   * \hideinitializer
272   */
273 #define ACMP_ENABLE_FILTER(acmp, u32ChNum) ((acmp)->CTL[(u32ChNum)] |= ACMP_CTL_OUTSEL_Msk)
274 
275 /**
276   * @brief This macro is used to disable ACMP filter function
277   * @param[in] acmp The pointer of the specified ACMP module
278   * @param[in] u32ChNum The ACMP number
279   * @return None
280   * @details This macro will clear OUTSEL (ACMP_CTL[12]) to disable output filter function.
281   * \hideinitializer
282   */
283 #define ACMP_DISABLE_FILTER(acmp, u32ChNum) ((acmp)->CTL[(u32ChNum)] &= ~ACMP_CTL_OUTSEL_Msk)
284 
285 /**
286   * @brief This macro is used to set ACMP filter function
287   * @param[in] acmp The pointer of the specified ACMP module
288   * @param[in] u32ChNum The ACMP number
289   * @param[in] u32Cnt is comparator filter count setting.
290   *                  - \ref ACMP_CTL_FILTSEL_OFF
291   *                  - \ref ACMP_CTL_FILTSEL_1PCLK
292   *                  - \ref ACMP_CTL_FILTSEL_2PCLK
293   *                  - \ref ACMP_CTL_FILTSEL_4PCLK
294   *                  - \ref ACMP_CTL_FILTSEL_8PCLK
295   *                  - \ref ACMP_CTL_FILTSEL_16PCLK
296   *                  - \ref ACMP_CTL_FILTSEL_32PCLK
297   *                  - \ref ACMP_CTL_FILTSEL_64PCLK
298   * @return None
299   * @details When ACMP output filter function is enabled, the output sampling count is determined by FILTSEL (ACMP_CTL[15:13]).
300   * \hideinitializer
301   */
302 #define ACMP_SET_FILTER(acmp, u32ChNum, u32Cnt) ((acmp)->CTL[(u32ChNum)] = ((acmp)->CTL[(u32ChNum)] & ~ACMP_CTL_FILTSEL_Msk) | (u32Cnt))
303 
304 /**
305   * @brief This macro is used to select comparator reference voltage
306   * @param[in] acmp The pointer of the specified ACMP module
307   * @param[in] u32Level  The comparator reference voltage setting.
308   *             The formula is:
309   *                       comparator reference voltage = CRV source voltage x (1/6 + u32Level/24)
310   *             The range of u32Level is 0 ~ 15.
311   * @return   None
312   * @details  When CRV is selected as ACMP negative input source, the CRV level is determined by CRVCTL (ACMP_VREF[3:0]).
313   * \hideinitializer
314   */
315 #define ACMP_CRV_SEL(acmp, u32Level) ((acmp)->VREF = ((acmp)->VREF & ~ACMP_VREF_CRVCTL_Msk) | ((u32Level)<<ACMP_VREF_CRVCTL_Pos))
316 
317 /**
318   * @brief This macro is used to select the source of CRV
319   * @param[in] acmp The pointer of the specified ACMP module
320   * @param[in] u32Src is the source of CRV. Including:
321   *                  - \ref ACMP_VREF_CRVSSEL_VDDA
322   *                  - \ref ACMP_VREF_CRVSSEL_INTVREF
323   * @return None
324   * @details The source of CRV can be VDDA or internal reference voltage. The internal reference voltage level is determined by SYS_VREFCTL register.
325   * \hideinitializer
326   */
327 #define ACMP_SELECT_CRV_SRC(acmp, u32Src) ((acmp)->VREF = ((acmp)->VREF & ~ACMP_VREF_CRVSSEL_Msk) | (u32Src))
328 
329 /**
330   * @brief This macro is used to select ACMP interrupt condition
331   * @param[in] acmp The pointer of the specified ACMP module
332   * @param[in] u32ChNum The ACMP number
333   * @param[in] u32Cond Comparator interrupt condition selection. Including:
334   *                  - \ref ACMP_CTL_INTPOL_RF
335   *                  - \ref ACMP_CTL_INTPOL_R
336   *                  - \ref ACMP_CTL_INTPOL_F
337   * @return None
338   * @details The ACMP output interrupt condition can be rising edge, falling edge or any edge.
339   * \hideinitializer
340   */
341 #define ACMP_SELECT_INT_COND(acmp, u32ChNum, u32Cond) ((acmp)->CTL[(u32ChNum)] = ((acmp)->CTL[(u32ChNum)] & ~ACMP_CTL_INTPOL_Msk) | (u32Cond))
342 
343 /**
344   * @brief This macro is used to enable ACMP window latch mode
345   * @param[in] acmp The pointer of the specified ACMP module
346   * @param[in] u32ChNum The ACMP number
347   * @return None
348   * @details This macro will set WLATEN (ACMP_CTL[17]) to enable ACMP window latch mode.
349   *          When ACMP0/1_WLAT pin is at high level, ACMPO0/1 passes through window latch
350   *          block; when ACMP0/1_WLAT pin is at low level, the output of window latch block,
351   *          WLATOUT, is frozen.
352   * \hideinitializer
353   */
354 #define ACMP_ENABLE_WINDOW_LATCH(acmp, u32ChNum) ((acmp)->CTL[(u32ChNum)] |= ACMP_CTL_WLATEN_Msk)
355 
356 /**
357   * @brief This macro is used to disable ACMP window latch mode
358   * @param[in] acmp The pointer of the specified ACMP module
359   * @param[in] u32ChNum The ACMP number
360   * @return None
361   * @details This macro will clear WLATEN (ACMP_CTL[17]) to disable ACMP window latch mode.
362   * \hideinitializer
363   */
364 #define ACMP_DISABLE_WINDOW_LATCH(acmp, u32ChNum) ((acmp)->CTL[(u32ChNum)] &= ~ACMP_CTL_WLATEN_Msk)
365 
366 /**
367   * @brief This macro is used to enable ACMP window compare mode
368   * @param[in] acmp The pointer of the specified ACMP module
369   * @param[in] u32ChNum The ACMP number
370   * @return None
371   * @details This macro will set WCMPSEL (ACMP_CTL[18]) to enable ACMP window compare mode.
372   *          When window compare mode is enabled, user can connect the specific analog voltage
373   *          source to either the positive inputs of both comparators or the negative inputs of
374   *          both comparators. The upper bound and lower bound of the designated range are
375   *          determined by the voltages applied to the other inputs of both comparators. If the
376   *          output of a comparator is low and the other comparator outputs high, which means two
377   *          comparators implies the upper and lower bound. User can directly monitor a specific
378   *          analog voltage source via ACMPWO (ACMP_STATUS[16]).
379   * \hideinitializer
380   */
381 #define ACMP_ENABLE_WINDOW_COMPARE(acmp, u32ChNum) ((acmp)->CTL[(u32ChNum)] |= ACMP_CTL_WCMPSEL_Msk)
382 
383 /**
384   * @brief This macro is used to disable ACMP window compare mode
385   * @param[in] acmp The pointer of the specified ACMP module
386   * @param[in] u32ChNum The ACMP number
387   * @return None
388   * @details This macro will clear WCMPSEL (ACMP_CTL[18]) to disable ACMP window compare mode.
389   * \hideinitializer
390   */
391 #define ACMP_DISABLE_WINDOW_COMPARE(acmp, u32ChNum) ((acmp)->CTL[(u32ChNum)] &= ~ACMP_CTL_WCMPSEL_Msk)
392 
393 
394 
395 
396 /* Function prototype declaration */
397 void ACMP_Open(ACMP_T *acmp, uint32_t u32ChNum, uint32_t u32NegSrc, uint32_t u32HysSel);
398 void ACMP_Close(ACMP_T *acmp, uint32_t u32ChNum);
399 
400 
401 
402 /*@}*/ /* end of group ACMP_EXPORTED_FUNCTIONS */
403 
404 /*@}*/ /* end of group ACMP_Driver */
405 
406 /*@}*/ /* end of group Standard_Driver */
407 
408 #ifdef __cplusplus
409 }
410 #endif
411 
412 
413 #endif /* __ACMP_H__ */
414 
415 /*** (C) COPYRIGHT 2016 Nuvoton Technology Corp. ***/
416