1 // Copyright 2020 Espressif Systems (Shanghai) PTE LTD 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #include "soc/pcnt_periph.h" 16 #include "soc/gpio_sig_map.h" 17 18 const pcnt_signal_conn_t pcnt_periph_signals = { 19 .groups = { 20 [0] = { 21 .module = PERIPH_PCNT_MODULE, 22 .irq = ETS_PCNT_INTR_SOURCE, 23 .units = { 24 [0] = { 25 .channels = { 26 [0] = { 27 .control_sig = PCNT_CTRL_CH0_IN0_IDX, 28 .pulse_sig = PCNT_SIG_CH0_IN0_IDX 29 }, 30 [1] = { 31 .control_sig = PCNT_CTRL_CH1_IN0_IDX, 32 .pulse_sig = PCNT_SIG_CH1_IN0_IDX 33 } 34 } 35 }, 36 [1] = { 37 .channels = { 38 [0] = { 39 .control_sig = PCNT_CTRL_CH0_IN1_IDX, 40 .pulse_sig = PCNT_SIG_CH0_IN1_IDX 41 }, 42 [1] = { 43 .control_sig = PCNT_CTRL_CH1_IN1_IDX, 44 .pulse_sig = PCNT_SIG_CH1_IN1_IDX 45 } 46 } 47 }, 48 [2] = { 49 .channels = { 50 [0] = { 51 .control_sig = PCNT_CTRL_CH0_IN2_IDX, 52 .pulse_sig = PCNT_SIG_CH0_IN2_IDX 53 }, 54 [1] = { 55 .control_sig = PCNT_CTRL_CH1_IN2_IDX, 56 .pulse_sig = PCNT_SIG_CH1_IN2_IDX 57 } 58 } 59 }, 60 [3] = { 61 .channels = { 62 [0] = { 63 .control_sig = PCNT_CTRL_CH0_IN3_IDX, 64 .pulse_sig = PCNT_SIG_CH0_IN3_IDX 65 }, 66 [1] = { 67 .control_sig = PCNT_CTRL_CH1_IN3_IDX, 68 .pulse_sig = PCNT_SIG_CH1_IN3_IDX 69 } 70 } 71 }, 72 [4] = { 73 .channels = { 74 [0] = { 75 .control_sig = PCNT_CTRL_CH0_IN4_IDX, 76 .pulse_sig = PCNT_SIG_CH0_IN4_IDX 77 }, 78 [1] = { 79 .control_sig = PCNT_CTRL_CH1_IN4_IDX, 80 .pulse_sig = PCNT_SIG_CH1_IN4_IDX 81 } 82 } 83 }, 84 [5] = { 85 .channels = { 86 [0] = { 87 .control_sig = PCNT_CTRL_CH0_IN5_IDX, 88 .pulse_sig = PCNT_SIG_CH0_IN5_IDX 89 }, 90 [1] = { 91 .control_sig = PCNT_CTRL_CH1_IN5_IDX, 92 .pulse_sig = PCNT_SIG_CH1_IN5_IDX 93 } 94 } 95 }, 96 [6] = { 97 .channels = { 98 [0] = { 99 .control_sig = PCNT_CTRL_CH0_IN6_IDX, 100 .pulse_sig = PCNT_SIG_CH0_IN6_IDX 101 }, 102 [1] = { 103 .control_sig = PCNT_CTRL_CH1_IN6_IDX, 104 .pulse_sig = PCNT_SIG_CH1_IN6_IDX 105 } 106 } 107 }, 108 [7] = { 109 .channels = { 110 [0] = { 111 .control_sig = PCNT_CTRL_CH0_IN7_IDX, 112 .pulse_sig = PCNT_SIG_CH0_IN7_IDX 113 }, 114 [1] = { 115 .control_sig = PCNT_CTRL_CH1_IN7_IDX, 116 .pulse_sig = PCNT_SIG_CH1_IN7_IDX 117 } 118 } 119 } 120 } 121 } 122 } 123 }; 124