Contains all macro definitions and function prototypes support for cmpn firmware library on A31L12x. More...
Go to the source code of this file.
Functions | |
HAL_Status_Type | HAL_COMP_Init (CMPn_Type *CMPx) |
Initialize the target peripheral. More... | |
HAL_Status_Type | HAL_COMP_Deinit (CMPn_Type *CMPx) |
Deinitialize the target peripheral. More... | |
HAL_Status_Type | HAL_COMP_ConfigPositiveInput (CMPn_Type *CMPx, CMPn_CR_CMPnPOS_Enum PositiveInputPin) |
Select the positive input pin of a comparator. More... | |
HAL_Status_Type | HAL_COMP_ConfigNegativeInput (CMPn_Type *CMPx, CMPn_CR_CMPnNEG_Enum NegativeInputPin) |
Select the negative input pin of a comparator. More... | |
HAL_Status_Type | HAL_COMP_ConfigHysteresis (CMPn_Type *CMPx, CMPn_CR_HYSnEN_Enum ControlValue) |
Control the hysteresis function. More... | |
HAL_Status_Type | HAL_COMP_ConfigSpeed (CMPn_Type *CMPx, CMPn_CR_CMPnSPD_Enum Speed) |
Select the speed of a comparator. More... | |
HAL_Status_Type | HAL_COMP_ConfigNoiseFilter (CMPn_Type *CMPx, CMPn_CR_NFCKn_Enum SamplingClock) |
Select the sampling clock of a noise filter. More... | |
HAL_Status_Type | HAL_COMP_ConfigInterruptPolarity (CMPn_Type *CMPx, CMPn_CR_CMPnPOL_Enum Polarity) |
Select the interrupt trigger polarity. More... | |
HAL_Status_Type | HAL_COMP_ConfigIntRef (CMPn_Type *CMPx, CMPn_RCR_REFnEN_Enum ControlValue, CMPn_RCR_CMPnREF_Enum RefVoltage) |
Control the reference voltage generator and select the reference voltage. More... | |
HAL_Status_Type | HAL_COMP_Enable (CMPn_Type *CMPx) |
Enable the comparator function. More... | |
HAL_Status_Type | HAL_COMP_Disable (CMPn_Type *CMPx) |
Disable the comparator function. More... | |
HAL_Status_Type | HAL_COMP_ClearStatus (CMPn_Type *CMPx, uint32_t mask) |
Clear the Status Register. More... | |
uint32_t | HAL_COMP_GetStatus (CMPn_Type *CMPx) |
Get the Status Register. More... | |
Contains all macro definitions and function prototypes support for cmpn firmware library on A31L12x.
Copyright(C) 2019, ABOV Semiconductor All rights reserved.
ABOV Disclaimer
IMPORTANT NOTICE ? PLEASE READ CAREFULLY ABOV Semiconductor ("ABOV") reserves the right to make changes, corrections, enhancements, modifications, and improvements to ABOV products and/or to this document at any time without notice. ABOV does not give warranties as to the accuracy or completeness of the information included herein. Purchasers should obtain the latest relevant information of ABOV products before placing orders. Purchasers are entirely responsible for the choice, selection, and use of ABOV products and ABOV assumes no liability for application assistance or the design of purchasers' products. No license, express or implied, to any intellectual property rights is granted by ABOV herein. ABOV disclaims all express and implied warranties and shall not be responsible or liable for any injuries or damages related to use of ABOV products in such unauthorized applications. ABOV and the ABOV logo are trademarks of ABOV. All other product or service names are the property of their respective owners. Information in this document supersedes and replaces the information previously supplied in any former versions of this document. 2020 ABOV Semiconductor All rights reserved
Definition in file A31L12x_hal_cmpn.h.
HAL_Status_Type HAL_COMP_ClearStatus | ( | CMPn_Type * | CMPx, |
uint32_t | mask | ||
) |
Clear the Status Register.
[in] | CMPx | Pointer to the target CMP peripheral
|
[in] | mask | Mask indicating the target status flag.
|
Definition at line 419 of file A31L12x_hal_cmpn.c.
HAL_Status_Type HAL_COMP_ConfigHysteresis | ( | CMPn_Type * | CMPx, |
CMPn_CR_HYSnEN_Enum | ControlValue | ||
) |
Control the hysteresis function.
[in] | CMPx | Pointer to the target CMP peripheral
|
[in] | ControlValue |
|
Definition at line 212 of file A31L12x_hal_cmpn.c.
HAL_Status_Type HAL_COMP_ConfigInterruptPolarity | ( | CMPn_Type * | CMPx, |
CMPn_CR_CMPnPOL_Enum | Polarity | ||
) |
Select the interrupt trigger polarity.
[in] | CMPx | Pointer to the target CMP peripheral
|
[in] | Polarity |
|
Definition at line 303 of file A31L12x_hal_cmpn.c.
HAL_Status_Type HAL_COMP_ConfigIntRef | ( | CMPn_Type * | CMPx, |
CMPn_RCR_REFnEN_Enum | ControlValue, | ||
CMPn_RCR_CMPnREF_Enum | RefVoltage | ||
) |
Control the reference voltage generator and select the reference voltage.
[in] | CMPx | Pointer to the target CMP peripheral
|
[in] | ControlValue |
|
[in] | RefVoltage |
|
Definition at line 340 of file A31L12x_hal_cmpn.c.
HAL_Status_Type HAL_COMP_ConfigNegativeInput | ( | CMPn_Type * | CMPx, |
CMPn_CR_CMPnNEG_Enum | NegativeInputPin | ||
) |
Select the negative input pin of a comparator.
[in] | CMPx | Pointer to the target CMP peripheral
|
[in] | NegativeInputPin | Negative input pin
|
Definition at line 184 of file A31L12x_hal_cmpn.c.
HAL_Status_Type HAL_COMP_ConfigNoiseFilter | ( | CMPn_Type * | CMPx, |
CMPn_CR_NFCKn_Enum | SamplingClock | ||
) |
Select the sampling clock of a noise filter.
[in] | CMPx | Pointer to the target CMP peripheral
|
[in] | SamplingClock |
|
Definition at line 273 of file A31L12x_hal_cmpn.c.
HAL_Status_Type HAL_COMP_ConfigPositiveInput | ( | CMPn_Type * | CMPx, |
CMPn_CR_CMPnPOS_Enum | PositiveInputPin | ||
) |
Select the positive input pin of a comparator.
[in] | CMPx | Pointer to the target CMP peripheral
|
[in] | PositiveInputPin | Positive input pin
|
Definition at line 152 of file A31L12x_hal_cmpn.c.
HAL_Status_Type HAL_COMP_ConfigSpeed | ( | CMPn_Type * | CMPx, |
CMPn_CR_CMPnSPD_Enum | Speed | ||
) |
Select the speed of a comparator.
[in] | CMPx | Pointer to the target CMP peripheral
|
[in] | Speed |
|
Definition at line 240 of file A31L12x_hal_cmpn.c.
HAL_Status_Type HAL_COMP_Deinit | ( | CMPn_Type * | CMPx | ) |
Deinitialize the target peripheral.
[in] | CMPx | Pointer to the target CMP peripheral
|
This function resets the target peripheral and disables it's clock.
Definition at line 103 of file A31L12x_hal_cmpn.c.
References HAL_ERROR, HAL_OK, HAL_SCU_Peripheral_EnableClock2(), and HAL_SCU_Peripheral_SetReset2().
HAL_Status_Type HAL_COMP_Disable | ( | CMPn_Type * | CMPx | ) |
Disable the comparator function.
[in] | CMPx | Pointer to the target CMP peripheral
|
Definition at line 391 of file A31L12x_hal_cmpn.c.
HAL_Status_Type HAL_COMP_Enable | ( | CMPn_Type * | CMPx | ) |
Enable the comparator function.
[in] | CMPx | Pointer to the target CMP peripheral
|
Definition at line 366 of file A31L12x_hal_cmpn.c.
uint32_t HAL_COMP_GetStatus | ( | CMPn_Type * | CMPx | ) |
Get the Status Register.
[in] | CMPx | Pointer to the target CMP peripheral
|
Definition at line 451 of file A31L12x_hal_cmpn.c.
HAL_Status_Type HAL_COMP_Init | ( | CMPn_Type * | CMPx | ) |
Initialize the target peripheral.
[in] | CMPx | Pointer to the target CMP peripheral
|
This function enables the clock of target peripheral and resets it.
Definition at line 61 of file A31L12x_hal_cmpn.c.
References HAL_ERROR, HAL_OK, HAL_SCU_Peripheral_EnableClock2(), and HAL_SCU_Peripheral_SetReset2().