1 /*
2  * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #pragma once
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /**
14  * @brief PCNT channel action on control level
15  */
16 typedef enum {
17     PCNT_CHANNEL_LEVEL_ACTION_KEEP,    /*!< Keep current count mode */
18     PCNT_CHANNEL_LEVEL_ACTION_INVERSE, /*!< Invert current count mode (increase -> decrease, decrease -> increase) */
19     PCNT_CHANNEL_LEVEL_ACTION_HOLD,    /*!< Hold current count value */
20 } pcnt_channel_level_action_t;
21 
22 /**
23  * @brief PCNT channel action on signal edge
24  */
25 typedef enum {
26     PCNT_CHANNEL_EDGE_ACTION_HOLD,     /*!< Hold current count value */
27     PCNT_CHANNEL_EDGE_ACTION_INCREASE, /*!< Increase count value */
28     PCNT_CHANNEL_EDGE_ACTION_DECREASE, /*!< Decrease count value */
29 } pcnt_channel_edge_action_t;
30 
31 /**
32  * @brief PCNT unit zero cross mode
33  */
34 typedef enum {
35     PCNT_UNIT_ZERO_CROSS_POS_ZERO, /*!< start from positive value, end to zero, i.e. +N->0 */
36     PCNT_UNIT_ZERO_CROSS_NEG_ZERO, /*!< start from negative value, end to zero, i.e. -N->0 */
37     PCNT_UNIT_ZERO_CROSS_NEG_POS,  /*!< start from negative value, end to positive value, i.e. -N->+M */
38     PCNT_UNIT_ZERO_CROSS_POS_NEG,  /*!< start from positive value, end to negative value, i.e. +N->-M */
39 } pcnt_unit_zero_cross_mode_t;
40 
41 #ifdef __cplusplus
42 }
43 #endif
44