Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
nrf_lpcomp.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_LPCOMP_H_
8#define ZEPHYR_INCLUDE_DRIVERS_COMP_NRF_LPCOMP_H_
9
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
52
68
78int comp_nrf_lpcomp_configure(const struct device *dev,
79 const struct comp_nrf_lpcomp_config *config);
80
81#ifdef __cplusplus
82}
83#endif
84
85#endif /* ZEPHYR_INCLUDE_DRIVERS_COMP_NRF_LPCOMP_H_ */
Main header file for comparator driver API.
comp_nrf_lpcomp_refsel
Reference selection.
Definition nrf_lpcomp.h:18
@ COMP_NRF_LPCOMP_REFSEL_VDD_3_8
Use (VDD * (3/8)) as reference.
Definition nrf_lpcomp.h:24
@ COMP_NRF_LPCOMP_REFSEL_VDD_5_8
Use (VDD * (5/8)) as reference.
Definition nrf_lpcomp.h:28
@ COMP_NRF_LPCOMP_REFSEL_VDD_7_8
Use (VDD * (7/8)) as reference.
Definition nrf_lpcomp.h:32
@ COMP_NRF_LPCOMP_REFSEL_VDD_3_16
Use (VDD * (3/16)) as reference.
Definition nrf_lpcomp.h:36
@ COMP_NRF_LPCOMP_REFSEL_VDD_2_8
Use (VDD * (2/8)) as reference.
Definition nrf_lpcomp.h:22
@ COMP_NRF_LPCOMP_REFSEL_VDD_6_8
Use (VDD * (6/8)) as reference.
Definition nrf_lpcomp.h:30
@ COMP_NRF_LPCOMP_REFSEL_VDD_4_8
Use (VDD * (4/8)) as reference.
Definition nrf_lpcomp.h:26
@ COMP_NRF_LPCOMP_REFSEL_VDD_13_16
Use (VDD * (13/16)) as reference.
Definition nrf_lpcomp.h:46
@ COMP_NRF_LPCOMP_REFSEL_VDD_5_16
Use (VDD * (5/16)) as reference.
Definition nrf_lpcomp.h:38
@ COMP_NRF_LPCOMP_REFSEL_VDD_7_16
Use (VDD * (7/16)) as reference.
Definition nrf_lpcomp.h:40
@ COMP_NRF_LPCOMP_REFSEL_VDD_11_16
Use (VDD * (11/16)) as reference.
Definition nrf_lpcomp.h:44
@ COMP_NRF_LPCOMP_REFSEL_VDD_1_8
Use (VDD * (1/8)) as reference.
Definition nrf_lpcomp.h:20
@ COMP_NRF_LPCOMP_REFSEL_VDD_9_16
Use (VDD * (9/16)) as reference.
Definition nrf_lpcomp.h:42
@ COMP_NRF_LPCOMP_REFSEL_VDD_15_16
Use (VDD * (15/16)) as reference.
Definition nrf_lpcomp.h:48
@ COMP_NRF_LPCOMP_REFSEL_AREF
Use external analog reference.
Definition nrf_lpcomp.h:50
@ COMP_NRF_LPCOMP_REFSEL_VDD_1_16
Use (VDD * (1/16)) as reference.
Definition nrf_lpcomp.h:34
int comp_nrf_lpcomp_configure(const struct device *dev, const struct comp_nrf_lpcomp_config *config)
Configure comparator.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Configuration structure.
Definition nrf_lpcomp.h:58
uint8_t extrefsel
External reference input selection defined by the NRF_COMP_AIN defines.
Definition nrf_lpcomp.h:62
uint8_t psel
Positive input selection defined by the NRF_COMP_AIN defines.
Definition nrf_lpcomp.h:60
bool enable_hyst
Hysteresis configuration.
Definition nrf_lpcomp.h:66
enum comp_nrf_lpcomp_refsel refsel
Reference selection.
Definition nrf_lpcomp.h:64
Runtime device structure (in ROM) per driver instance.
Definition device.h:510