Zephyr API Documentation  3.6.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 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
49};
50
56};
57
78#if MCUX_ACMP_HAS_DISCRETE_MODE
80 SENSOR_ATTR_MCUX_ACMP_POSITIVE_DISCRETE_MODE,
82 SENSOR_ATTR_MCUX_ACMP_NEGATIVE_DISCRETE_MODE,
84 SENSOR_ATTR_MCUX_ACMP_DISCRETE_CLOCK,
86 SENSOR_ATTR_MCUX_ACMP_DISCRETE_ENABLE_RESISTOR_DIVIDER,
88 SENSOR_ATTR_MCUX_ACMP_DISCRETE_SAMPLE_TIME,
90 SENSOR_ATTR_MCUX_ACMP_DISCRETE_PHASE1_TIME,
92 SENSOR_ATTR_MCUX_ACMP_DISCRETE_PHASE2_TIME,
93#endif
94};
95
96#ifdef __cplusplus
97}
98#endif
99
100#endif /* ZEPHYR_INCLUDE_DRIVERS_SENSOR_MCUX_ACMP_H_ */
@ SENSOR_TRIG_PRIV_START
This and higher values are sensor specific.
Definition: sensor.h:273
@ SENSOR_ATTR_COMMON_COUNT
Number of all common sensor attributes.
Definition: sensor.h:348
@ SENSOR_CHAN_PRIV_START
This and higher values are sensor specific.
Definition: sensor.h:206
sensor_channel_mcux_acmp
Definition: mcux_acmp.h:46
@ SENSOR_CHAN_MCUX_ACMP_OUTPUT
Analog Comparator Output.
Definition: mcux_acmp.h:48
sensor_attribute_mcux_acmp
Definition: mcux_acmp.h:58
@ SENSOR_ATTR_MCUX_ACMP_NEGATIVE_PORT_INPUT
Analog Comparator negative port input.
Definition: mcux_acmp.h:75
@ SENSOR_ATTR_MCUX_ACMP_OFFSET_LEVEL
Analog Comparator hard block offset.
Definition: mcux_acmp.h:60
@ SENSOR_ATTR_MCUX_ACMP_DAC_VALUE
Analog Comparator Digital-to-Analog Converter value.
Definition: mcux_acmp.h:69
@ SENSOR_ATTR_MCUX_ACMP_POSITIVE_PORT_INPUT
Analog Comparator positive port input.
Definition: mcux_acmp.h:71
@ SENSOR_ATTR_MCUX_ACMP_POSITIVE_MUX_INPUT
Analog Comparator positive mux input.
Definition: mcux_acmp.h:73
@ SENSOR_ATTR_MCUX_ACMP_NEGATIVE_MUX_INPUT
Analog Comparator negative mux input.
Definition: mcux_acmp.h:77
@ SENSOR_ATTR_MCUX_ACMP_DAC_VOLTAGE_REFERENCE
Analog Comparator Digital-to-Analog Converter voltage reference source.
Definition: mcux_acmp.h:67
@ SENSOR_ATTR_MCUX_ACMP_HYSTERESIS_LEVEL
Analog Comparator hysteresis level.
Definition: mcux_acmp.h:62
sensor_trigger_type_mcux_acmp
Definition: mcux_acmp.h:51
@ SENSOR_TRIG_MCUX_ACMP_OUTPUT_FALLING
Analog Comparator Output falling event trigger.
Definition: mcux_acmp.h:55
@ SENSOR_TRIG_MCUX_ACMP_OUTPUT_RISING
Analog Comparator Output rising event trigger.
Definition: mcux_acmp.h:53
Public APIs for the sensor driver.