1 /*
2  * SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #pragma once
8 
9 #include "soc/soc_caps.h"
10 #include "soc/mcpwm_reg.h"
11 #include "soc/mcpwm_struct.h"
12 #include "soc/periph_defs.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 typedef struct {
19     struct {
20         const periph_module_t module; // Peripheral module
21         const int irq_id;
22         struct {
23             struct {
24                 const uint32_t pwm_sig;
25             } generators[SOC_MCPWM_GENERATORS_PER_OPERATOR];
26         } operators[SOC_MCPWM_OPERATORS_PER_GROUP];
27         struct {
28             const uint32_t fault_sig;
29         } gpio_faults[SOC_MCPWM_GPIO_FAULTS_PER_GROUP];
30         struct {
31             const uint32_t cap_sig;
32         } captures[SOC_MCPWM_CAPTURE_CHANNELS_PER_TIMER];
33         struct {
34             const uint32_t sync_sig;
35         } gpio_synchros[SOC_MCPWM_GPIO_SYNCHROS_PER_GROUP];
36     } groups[SOC_MCPWM_GROUPS];
37 } mcpwm_signal_conn_t;
38 
39 extern const mcpwm_signal_conn_t mcpwm_periph_signals;
40 
41 #ifdef __cplusplus
42 }
43 #endif
44