nRF5 SDK v17.1.0
Modules | Data Structures | Macros | Typedefs | Functions
LPCOMP driver

Low Power Comparator (LPCOMP) peripheral driver. More...

Modules

 LPCOMP peripheral driver configuration
 

Data Structures

struct  nrfx_lpcomp_config_t
 LPCOMP configuration. More...
 

Macros

#define NRFX_LPCOMP_DEFAULT_CONFIG
 LPCOMP driver default configuration, including the LPCOMP HAL configuration. More...
 

Typedefs

typedef void(* nrfx_lpcomp_event_handler_t )(nrf_lpcomp_event_t event)
 LPCOMP event handler function type. More...
 

Functions

nrfx_err_t nrfx_lpcomp_init (nrfx_lpcomp_config_t const *p_config, nrfx_lpcomp_event_handler_t event_handler)
 Function for initializing the LPCOMP driver. More...
 
void nrfx_lpcomp_uninit (void)
 Function for uninitializing the LCOMP driver. More...
 
void nrfx_lpcomp_enable (void)
 Function for enabling the LPCOMP peripheral and interrupts. More...
 
void nrfx_lpcomp_disable (void)
 Function for disabling the LPCOMP peripheral. More...
 

Detailed Description

Low Power Comparator (LPCOMP) peripheral driver.

Macro Definition Documentation

#define NRFX_LPCOMP_DEFAULT_CONFIG
Value:

LPCOMP driver default configuration, including the LPCOMP HAL configuration.

Typedef Documentation

typedef void(* nrfx_lpcomp_event_handler_t)(nrf_lpcomp_event_t event)

LPCOMP event handler function type.

Parameters
[in]eventLPCOMP event.

Function Documentation

void nrfx_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
nrfx_lpcomp_enable
void nrfx_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
nrfx_lpcomp_disable
nrfx_err_t nrfx_lpcomp_init ( nrfx_lpcomp_config_t const *  p_config,
nrfx_lpcomp_event_handler_t  event_handler 
)

Function for initializing the LPCOMP driver.

This function initializes the LPCOMP driver, but does not enable the peripheral or any interrupts. To start the driver, call the function nrfx_lpcomp_enable() after initialization.

Parameters
[in]p_configPointer to the structure with the initial configuration.
[in]event_handlerEvent handler provided by the user. Must not be NULL.
Return values
NRFX_SUCCESSInitialization was successful.
NRFX_ERROR_INVALID_STATEThe driver has already been initialized.
NRFX_ERROR_BUSYThe COMP peripheral is already in use. This is possible only if Peripheral Resource Sharing (PRS) module is enabled.
void nrfx_lpcomp_uninit ( void  )

Function for uninitializing the LCOMP driver.

This function uninitializes the LPCOMP 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 nrfx_lpcomp_init() if you want to use it.

See Also
nrfx_lpcomp_disable
nrfx_lpcomp_init

Documentation feedback | Developer Zone | Subscribe | Updated