COMP driver - legacy layer

nRF5 SDK v15.0.0

Layer providing compatibility with the former API. More...

Macros

#define VOLTAGE_THRESHOLD_TO_INT NRFX_VOLTAGE_THRESHOLD_TO_INT
Macro for forwarding the new implementation.
#define COMP_CONFIG_TH NRFX_COMP_CONFIG_TH
Macro for forwarding the new implementation.
#define NRF_DRV_COMP_DEFAULT_CONFIG NRFX_COMP_DEFAULT_CONFIG
Macro for forwarding the new implementation.
#define comp_events_handler_t nrfx_comp_event_handler_t
Macro for forwarding the new implementation.
#define NRF_DRV_COMP_SHORT_STOP_AFTER_CROSS_EVT NRFX_COMP_SHORT_STOP_AFTER_CROSS_EVT
Macro for forwarding the new implementation.
#define NRF_DRV_COMP_SHORT_STOP_AFTER_UP_EVT NRFX_COMP_SHORT_STOP_AFTER_UP_EVT
Macro for forwarding the new implementation.
#define NRF_DRV_COMP_SHORT_STOP_AFTER_DOWN_EVT NRFX_COMP_SHORT_STOP_AFTER_DOWN_EVT
Macro for forwarding the new implementation.
#define nrf_drv_comp_short_mask_t nrfx_comp_short_mask_t
Macro for forwarding the new implementation.
#define NRF_DRV_COMP_EVT_EN_CROSS_MASK NRFX_COMP_EVT_EN_CROSS_MASK
Macro for forwarding the new implementation.
#define NRF_DRV_COMP_EVT_EN_UP_MASK NRFX_COMP_EVT_EN_UP_MASK
Macro for forwarding the new implementation.
#define NRF_DRV_COMP_EVT_EN_DOWN_MASK NRFX_COMP_EVT_EN_DOWN_MASK
Macro for forwarding the new implementation.
#define NRF_DRV_COMP_EVT_EN_READY_MASK NRFX_COMP_EVT_EN_READY_MASK
Macro for forwarding the new implementation.
#define nrf_drv_comp_evt_en_mask_t nrfx_comp_evt_en_mask_t
Macro for forwarding the new implementation.
#define nrf_drv_comp_uninit nrfx_comp_uninit
Macro for forwarding the new implementation.
#define nrf_drv_comp_pin_select nrfx_comp_pin_select
Macro for forwarding the new implementation.
#define nrf_drv_comp_start nrfx_comp_start
Macro for forwarding the new implementation.
#define nrf_drv_comp_stop nrfx_comp_stop
Macro for forwarding the new implementation.
#define nrf_drv_comp_sample nrfx_comp_sample
Macro for forwarding the new implementation.
#define nrf_drv_comp_task_address_get nrfx_comp_task_address_get
Macro for forwarding the new implementation.
#define nrf_drv_comp_event_address_get nrfx_comp_event_address_get
Macro for forwarding the new implementation.

Typedefs

typedef nrfx_comp_config_t nrf_drv_comp_config_t
Type definition for forwarding the new implementation.

Functions

__STATIC_INLINE ret_code_t nrf_drv_comp_init ( nrf_drv_comp_config_t const *p_config, nrfx_comp_event_handler_t event_handler)
Function for initializing the COMP driver. More...

Detailed Description

Layer providing compatibility with the former API.

Function Documentation

__STATIC_INLINE ret_code_t nrf_drv_comp_init ( nrf_drv_comp_config_t const * p_config ,
nrfx_comp_event_handler_t event_handler
)

Function for initializing the COMP driver.

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

If no configuration structure is provided, the driver is initialized with the default settings.

Parameters
[in] p_config Pointer to the structure with initial configuration.
[in] event_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.
NRF_ERROR_BUSY If the LPCOMP driver is initialized.