Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
nrf_comp.h File Reference

Go to the source code of this file.

Data Structures

struct  comp_nrf_comp_se_config
 Single-ended mode configuration structure. More...
struct  comp_nrf_comp_diff_config
 Differential mode configuration structure. More...

Enumerations

enum  comp_nrf_comp_refsel {
  COMP_NRF_COMP_REFSEL_INT_1V2 , COMP_NRF_COMP_REFSEL_INT_1V8 , COMP_NRF_COMP_REFSEL_INT_2V4 , COMP_NRF_COMP_REFSEL_AVDDAO1V8 ,
  COMP_NRF_COMP_REFSEL_VDD , COMP_NRF_COMP_REFSEL_AREF
}
 Reference selection. More...
enum  comp_nrf_comp_sp_mode { COMP_NRF_COMP_SP_MODE_LOW , COMP_NRF_COMP_SP_MODE_NORMAL , COMP_NRF_COMP_SP_MODE_HIGH }
 Speed mode selection. More...
enum  comp_nrf_comp_isource { COMP_NRF_COMP_ISOURCE_DISABLED , COMP_NRF_COMP_ISOURCE_2UA5 , COMP_NRF_COMP_ISOURCE_5UA , COMP_NRF_COMP_ISOURCE_10UA }
 Current source configuration. More...

Functions

int comp_nrf_comp_configure_se (const struct device *dev, const struct comp_nrf_comp_se_config *config)
 Configure comparator in single-ended mode.
int comp_nrf_comp_configure_diff (const struct device *dev, const struct comp_nrf_comp_diff_config *config)
 Configure comparator in differential mode.

Enumeration Type Documentation

◆ comp_nrf_comp_isource

Current source configuration.

Enumerator
COMP_NRF_COMP_ISOURCE_DISABLED 

Current source disabled.

COMP_NRF_COMP_ISOURCE_2UA5 

2.5uA current source enabled

COMP_NRF_COMP_ISOURCE_5UA 

5uA current source enabled

COMP_NRF_COMP_ISOURCE_10UA 

10uA current source enabled

◆ comp_nrf_comp_refsel

Reference selection.

Enumerator
COMP_NRF_COMP_REFSEL_INT_1V2 

Internal 1.2V reference.

COMP_NRF_COMP_REFSEL_INT_1V8 

Internal 1.8V reference.

COMP_NRF_COMP_REFSEL_INT_2V4 

Internal 2.4V reference.

COMP_NRF_COMP_REFSEL_AVDDAO1V8 

AVDD 1.8V reference.

COMP_NRF_COMP_REFSEL_VDD 

VDD reference.

COMP_NRF_COMP_REFSEL_AREF 

Use external analog reference.

◆ comp_nrf_comp_sp_mode

Speed mode selection.

Enumerator
COMP_NRF_COMP_SP_MODE_LOW 

Low-power mode.

COMP_NRF_COMP_SP_MODE_NORMAL 

Normal mode.

COMP_NRF_COMP_SP_MODE_HIGH 

High-speed mode.

Function Documentation

◆ comp_nrf_comp_configure_diff()

int comp_nrf_comp_configure_diff ( const struct device * dev,
const struct comp_nrf_comp_diff_config * config )

Configure comparator in differential mode.

Parameters
devComparator device instance
configDifferential mode configuration
Return values
0if successful
negativeerrno-code otherwise

◆ comp_nrf_comp_configure_se()

int comp_nrf_comp_configure_se ( const struct device * dev,
const struct comp_nrf_comp_se_config * config )

Configure comparator in single-ended mode.

Parameters
devComparator device instance
configSingle-ended mode configuration
Return values
0if successful
negativeerrno-code otherwise