Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
nrf_comp.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_DRIVERS_COMP_NRF_COMP_H_
8#define ZEPHYR_INCLUDE_DRIVERS_COMP_NRF_COMP_H_
9
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
32
42
54
78
88int comp_nrf_comp_configure_se(const struct device *dev,
89 const struct comp_nrf_comp_se_config *config);
90
104
115 const struct comp_nrf_comp_diff_config *config);
116
117#ifdef __cplusplus
118}
119#endif
120
121#endif /* ZEPHYR_INCLUDE_DRIVERS_COMP_NRF_COMP_H_ */
Main header file for comparator driver API.
int comp_nrf_comp_configure_diff(const struct device *dev, const struct comp_nrf_comp_diff_config *config)
Configure comparator in differential mode.
comp_nrf_comp_refsel
Reference selection.
Definition nrf_comp.h:18
@ COMP_NRF_COMP_REFSEL_VDD
VDD reference.
Definition nrf_comp.h:28
@ COMP_NRF_COMP_REFSEL_INT_2V4
Internal 2.4V reference.
Definition nrf_comp.h:24
@ COMP_NRF_COMP_REFSEL_AVDDAO1V8
AVDD 1.8V reference.
Definition nrf_comp.h:26
@ COMP_NRF_COMP_REFSEL_AREF
Use external analog reference.
Definition nrf_comp.h:30
@ COMP_NRF_COMP_REFSEL_INT_1V8
Internal 1.8V reference.
Definition nrf_comp.h:22
@ COMP_NRF_COMP_REFSEL_INT_1V2
Internal 1.2V reference.
Definition nrf_comp.h:20
comp_nrf_comp_isource
Current source configuration.
Definition nrf_comp.h:44
@ COMP_NRF_COMP_ISOURCE_10UA
10uA current source enabled
Definition nrf_comp.h:52
@ COMP_NRF_COMP_ISOURCE_5UA
5uA current source enabled
Definition nrf_comp.h:50
@ COMP_NRF_COMP_ISOURCE_DISABLED
Current source disabled.
Definition nrf_comp.h:46
@ COMP_NRF_COMP_ISOURCE_2UA5
2.5uA current source enabled
Definition nrf_comp.h:48
int comp_nrf_comp_configure_se(const struct device *dev, const struct comp_nrf_comp_se_config *config)
Configure comparator in single-ended mode.
comp_nrf_comp_sp_mode
Speed mode selection.
Definition nrf_comp.h:34
@ COMP_NRF_COMP_SP_MODE_LOW
Low-power mode.
Definition nrf_comp.h:36
@ COMP_NRF_COMP_SP_MODE_NORMAL
Normal mode.
Definition nrf_comp.h:38
@ COMP_NRF_COMP_SP_MODE_HIGH
High-speed mode.
Definition nrf_comp.h:40
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Differential mode configuration structure.
Definition nrf_comp.h:92
uint8_t psel
Positive input selection defined by the NRF_COMP_AIN defines.
Definition nrf_comp.h:94
enum comp_nrf_comp_sp_mode sp_mode
Speed mode selection.
Definition nrf_comp.h:96
enum comp_nrf_comp_isource isource
Current source configuration.
Definition nrf_comp.h:98
uint8_t extrefsel
Negative input selection defined by the NRF_COMP_AIN defines.
Definition nrf_comp.h:100
bool enable_hyst
Hysteresis configuration.
Definition nrf_comp.h:102
Single-ended mode configuration structure.
Definition nrf_comp.h:62
enum comp_nrf_comp_refsel refsel
Reference selection.
Definition nrf_comp.h:72
enum comp_nrf_comp_isource isource
Current source configuration.
Definition nrf_comp.h:68
enum comp_nrf_comp_sp_mode sp_mode
Speed mode selection.
Definition nrf_comp.h:66
uint8_t extrefsel
External reference input selection defined by the NRF_COMP_AIN defines.
Definition nrf_comp.h:70
uint8_t th_up
Hysteresis up threshold configuration.
Definition nrf_comp.h:76
uint8_t psel
Positive input selection defined by the NRF_COMP_AIN defines.
Definition nrf_comp.h:64
uint8_t th_down
Hysteresis down threshold configuration.
Definition nrf_comp.h:74
Runtime device structure (in ROM) per driver instance.
Definition device.h:510