Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
mcux_acmp.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Vestas Wind Systems A/S
3 * Copyright 2022, 2024 NXP
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
13#ifndef ZEPHYR_INCLUDE_DRIVERS_SENSOR_MCUX_ACMP_H_
14#define ZEPHYR_INCLUDE_DRIVERS_SENSOR_MCUX_ACMP_H_
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
21
22#if defined(FSL_FEATURE_ACMP_HAS_C1_INPSEL_BIT) && (FSL_FEATURE_ACMP_HAS_C1_INPSEL_BIT == 1U)
23#define MCUX_ACMP_HAS_INPSEL 1
24#else
25#define MCUX_ACMP_HAS_INPSEL 0
26#endif
27
28#if defined(FSL_FEATURE_ACMP_HAS_C1_INNSEL_BIT) && (FSL_FEATURE_ACMP_HAS_C1_INNSEL_BIT == 1U)
29#define MCUX_ACMP_HAS_INNSEL 1
30#else
31#define MCUX_ACMP_HAS_INNSEL 0
32#endif
33
34#if defined(FSL_FEATURE_ACMP_HAS_C0_OFFSET_BIT) && (FSL_FEATURE_ACMP_HAS_C0_OFFSET_BIT == 1U)
35#define MCUX_ACMP_HAS_OFFSET 1
36#else
37#define MCUX_ACMP_HAS_OFFSET 0
38#endif
39
40#if defined(FSL_FEATURE_ACMP_HAS_C3_REG) && (FSL_FEATURE_ACMP_HAS_C3_REG != 0U)
41#define MCUX_ACMP_HAS_DISCRETE_MODE 1
42#else
43#define MCUX_ACMP_HAS_DISCRETE_MODE 0
44#endif
45
46#if defined(FSL_FEATURE_ACMP_HAS_C0_HYSTCTR_BIT) && (FSL_FEATURE_ACMP_HAS_C0_HYSTCTR_BIT == 1U)
47#define MCUX_ACMP_HAS_HYSTCTR 1
48#else
49#define MCUX_ACMP_HAS_HYSTCTR 0
50#endif
51
56
63
84#if MCUX_ACMP_HAS_DISCRETE_MODE
86 SENSOR_ATTR_MCUX_ACMP_POSITIVE_DISCRETE_MODE,
88 SENSOR_ATTR_MCUX_ACMP_NEGATIVE_DISCRETE_MODE,
90 SENSOR_ATTR_MCUX_ACMP_DISCRETE_CLOCK,
92 SENSOR_ATTR_MCUX_ACMP_DISCRETE_ENABLE_RESISTOR_DIVIDER,
94 SENSOR_ATTR_MCUX_ACMP_DISCRETE_SAMPLE_TIME,
96 SENSOR_ATTR_MCUX_ACMP_DISCRETE_PHASE1_TIME,
98 SENSOR_ATTR_MCUX_ACMP_DISCRETE_PHASE2_TIME,
99#endif
100};
101
102#ifdef __cplusplus
103}
104#endif
105
106#endif /* ZEPHYR_INCLUDE_DRIVERS_SENSOR_MCUX_ACMP_H_ */
@ SENSOR_TRIG_PRIV_START
This and higher values are sensor specific.
Definition sensor.h:275
@ SENSOR_ATTR_COMMON_COUNT
Number of all common sensor attributes.
Definition sensor.h:353
@ SENSOR_CHAN_PRIV_START
This and higher values are sensor specific.
Definition sensor.h:208
sensor_channel_mcux_acmp
Definition mcux_acmp.h:52
@ SENSOR_CHAN_MCUX_ACMP_OUTPUT
Analog Comparator Output.
Definition mcux_acmp.h:54
sensor_attribute_mcux_acmp
Definition mcux_acmp.h:64
@ SENSOR_ATTR_MCUX_ACMP_NEGATIVE_PORT_INPUT
Analog Comparator negative port input.
Definition mcux_acmp.h:81
@ SENSOR_ATTR_MCUX_ACMP_OFFSET_LEVEL
Analog Comparator hard block offset.
Definition mcux_acmp.h:66
@ SENSOR_ATTR_MCUX_ACMP_DAC_VALUE
Analog Comparator Digital-to-Analog Converter value.
Definition mcux_acmp.h:75
@ SENSOR_ATTR_MCUX_ACMP_POSITIVE_PORT_INPUT
Analog Comparator positive port input.
Definition mcux_acmp.h:77
@ SENSOR_ATTR_MCUX_ACMP_POSITIVE_MUX_INPUT
Analog Comparator positive mux input.
Definition mcux_acmp.h:79
@ SENSOR_ATTR_MCUX_ACMP_NEGATIVE_MUX_INPUT
Analog Comparator negative mux input.
Definition mcux_acmp.h:83
@ SENSOR_ATTR_MCUX_ACMP_DAC_VOLTAGE_REFERENCE
Analog Comparator Digital-to-Analog Converter voltage reference source.
Definition mcux_acmp.h:73
@ SENSOR_ATTR_MCUX_ACMP_HYSTERESIS_LEVEL
Analog Comparator hysteresis level.
Definition mcux_acmp.h:68
sensor_trigger_type_mcux_acmp
Definition mcux_acmp.h:57
@ SENSOR_TRIG_MCUX_ACMP_OUTPUT_FALLING
Analog Comparator Output falling event trigger.
Definition mcux_acmp.h:61
@ SENSOR_TRIG_MCUX_ACMP_OUTPUT_RISING
Analog Comparator Output rising event trigger.
Definition mcux_acmp.h:59
Public APIs for the sensor driver.