gr55xx_hal_comp.h
Go to the documentation of this file.
1 /**
2  ****************************************************************************************
3  *
4  * @file gr55xx_hal_comp.h
5  * @author BLE Driver Team
6  * @brief Header file containing functions prototypes of COMP HAL library.
7  *
8  ****************************************************************************************
9  * @attention
10  #####Copyright (c) 2019 GOODIX
11  All rights reserved.
12 
13  Redistribution and use in source and binary forms, with or without
14  modification, are permitted provided that the following conditions are met:
15  * Redistributions of source code must retain the above copyright
16  notice, this list of conditions and the following disclaimer.
17  * Redistributions in binary form must reproduce the above copyright
18  notice, this list of conditions and the following disclaimer in the
19  documentation and/or other materials provided with the distribution.
20  * Neither the name of GOODIX nor the names of its contributors may be used
21  to endorse or promote products derived from this software without
22  specific prior written permission.
23 
24  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27  ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
28  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  POSSIBILITY OF SUCH DAMAGE.
35  ****************************************************************************************
36  */
37 
38 /** @addtogroup PERIPHERAL Peripheral Driver
39  * @{
40  */
41 
42 /** @addtogroup HAL_DRIVER HAL Driver
43  * @{
44  */
45 
46 /** @defgroup HAL_COMP COMP
47  * @brief COMP HAL module driver.
48  * @{
49  */
50 
51 /* Define to prevent recursive inclusion -------------------------------------*/
52 #ifndef __GR55xx_HAL_COMP_H__
53 #define __GR55xx_HAL_COMP_H__
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
59 /* Includes ------------------------------------------------------------------*/
60 #include "gr55xx_ll_comp.h"
61 #include "gr55xx_hal_def.h"
62 
63 /* Exported types ------------------------------------------------------------*/
64 /** @addtogroup HAL_COMP_ENUMERATIONS Enumerations
65  * @{
66  */
67 
68 /** @defgroup HAL_COMP_state HAL COMP state
69  * @{
70  */
71 
72 /**
73  * @brief HAL COMP State Enumerations definition
74  */
75 typedef enum
76 {
77  HAL_COMP_STATE_RESET = 0x00, /**< Peripheral not initialized */
78  HAL_COMP_STATE_READY = 0x01, /**< Peripheral initialized and ready for use */
79  HAL_COMP_STATE_BUSY = 0x02, /**< An internal process is ongoing */
80  HAL_COMP_STATE_ERROR = 0x04 /**< Peripheral in error */
82 
83 /** @} */
84 
85 /** @} */
86 
87 /** @addtogroup HAL_COMP_TYPEDEFS Type definitions
88  * @{
89  */
90 
91 /** @defgroup COMP_Configuration COMP Configuration
92  * @{
93  */
94 
95 /**
96  * @brief COMP init structure definition
97  */
98 typedef ll_comp_init_t comp_init_t;
99 /** @} */
100 
101 /** @} */
102 
103 /** @addtogroup HAL_COMP_STRUCTURES Structures
104  * @{
105  */
106 
107 /** @defgroup COMP_handle COMP handle
108  * @{
109  */
110 
111 /**
112  * @brief COMP handle Structure definition
113  */
114 typedef struct _comp_handle
115 {
116  comp_init_t init; /**< COMP configuration parameters */
117 
118  __IO hal_lock_t lock; /**< Locking object */
119 
120  __IO hal_comp_state_t state; /**< COMP communication state */
121 
122  __IO uint32_t error_code; /**< COMP error code */
123 
124  uint32_t retention[1]; /**< COMP important register information. */
125 
127 /** @} */
128 
129 /** @} */
130 
131 /** @addtogroup HAL_COMP_CALLBACK_STRUCTURES Callback Structures
132  * @{
133  */
134 
135 /** @defgroup COMP_Callback COMP Callback
136  * @{
137  */
138 
139 /**
140  * @brief HAL COMP Callback function definition
141  */
142 typedef struct _hal_comp_callback
143 {
144  void (*comp_msp_init)(comp_handle_t *p_comp); /**< COMP init MSP callback */
145  void (*comp_msp_deinit)(comp_handle_t *p_comp); /**< COMP de-init MSP callback */
146  void (*comp_trigger_callback)(comp_handle_t *p_comp); /**< COMP comparator callback */
148 
149 /** @} */
150 
151 /** @} */
152 
153 
154 /**
155  * @defgroup HAL_COMP_MACRO Defines
156  * @{
157  */
158 
159 /* Exported constants --------------------------------------------------------*/
160 /** @defgroup COMP_Exported_Constants COMP Exported Constants
161  * @{
162  */
163 
164 /** @defgroup COMP_Error_Code COMP Error Code
165  * @{
166  */
167 #define HAL_COMP_ERROR_NONE ((uint32_t)0x00000000) /**< No error */
168 #define HAL_COMP_ERROR_TIMEOUT ((uint32_t)0x00000001) /**< Timeout error */
169 #define HAL_COMP_ERROR_INVALID_PARAM ((uint32_t)0x00000002) /**< Invalid parameters error */
170 /** @} */
171 
172 
173 /** @defgroup COMP_INPUT_SOURCE COMP Input Channel Select
174  * @{
175  */
176 #define COMP_INPUT_SRC_IO0 LL_COMP_INPUT_SRC_IO0 /**< Set MSIO_0 as inputs for the comparator */
177 #define COMP_INPUT_SRC_IO1 LL_COMP_INPUT_SRC_IO1 /**< Set MSIO_1 as inputs for the comparator */
178 #define COMP_INPUT_SRC_IO2 LL_COMP_INPUT_SRC_IO2 /**< Set MSIO_2 as inputs for the comparator */
179 #define COMP_INPUT_SRC_IO3 LL_COMP_INPUT_SRC_IO3 /**< Set MSIO_3 as inputs for the comparator */
180 #define COMP_INPUT_SRC_IO4 LL_COMP_INPUT_SRC_IO4 /**< Set MSIO_4 as inputs for the comparator */
181 #define COMP_INPUT_SRC_IO5 LL_COMP_INPUT_SRC_IO5 /**< Set MSIO_5 as inputs for the comparator */
182 #define COMP_INPUT_SRC_IO6 LL_COMP_INPUT_SRC_IO6 /**< Set MSIO_6 as inputs for the comparator */
183 #define COMP_INPUT_SRC_IO7 LL_COMP_INPUT_SRC_IO7 /**< Set MSIO_7 as inputs for the comparator */
184 #define COMP_INPUT_SRC_VBAT LL_COMP_INPUT_SRC_VBAT /**< Set VBATT as inputs for the comparator */
185 #define COMP_INPUT_SRC_VREF LL_COMP_INPUT_SRC_VREF /**< Set VREF as inputs for the comparator */
186 /** @} */
187 
188 /** @defgroup COMP_REFERENCE_SOURCE COMP Reference Source Select
189  * @{
190  */
191 #define COMP_REF_SRC_IO0 LL_COMP_REF_SRC_IO0 /**< Set MSIO_0 as references for the comparator */
192 #define COMP_REF_SRC_IO1 LL_COMP_REF_SRC_IO1 /**< Set MSIO_1 as references for the comparator */
193 #define COMP_REF_SRC_IO2 LL_COMP_REF_SRC_IO2 /**< Set MSIO_2 as references for the comparator */
194 #define COMP_REF_SRC_IO3 LL_COMP_REF_SRC_IO3 /**< Set MSIO_3 as references for the comparator */
195 #define COMP_REF_SRC_IO4 LL_COMP_REF_SRC_IO4 /**< Set MSIO_4 as references for the comparator */
196 #define COMP_REF_SRC_IO5 LL_COMP_REF_SRC_IO5 /**< Set MSIO_5 as references for the comparator */
197 #define COMP_REF_SRC_IO6 LL_COMP_REF_SRC_IO6 /**< Set MSIO_6 as references for the comparator */
198 #define COMP_REF_SRC_IO7 LL_COMP_REF_SRC_IO7 /**< Set MSIO_7 as references for the comparator */
199 #define COMP_REF_SRC_VBAT LL_COMP_REF_SRC_VBAT /**< Set VBATT as references for the comparator */
200 #define COMP_REF_SRC_VREF LL_COMP_REF_SRC_VREF /**< Set VREF as references for the comparator */
201 /** @} */
202 
203 /** @defgroup COMP_HYSTERESIS COMP Hysteresis Select
204  * @{
205  */
206 #define COMP_HYST_POSITIVE LL_COMP_HYST_POSITIVE /**< Set positive side of hysteresis for the comparator */
207 #define COMP_HYST_NEGATIVE LL_COMP_HYST_NEGATIVE /**< Set negative side of hysteresis for the comparator */
208 /** @} */
209 
210 /** @defgroup COMP_WAKEUP_EDGE Select
211  * @{
212  */
213 #define COMP_WAKEUP_EDGE_BOTH LL_COMP_WAKEUP_EDGE_BOTH /**< Select both rising and falling edges for the comparator */
214 #define COMP_WAKEUP_EDGE_FALLING LL_COMP_WAKEUP_EDGE_FALLING /**< Select only falling edges for the comparator */
215 #define COMP_WAKEUP_EDGE_RISING LL_COMP_WAKEUP_EDGE_RISING /**< Select only rising edges for the comparator */
216 /** @} */
217 
218 /** @defgroup COMP_RES_DEGENERATION COMP Reset Degeneration Select
219  * @{
220  */
221 #define COMP_RES_DEGENERATION_POSITIVE LL_COMP_RES_DEGENERATION_POSITIVE /**< Set positive side of calibration for the comparator */
222 #define COMP_RES_DEGENERATION_NEGATIVE LL_COMP_RES_DEGENERATION_NEGATIVE /**< Set negative side of calibration for the comparator */
223 /** @} */
224 
225 /**
226  * @brief Default configuartion for initializing structure
227  */
228 #define COMP_DEFAULT_CONFIG LL_COMP_DEFAULT_CONFIG
229 /** @} */
230 
231 /* Private macros ------------------------------------------------------------*/
232 /** @addtogroup COMP_Private_Macros COMP Private Macros
233  * @{
234  */
235 
236 /**
237  * @brief Check if COMP input source is valid.
238  * @param __INPUT__ COMP input source.
239  * @retval SET (__INPUT__ is valid) or RESET (__INPUT__ is invalid)
240  */
241 #define IS_COMP_INPUT(__INPUT__) (((__INPUT__) == COMP_INPUT_SRC_IO0) || \
242  ((__INPUT__) == COMP_INPUT_SRC_IO1) || \
243  ((__INPUT__) == COMP_INPUT_SRC_IO2) || \
244  ((__INPUT__) == COMP_INPUT_SRC_IO3) || \
245  ((__INPUT__) == COMP_INPUT_SRC_IO4) || \
246  ((__INPUT__) == COMP_INPUT_SRC_IO5) || \
247  ((__INPUT__) == COMP_INPUT_SRC_IO6) || \
248  ((__INPUT__) == COMP_INPUT_SRC_IO7) || \
249  ((__INPUT__) == COMP_INPUT_SRC_VBAT)|| \
250  ((__INPUT__) == COMP_INPUT_SRC_VREF))
251 /**
252  * @brief Check if COMP reference source is valid.
253  * @param __INPUT__ COMP reference source.
254  * @retval SET (__INPUT__ is valid) or RESET (__INPUT__ is invalid)
255  */
256 
257 #define IS_COMP_REF(__INPUT__) (((__INPUT__) == COMP_REF_SRC_IO0) || \
258  ((__INPUT__) == COMP_REF_SRC_IO1) || \
259  ((__INPUT__) == COMP_REF_SRC_IO2) || \
260  ((__INPUT__) == COMP_REF_SRC_IO3) || \
261  ((__INPUT__) == COMP_REF_SRC_IO4) || \
262  ((__INPUT__) == COMP_REF_SRC_IO5) || \
263  ((__INPUT__) == COMP_REF_SRC_IO6) || \
264  ((__INPUT__) == COMP_REF_SRC_IO7) || \
265  ((__INPUT__) == COMP_REF_SRC_VBAT) || \
266  ((__INPUT__) == COMP_REF_SRC_VREF))
267 
268 /**
269  * @brief Check if COMP reference source is valid.
270  * @param __INPUT__ COMP hysteresis.
271  * @retval SET (__INPUT__ is valid) or RESET (__INPUT__ is invalid)
272  */
273 #define IS_COMP_HYST_POS(__INPUT__) ((__INPUT__) == COMP_HYST_POSITIVE)
274 
275 
276 /**
277  * @brief Check if COMP reference source is invalid.
278  * @param __INPUT__ COMP hysteresis.
279  */
280 #define IS_COMP_HYST_NEG(__INPUT__) ((__INPUT__) == COMP_HYST_NEGATIVE )
281 
282 /**
283  * @brief Check if COMP reference source is valid.
284  * @param __INPUT__ COMP res degeneration.
285  * @retval SET (__INPUT__ is valid) or RESET (__INPUT__ is invalid)
286  */
287 #define IS_COMP_RES_DEGENERATION_POS(__INPUT__) ((__INPUT__) == COMP_RES_DEGENERATION_POSITIVE)
288 
289 
290 /**
291  * @brief Check if COMP reference source is invalid.
292  * @param __INPUT__ COMP res degeneration.
293  */
294 #define IS_COMP_RES_DEGENERATION_NEG(__INPUT__) ((__INPUT__) == COMP_RES_DEGENERATION_NEGATIVE )
295 /** @} */
296 
297 /** @} */
298 
299 /* Exported functions --------------------------------------------------------*/
300 /** @addtogroup HAL_COMP_DRIVER_FUNCTIONS Functions
301  * @{
302  */
303 
304 /** @addtogroup COMP_Exported_Functions_Group1 Initialization and de-initialization functions
305  * @brief Initialization and Configuration functions
306  * @{
307  */
308 
309 /**
310  ****************************************************************************************
311  * @brief Initialize the COMP according to the specified parameters
312  * in the comp_init_t and initialize the associated handle.
313  *
314  * @param[in] p_comp: Pointer to a COMP handle which contains the configuration information for
315  * the specified COMP module.
316  *
317  * @retval ::HAL_OK: Operation is OK.
318  * @retval ::HAL_ERROR: Parameter error or operation not supported.
319  * @retval ::HAL_BUSY: Driver is busy.
320  * @retval ::HAL_TIMEOUT: Timeout occurred.
321  ****************************************************************************************
322  */
324 
325 /**
326  ****************************************************************************************
327  * @brief De-initialize the COMP peripheral.
328  *
329  * @param[in] p_comp: Pointer to a COMP handle which contains the configuration information for
330  * the specified COMP module.
331  *
332  * @retval ::HAL_OK: Operation is OK.
333  * @retval ::HAL_ERROR: Parameter error or operation not supported.
334  * @retval ::HAL_BUSY: Driver is busy.
335  * @retval ::HAL_TIMEOUT: Timeout occurred.
336  ****************************************************************************************
337  */
339 
340 /**
341  ****************************************************************************************
342  * @brief Initialize the COMP MSP.
343  *
344  * @note This function should not be modified. When the callback is needed,
345  * the hal_comp_msp_deinit can be implemented in the user file.
346  *
347  * @param[in] p_comp: Pointer to a COMP handle which contains the configuration information for
348  * the specified COMP module.
349  ****************************************************************************************
350  */
352 
353 /**
354  ****************************************************************************************
355  * @brief De-initialize the COMP MSP.
356  *
357  * @note This function should not be modified. When the callback is needed,
358  * the hal_comp_msp_deinit can be implemented in the user file.
359  *
360  * @param[in] p_comp: Pointer to a COMP handle which contains the configuration information for
361  * the specified COMP module.
362  ****************************************************************************************
363  */
365 
366 /** @} */
367 
368 /** @addtogroup COMP_Exported_Functions_Group2 IO operation functions
369  * @brief COMP polling and DMA conversion management functions.
370  * @{
371  */
372 
373  /**
374  ****************************************************************************************
375  * @brief Start the comparator.
376  *
377  * @param[in] p_comp: Pointer to a COMP handle which contains the configuration information for
378  * the specified COMP module.
379  *
380  * @retval ::HAL_OK: Operation is OK.
381  * @retval ::HAL_ERROR: Parameter error or operation not supported.
382  * @retval ::HAL_BUSY: Driver is busy.
383  * @retval ::HAL_TIMEOUT: Timeout occurred.
384  ****************************************************************************************
385  */
387 
388  /**
389  ****************************************************************************************
390  * @brief Stop the comparator.
391  *
392  * @param[in] p_comp: Pointer to a COMP handle which contains the configuration information for
393  * the specified COMP module.
394  *
395  * @retval ::HAL_OK: Operation is OK.
396  * @retval ::HAL_ERROR: Parameter error or operation not supported.
397  * @retval ::HAL_BUSY: Driver is busy.
398  * @retval ::HAL_TIMEOUT: Timeout occurred.
399  ****************************************************************************************
400  */
402 
403 /** @} */
404 
405 /** @addtogroup COMP_IRQ_Handler_and_Callbacks IRQ Handler and Callbacks
406  * @brief IRQ Handler and Callbacks functions
407  * @{
408  */
409 
410 /**
411  ****************************************************************************************
412  * @brief Handle COMP interrupt request.
413  * @param[in] p_comp: Pointer to a COMP handle which contains the configuration information
414  * for the specified COMP module.
415  ****************************************************************************************
416  */
418 
419 /**
420  ****************************************************************************************
421  * @brief comparator callback.
422  *
423  * @note This function should not be modified. When the callback is needed,
424  * the hal_comp_trigger_callback can be implemented in the user file.
425  *
426  * @param[in] p_comp: Pointer to a COMP handle which contains the configuration information for
427  * the specified COMP module.
428  ****************************************************************************************
429  */
431 
432 /** @} */
433 
434 /** @defgroup COMP_Exported_Functions_Group3 Peripheral State and Errors functions
435  * @brief COMP control functions
436  *
437 @verbatim
438  ===============================================================================
439  ##### Peripheral State and Errors functions #####
440  ===============================================================================
441  [..]
442  This subsection provides a set of functions allowing to control the COMP.
443  (+) hal_comp_get_state() API can be helpful to check in run-time the state of the COMP peripheral.
444  (+) hal_comp_get_error() check in run-time Errors occurring during communication.
445 @endverbatim
446  * @{
447  */
448 
449 /**
450  ****************************************************************************************
451  * @brief Return the COMP handle state.
452  *
453  * @param[in] p_comp: Pointer to a COMP handle which contains the configuration information for
454  * the specified COMP module.
455  *
456  * @retval ::HAL_COMP_STATE_RESET: Peripheral not initialized.
457  * @retval ::HAL_COMP_STATE_READY: Peripheral initialized and ready for use.
458  * @retval ::HAL_COMP_STATE_BUSY: An internal process is ongoing.
459  * @retval ::HAL_COMP_STATE_ERROR: Peripheral in error.
460  ****************************************************************************************
461  */
463 
464 /**
465  ****************************************************************************************
466  * @brief Return the COMP error code.
467  *
468  * @param[in] p_comp: Pointer to a COMP handle which contains the configuration information for
469  * the specified COMP module.
470  *
471  * @return COMP error code in bitmap format
472  ****************************************************************************************
473  */
475 
476 /**
477  ****************************************************************************************
478  * @brief Suspend some registers related to COMP configuration before sleep.
479  * @param[in] p_comp: Pointer to a COMP handle which contains the configuration
480  * information for the specified COMP module.
481  * @retval ::HAL_OK: Operation is OK.
482  * @retval ::HAL_ERROR: Parameter error or operation not supported.
483  * @retval ::HAL_BUSY: Driver is busy.
484  * @retval ::HAL_TIMEOUT: Timeout occurred.
485  ****************************************************************************************
486  */
488 
489 /**
490  ****************************************************************************************
491  * @brief Restore some registers related to COMP configuration after sleep.
492  * This function must be used in conjunction with the hal_comp_suspend_reg().
493  * @param[in] p_comp: Pointer to a COMP handle which contains the configuration
494  * information for the specified COMP module.
495  * @retval ::HAL_OK: Operation is OK.
496  * @retval ::HAL_ERROR: Parameter error or operation not supported.
497  * @retval ::HAL_BUSY: Driver is busy.
498  * @retval ::HAL_TIMEOUT: Timeout occurred.
499  ****************************************************************************************
500  */
502 
503 /** @} */
504 
505 /** @} */
506 
507 
508 
509 #ifdef __cplusplus
510 }
511 #endif
512 
513 #endif /* __GR55xx_HAL_COMP_H__ */
514 
515 /** @} */
516 
517 /** @} */
518 
519 /** @} */
hal_comp_irq_handler
void hal_comp_irq_handler(comp_handle_t *p_comp)
Handle COMP interrupt request.
HAL_COMP_STATE_ERROR
@ HAL_COMP_STATE_ERROR
Definition: gr55xx_hal_comp.h:80
_comp_handle::retention
uint32_t retention[1]
Definition: gr55xx_hal_comp.h:124
hal_lock_t
hal_lock_t
HAL Lock structures definition.
Definition: gr55xx_hal_def.h:81
hal_comp_init
hal_status_t hal_comp_init(comp_handle_t *p_comp)
Initialize the COMP according to the specified parameters in the comp_init_t and initialize the assoc...
_hal_comp_callback
HAL COMP Callback function definition.
Definition: gr55xx_hal_comp.h:143
hal_comp_get_error
uint32_t hal_comp_get_error(comp_handle_t *p_comp)
Return the COMP error code.
hal_comp_resume_reg
hal_status_t hal_comp_resume_reg(comp_handle_t *p_comp)
Restore some registers related to COMP configuration after sleep. This function must be used in conju...
hal_comp_state_t
hal_comp_state_t
HAL COMP State Enumerations definition.
Definition: gr55xx_hal_comp.h:76
_comp_handle::error_code
__IO uint32_t error_code
Definition: gr55xx_hal_comp.h:122
_hal_comp_callback::comp_msp_deinit
void(* comp_msp_deinit)(comp_handle_t *p_comp)
Definition: gr55xx_hal_comp.h:145
hal_comp_get_state
hal_comp_state_t hal_comp_get_state(comp_handle_t *p_comp)
Return the COMP handle state.
_comp_handle
COMP handle Structure definition.
Definition: gr55xx_hal_comp.h:115
comp_init_t
ll_comp_init_t comp_init_t
COMP init structure definition.
Definition: gr55xx_hal_comp.h:98
comp_handle_t
struct _comp_handle comp_handle_t
COMP handle Structure definition.
HAL_COMP_STATE_RESET
@ HAL_COMP_STATE_RESET
Definition: gr55xx_hal_comp.h:77
hal_comp_callback_t
struct _hal_comp_callback hal_comp_callback_t
HAL COMP Callback function definition.
hal_comp_stop
hal_status_t hal_comp_stop(comp_handle_t *p_comp)
Stop the comparator.
HAL_COMP_STATE_READY
@ HAL_COMP_STATE_READY
Definition: gr55xx_hal_comp.h:78
_comp_handle::init
comp_init_t init
Definition: gr55xx_hal_comp.h:116
hal_status_t
hal_status_t
HAL Status structures definition.
Definition: gr55xx_hal_def.h:70
hal_comp_msp_init
void hal_comp_msp_init(comp_handle_t *p_comp)
Initialize the COMP MSP.
hal_comp_suspend_reg
hal_status_t hal_comp_suspend_reg(comp_handle_t *p_comp)
Suspend some registers related to COMP configuration before sleep.
hal_comp_trigger_callback
void hal_comp_trigger_callback(comp_handle_t *p_comp)
comparator callback.
hal_comp_msp_deinit
void hal_comp_msp_deinit(comp_handle_t *p_comp)
De-initialize the COMP MSP.
_hal_comp_callback::comp_msp_init
void(* comp_msp_init)(comp_handle_t *p_comp)
Definition: gr55xx_hal_comp.h:144
hal_comp_deinit
hal_status_t hal_comp_deinit(comp_handle_t *p_comp)
De-initialize the COMP peripheral.
HAL_COMP_STATE_BUSY
@ HAL_COMP_STATE_BUSY
Definition: gr55xx_hal_comp.h:79
_hal_comp_callback::comp_trigger_callback
void(* comp_trigger_callback)(comp_handle_t *p_comp)
Definition: gr55xx_hal_comp.h:146
gr55xx_hal_def.h
This file contains HAL common definitions, enumeration, macros and structures definitions.
gr55xx_ll_comp.h
Header file containing functions prototypes of COMP LL library.
_comp_handle::lock
__IO hal_lock_t lock
Definition: gr55xx_hal_comp.h:118
hal_comp_start
hal_status_t hal_comp_start(comp_handle_t *p_comp)
Start the comparator.
_comp_handle::state
__IO hal_comp_state_t state
Definition: gr55xx_hal_comp.h:120