![]() |
G32R430 Device Driver Layer v1.0.4
G32R4xx Device Driver Layer API Reference
|
Header file of COMP DDL module. More...
#include "g32r4xx.h"Go to the source code of this file.
Data Structures | |
| struct | DDL_COMP_InitTypeDef |
| COMP Init structure definition. More... | |
Macros | |
| #define | DDL_COMP_INPUT_PLUS_INP0 (0x00000000UL) |
| #define | DDL_COMP_INPUT_PLUS_INP1 (COMP_CSTS_VP_SEL_0) |
| #define | DDL_COMP_INPUT_PLUS_DAC2 (COMP_CSTS_VP_SEL_1) |
| #define | DDL_COMP_INPUT_PLUS_DAC1 (COMP_CSTS_VP_SEL_1) |
| #define | DDL_COMP_INPUT_MINUS_INN0 (0x00000000UL) |
| #define | DDL_COMP_INPUT_MINUS_INN1 (COMP_CSTS_VN_SEL_0) |
| #define | DDL_COMP_INPUT_MINUS_DAC2 (COMP_CSTS_VN_SEL_1) |
| #define | DDL_COMP_INPUT_MINUS_DAC1 (COMP_CSTS_VN_SEL_1) |
| #define | DDL_COMP_OUTPUTPOL_NONINVERTED (0x00000000UL) |
| #define | DDL_COMP_OUTPUTPOL_INVERTED (COMP_CSTS_POL) |
| #define | DDL_COMP_HYS_DISABLE (0x00000000UL) |
| #define | DDL_COMP_HYS_LEVEL0 (COMP_CSTS_HYS_0) |
| #define | DDL_COMP_HYS_LEVEL1 (COMP_CSTS_HYS_1) |
| #define | DDL_COMP_HYS_LEVEL2 (COMP_CSTS_HYS_1 | COMP_CSTS_HYS_0) |
| #define | DDL_COMP_BLANK_0 (0x00000000UL) |
| #define | DDL_COMP_BLANK_1 (COMP_CSTS_BLANKSEL_0) |
| #define | DDL_COMP_BLANK_2 (COMP_CSTS_BLANKSEL_1) |
| #define | DDL_COMP_BLANK_3 (COMP_CSTS_BLANKSEL_0 | COMP_CSTS_BLANKSEL_1) |
| #define | DDL_COMP_BLANK_4 (COMP_CSTS_BLANKSEL_2) |
| #define | DDL_COMP_BLANK_6 (COMP_CSTS_BLANKSEL_2 | COMP_CSTS_BLANKSEL_1) |
| #define | DDL_COMP_BLANK_7 (COMP_CSTS_BLANKSEL) |
| #define | DDL_COMP_OUTPUT_SEL_NONE (0x00000000UL) |
| #define | DDL_COMP_OUTPUT_SEL_TMR1_BKIN (COMP_CSTS_TMR_SEL_0) |
| #define | DDL_COMP_OUTPUT_SEL_TMR1_IC1 (COMP_CSTS_TMR_SEL_1) |
| #define | DDL_COMP_OUTPUT_SEL_TMR1_IC2 (COMP_CSTS_TMR_SEL_1 | COMP_CSTS_TMR_SEL_0) |
| #define | DDL_COMP_OUTPUT_SEL_TMR1_ETR (COMP_CSTS_TMR_SEL_2) |
| #define | DDL_COMP_OUTPUT_SEL_TMR2_IC1 (COMP_CSTS_TMR_SEL_2 | COMP_CSTS_TMR_SEL_0) |
| #define | DDL_COMP_OUTPUT_SEL_TMR2_IC2 (COMP_CSTS_TMR_SEL_2 | COMP_CSTS_TMR_SEL_1) |
| #define | DDL_COMP_OUTPUT_SEL_TMR2_IC3 (COMP_CSTS_TMR_SEL_2 | COMP_CSTS_TMR_SEL_1 | COMP_CSTS_TMR_SEL_0) |
| #define | DDL_COMP_OUTPUT_SEL_TMR2_IC4 (COMP_CSTS_TMR_SEL_3) |
| #define | DDL_COMP_OUTPUT_SEL_TMR2_ETR (COMP_CSTS_TMR_SEL_3 | COMP_CSTS_TMR_SEL_0) |
| #define | DDL_COMP_OUTPUT_SEL_TMR3_IC1 (COMP_CSTS_TMR_SEL_3 | COMP_CSTS_TMR_SEL_1) |
| #define | DDL_COMP_OUTPUT_SEL_TMR3_IC2 (COMP_CSTS_TMR_SEL_3 | COMP_CSTS_TMR_SEL_1 | COMP_CSTS_TMR_SEL_0) |
| #define | DDL_COMP_OUTPUT_SEL_TMR3_ETR (COMP_CSTS_TMR_SEL_3 | COMP_CSTS_TMR_SEL_2) |
| #define | DDL_COMP_OUTPUT_SEL_TMR4_IC1 (COMP_CSTS_TMR_SEL_3 | COMP_CSTS_TMR_SEL_2 | COMP_CSTS_TMR_SEL_0) |
| #define | DDL_COMP_OUTPUT_SEL_TMR4_IC2 (COMP_CSTS_TMR_SEL_3 | COMP_CSTS_TMR_SEL_2 | COMP_CSTS_TMR_SEL_1) |
| #define | DDL_COMP_OUTPUT_SEL_TMR4_ETR (COMP_CSTS_TMR_SEL) |
| #define | DDL_COMP_OUTPUT_LEVEL_LOW (0x00000000UL) |
| #define | DDL_COMP_OUTPUT_LEVEL_HIGH (COMP_CSTS_OUTVAL) |
| #define | DDL_COMP_FILTER_NONE (0x00000000UL) |
| #define | DDL_COMP_FILTER_2HSICLK (COMP_CSTS_FILTER_0) |
| #define | DDL_COMP_FILTER_4HSICLK (COMP_CSTS_FILTER_1) |
| #define | DDL_COMP_FILTER_6HSICLK (COMP_CSTS_FILTER_1 | COMP_CSTS_FILTER_0) |
| #define | DDL_COMP_FILTER_12HSICLK (COMP_CSTS_FILTER_2) |
| #define | DDL_COMP_FILTER_18HSICLK (COMP_CSTS_FILTER_2 | COMP_CSTS_FILTER_0) |
| #define | DDL_COMP_FILTER_24HSICLK (COMP_CSTS_FILTER_2 | COMP_CSTS_FILTER_1) |
| #define | DDL_COMP_FILTER_30HSICLK (COMP_CSTS_FILTER) |
| #define | DDL_COMP_DELAY_STARTUP_US (80UL) |
| #define | DDL_COMP_WriteReg(__INSTANCE__, __REG__, __VALUE__) |
| Write a value in COMP register. | |
| #define | DDL_COMP_ReadReg(__INSTANCE__, __REG__) |
| Read a value in COMP register. | |
Functions | |
| __STATIC_INLINE void | DDL_COMP_SetHysteresis (COMP_TypeDef *COMPx, uint32_t Hysteresis) |
| Select comparator hysteresis. | |
| __STATIC_INLINE uint32_t | DDL_COMP_GetHysteresis (COMP_TypeDef *COMPx) |
| Get comparator hysteresis. | |
| __STATIC_INLINE void | DDL_COMP_SetOutputBlank (COMP_TypeDef *COMPx, uint32_t Blank) |
| Set comparator output blank. | |
| __STATIC_INLINE uint32_t | DDL_COMP_GetOutputBlank (COMP_TypeDef *COMPx) |
| Get comparator output blank. | |
| __STATIC_INLINE void | DDL_COMP_SetInputPlus (COMP_TypeDef *COMPx, uint32_t InputPlus) |
| Set comparator input plus. | |
| __STATIC_INLINE uint32_t | DDL_COMP_GetInputPlus (COMP_TypeDef *COMPx) |
| Get comparator input plus. | |
| __STATIC_INLINE void | DDL_COMP_SetInputMinus (COMP_TypeDef *COMPx, uint32_t InputMinus) |
| Set comparator input minus. | |
| __STATIC_INLINE uint32_t | DDL_COMP_GetInputMinus (COMP_TypeDef *COMPx) |
| Get comparator input minus. | |
| __STATIC_INLINE void | DDL_COMP_SetOutputSelect (COMP_TypeDef *COMPx, uint32_t OutputSel) |
| Set comparator output select. | |
| __STATIC_INLINE uint32_t | DDL_COMP_GetOutputSelect (COMP_TypeDef *COMPx) |
| Set comparator output select. | |
| __STATIC_INLINE void | DDL_COMP_SetOutputPolarity (COMP_TypeDef *COMPx, uint32_t OutputPol) |
| Set comparator output polarity. | |
| __STATIC_INLINE uint32_t | DDL_COMP_GetOutputPolarity (COMP_TypeDef *COMPx) |
| Get comparator output polarity. | |
| __STATIC_INLINE void | DDL_COMP_Enable (COMP_TypeDef *COMPx) |
| Enable comparator instance. | |
| __STATIC_INLINE void | DDL_COMP_Disable (COMP_TypeDef *COMPx) |
| Disable comparator instance. | |
| __STATIC_INLINE uint32_t | DDL_COMP_IsEnabled (COMP_TypeDef *COMPx) |
| Get comparator enable state. | |
| __STATIC_INLINE void | DDL_COMP_Lock (COMP_TypeDef *COMPx) |
| Lock comparator instance. | |
| __STATIC_INLINE uint32_t | DDL_COMP_IsLocked (COMP_TypeDef *COMPx) |
| Get comparator lock state. | |
| __STATIC_INLINE uint32_t | DDL_COMP_ReadOutputLevel (COMP_TypeDef *COMPx) |
| Read comparator output level. | |
| __STATIC_INLINE void | DDL_COMP_SetFilter (COMP_TypeDef *COMPx, uint32_t Filter) |
| Set comparator filter. | |
| __STATIC_INLINE uint32_t | DDL_COMP_GetFilter (COMP_TypeDef *COMPx) |
| Get comparator filter. | |
| ErrorStatus | DDL_COMP_Init (COMP_TypeDef *COMPx, DDL_COMP_InitTypeDef *COMP_InitStruct) |
| Initialize COMP function. | |
| ErrorStatus | DDL_COMP_DeInit (COMP_TypeDef *COMPx) |
| De-Initialize COMP function. | |
| void | DDL_COMP_StructInit (DDL_COMP_InitTypeDef *COMP_InitStruct) |
| Set the fields of structure COMP_InitStruct to default values. | |
Header file of COMP DDL module.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright (c) 2017 STMicroelectronics. Copyright (C) 2025-2024 Geehy Semiconductor. All rights reserved.
This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.
Definition in file g32r4xx_ddl_comp.h.