EFM32 Happy Gecko Software Documentation
efm32hg-doc-5.1.2
|
Voltage Comparator (VCMP) peripheral API.
Copyright 2016 Silicon Laboratories, Inc. http://www.silabs.com
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no obligation to support this Software. Silicon Labs is providing the Software "AS IS", with no express or implied warranties of any kind, including, but not limited to, any implied warranties of merchantability or fitness for any particular purpose or warranties against infringement of any proprietary rights of a third party.
Silicon Labs will not be liable for any consequential, incidental, or special damages, or any other relief, or for any claim by any third party, arising from your use of this Software.
Definition in file em_vcmp.h.
Go to the source code of this file.
Data Structures | |
struct | VCMP_Init_TypeDef |
Macros | |
#define | VCMP_INIT_DEFAULT |
Enumerations | |
enum | VCMP_Hysteresis_TypeDef { vcmpHystNone, vcmpHyst20mV } |
enum | VCMP_WarmTime_TypeDef { vcmpWarmTime4Cycles = _VCMP_CTRL_WARMTIME_4CYCLES, vcmpWarmTime8Cycles = _VCMP_CTRL_WARMTIME_8CYCLES, vcmpWarmTime16Cycles = _VCMP_CTRL_WARMTIME_16CYCLES, vcmpWarmTime32Cycles = _VCMP_CTRL_WARMTIME_32CYCLES, vcmpWarmTime64Cycles = _VCMP_CTRL_WARMTIME_64CYCLES, vcmpWarmTime128Cycles = _VCMP_CTRL_WARMTIME_128CYCLES, vcmpWarmTime256Cycles = _VCMP_CTRL_WARMTIME_256CYCLES, vcmpWarmTime512Cycles = _VCMP_CTRL_WARMTIME_512CYCLES } |
Functions | |
__STATIC_INLINE void | VCMP_Disable (void) |
Disable Voltage Comparator. | |
__STATIC_INLINE void | VCMP_Enable (void) |
Enable Voltage Comparator. | |
void | VCMP_Init (const VCMP_Init_TypeDef *vcmpInit) |
Configure and enable Voltage Comparator. More... | |
__STATIC_INLINE void | VCMP_IntClear (uint32_t flags) |
Clear one or more pending VCMP interrupts. More... | |
__STATIC_INLINE void | VCMP_IntDisable (uint32_t flags) |
Disable one or more VCMP interrupts. More... | |
__STATIC_INLINE void | VCMP_IntEnable (uint32_t flags) |
Enable one or more VCMP interrupts. More... | |
__STATIC_INLINE uint32_t | VCMP_IntGet (void) |
Get pending VCMP interrupt flags. More... | |
__STATIC_INLINE uint32_t | VCMP_IntGetEnabled (void) |
Get enabled and pending VCMP interrupt flags. More... | |
__STATIC_INLINE void | VCMP_IntSet (uint32_t flags) |
Set one or more pending VCMP interrupts from SW. More... | |
void | VCMP_LowPowerRefSet (bool enable) |
Enable or disable Low Power Reference setting. More... | |
__STATIC_INLINE bool | VCMP_Ready (void) |
VCMP output is ready. | |
void | VCMP_TriggerSet (int level) |
Configure trigger level of voltage comparator. More... | |
__STATIC_INLINE bool | VCMP_VDDHigher (void) |
Returns true, if Voltage Comparator indicated VDD > trigger level, else false. | |
__STATIC_INLINE bool | VCMP_VDDLower (void) |
Returns true, if Voltage Comparator indicated VDD < trigger level, else false. | |
__STATIC_INLINE uint32_t | VCMP_VoltageToLevel (float v) |
Calculate voltage to trigger level. More... | |