mcux_acmp.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright (c) 2020 Vestas Wind Systems A/S
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. /**
  7. * @file
  8. * @brief Extended public API for the NXP MCUX Analog Comparator (ACMP)
  9. */
  10. #ifndef ZEPHYR_INCLUDE_DRIVERS_SENSOR_MCUX_ACMP_H_
  11. #define ZEPHYR_INCLUDE_DRIVERS_SENSOR_MCUX_ACMP_H_
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #include <drivers/sensor.h>
  16. enum sensor_channel_mcux_acmp {
  17. /** Analog Comparator Output. */
  18. SENSOR_CHAN_MCUX_ACMP_OUTPUT = SENSOR_CHAN_PRIV_START,
  19. };
  20. enum sensor_trigger_type_mcux_acmp {
  21. /** Analog Comparator Output rising event trigger. */
  22. SENSOR_TRIG_MCUX_ACMP_OUTPUT_RISING = SENSOR_TRIG_PRIV_START,
  23. /** Analog Comparator Output falling event trigger. */
  24. SENSOR_TRIG_MCUX_ACMP_OUTPUT_FALLING,
  25. };
  26. enum sensor_attribute_mcux_acmp {
  27. /** Analog Comparator hard block offset. */
  28. SENSOR_ATTR_MCUX_ACMP_OFFSET_LEVEL = SENSOR_ATTR_COMMON_COUNT,
  29. /** Analog Comparator hysteresis level. */
  30. SENSOR_ATTR_MCUX_ACMP_HYSTERESIS_LEVEL,
  31. /**
  32. * Analog Comparator Digital-to-Analog Converter voltage
  33. * reference source.
  34. */
  35. SENSOR_ATTR_MCUX_ACMP_DAC_VOLTAGE_REFERENCE,
  36. /** Analog Comparator Digital-to-Analog Converter value. */
  37. SENSOR_ATTR_MCUX_ACMP_DAC_VALUE,
  38. /** Analog Comparator positive port input. */
  39. SENSOR_ATTR_MCUX_ACMP_POSITIVE_PORT_INPUT,
  40. /** Analog Comparator positive mux input. */
  41. SENSOR_ATTR_MCUX_ACMP_POSITIVE_MUX_INPUT,
  42. /** Analog Comparator negative port input. */
  43. SENSOR_ATTR_MCUX_ACMP_NEGATIVE_PORT_INPUT,
  44. /** Analog Comparator negative mux input. */
  45. SENSOR_ATTR_MCUX_ACMP_NEGATIVE_MUX_INPUT,
  46. };
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50. #endif /* ZEPHYR_INCLUDE_DRIVERS_SENSOR_MCUX_ACMP_H_ */