Low Power Comparator (LPCOMP) driver.
More...
Low Power Comparator (LPCOMP) driver.
#define NRF_DRV_LPCONF_DEFAULT_CONFIG |
Value:{ \
.hal = {LPCOMP_CONFIG_REFERENCE , LPCOMP_CONFIG_DETECTION}, \
.input = LPCOMP_CONFIG_INPUT, \
.interrupt_priority = LPCOMP_CONFIG_IRQ_PRIORITY \
}
LPCOMP driver default configuration, including the LPCOMP HAL configuration.
LPCOMP event handler function type.
- Parameters
-
void nrf_drv_lpcomp_disable |
( |
void |
| ) |
|
Function for disabling the LPCOMP peripheral.
Before calling this function, the driver must be initialized. This function disables the LPCOMP peripheral and its interrupts.
- See Also
- nrf_drv_lpcomp_enable()
void nrf_drv_lpcomp_enable |
( |
void |
| ) |
|
Function for enabling the LPCOMP peripheral and interrupts.
Before calling this function, the driver must be initialized. This function enables the LPCOMP peripheral and its interrupts.
- See Also
- nrf_drv_lpcomp_disable()
Function for initializing the LCOMP driver.
This function initializes the LPCOMP driver, but does not enable the peripheral nor any interrupts. To start the driver, the function nrf_drv_lpcomp_enable() should be executed after initialization.
- Note
- Driver will be initialized to default settings if configuration struct is not provided.
- Parameters
-
[in] | p_config | Initial configuration. Default configuration used if NULL. |
[in] | events_handler | Handler function |
- Return values
-
NRF_ERROR_INVALID_PARAM | If the configuration is invalid. |
NRF_ERROR_INVALID_STATE | If the driver has already been initialized. |
void nrf_drv_lpcomp_uninit |
( |
void |
| ) |
|
Function for uninitializing the LCOMP driver.
This function uninitializes the LCOMP driver. The LPCOMP peripheral and its interrupts are disabled and local variables are cleaned. After this call, you must initialize the driver again by calling nrf_drv_lpcomp_init() if you want to use it.
- See Also
- nrf_drv_lpcomp_disable()
-
nrf_drv_lpcomp_init()