/************************************************************************************************/ /** * @file ciu32f003_std_comp.c * @author MCU Ecosystem Development Team * @brief COMP STD库驱动。 * 实现COMP初始化配置等功能API。 * * ************************************************************************************************** * @attention * Copyright (c) CEC Huada Electronic Design Co.,Ltd. All rights reserved. * ************************************************************************************************** */ /************************************************************************************************/ /** * @addtogroup CIU32F003_STD_Driver * @{ */ /** * @addtogroup COMP * @{ * */ /************************************************************************************************/ /*------------------------------------------includes--------------------------------------------*/ #include "ciu32f003_std.h" #ifdef STD_COMP_PERIPHERAL_USED /*------------------------------------------functions-------------------------------------------*/ /************************************************************************************************/ /** * @addtogroup COMP_External_Functions * @{ * */ /************************************************************************************************/ /** * @brief COMP去初始化 * @param compx COMP外设 * @retval 无 */ void std_comp_deinit(COMP_t *compx) { /* 复位COMP外设 */ compx->CSR = 0x00000000U; /*当COMP1和COMP2都复位时,复位CR寄存器*/ if((COMP1->CSR == 0) && (COMP2->CSR == 0)) { COMP_COMMON->CR = 0x00000000U; } } /** * @} */ #endif /* STD_COMP_PERIPHERAL_USED */ /** * @} */ /** * @} */