mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-11-04 00:51:42 +01:00 
			
		
		
		
	fast_gpio: driver support on esp32c3
This commit is contained in:
		@@ -1,5 +1,6 @@
 | 
			
		||||
set(srcs
 | 
			
		||||
    "adc_periph.c"
 | 
			
		||||
    "dedic_gpio_periph.c"
 | 
			
		||||
    "gdma_periph.c"
 | 
			
		||||
    "gpio_periph.c"
 | 
			
		||||
    "interrupts.c"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										37
									
								
								components/soc/esp32h2/dedic_gpio_periph.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								components/soc/esp32h2/dedic_gpio_periph.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,37 @@
 | 
			
		||||
/*
 | 
			
		||||
 * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD
 | 
			
		||||
 *
 | 
			
		||||
 * SPDX-License-Identifier: Apache-2.0
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "soc/gpio_sig_map.h"
 | 
			
		||||
#include "soc/dedic_gpio_periph.h"
 | 
			
		||||
 | 
			
		||||
const dedic_gpio_signal_conn_t dedic_gpio_periph_signals = {
 | 
			
		||||
    .module = -1,
 | 
			
		||||
    .irq = -1,
 | 
			
		||||
    .cores = {
 | 
			
		||||
        [0] = {
 | 
			
		||||
            .in_sig_per_channel = {
 | 
			
		||||
                [0] = CPU_GPIO_IN0_IDX,
 | 
			
		||||
                [1] = CPU_GPIO_IN1_IDX,
 | 
			
		||||
                [2] = CPU_GPIO_IN2_IDX,
 | 
			
		||||
                [3] = CPU_GPIO_IN3_IDX,
 | 
			
		||||
                [4] = CPU_GPIO_IN4_IDX,
 | 
			
		||||
                [5] = CPU_GPIO_IN5_IDX,
 | 
			
		||||
                [6] = CPU_GPIO_IN6_IDX,
 | 
			
		||||
                [7] = CPU_GPIO_IN7_IDX,
 | 
			
		||||
            },
 | 
			
		||||
            .out_sig_per_channel = {
 | 
			
		||||
                [0] = CPU_GPIO_OUT0_IDX,
 | 
			
		||||
                [1] = CPU_GPIO_OUT1_IDX,
 | 
			
		||||
                [2] = CPU_GPIO_OUT2_IDX,
 | 
			
		||||
                [3] = CPU_GPIO_OUT3_IDX,
 | 
			
		||||
                [4] = CPU_GPIO_OUT4_IDX,
 | 
			
		||||
                [5] = CPU_GPIO_OUT5_IDX,
 | 
			
		||||
                [6] = CPU_GPIO_OUT6_IDX,
 | 
			
		||||
                [7] = CPU_GPIO_OUT7_IDX,
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
};
 | 
			
		||||
@@ -6,6 +6,7 @@
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#define SOC_CPU_CORES_NUM               1
 | 
			
		||||
#define SOC_DEDICATED_GPIO_SUPPORTED    1
 | 
			
		||||
#define SOC_GDMA_SUPPORTED              1
 | 
			
		||||
#define SOC_TWAI_SUPPORTED              1
 | 
			
		||||
#define SOC_BT_SUPPORTED                1
 | 
			
		||||
@@ -92,6 +93,11 @@
 | 
			
		||||
// Support to configure sleep status
 | 
			
		||||
#define SOC_GPIO_SUPPORT_SLP_SWITCH  (1)
 | 
			
		||||
 | 
			
		||||
/*-------------------------- Dedicated GPIO CAPS -----------------------------*/
 | 
			
		||||
#define SOC_DEDIC_GPIO_OUT_CHANNELS_NUM (8) /*!< 8 outward channels on each CPU core */
 | 
			
		||||
#define SOC_DEDIC_GPIO_IN_CHANNELS_NUM  (8) /*!< 8 inward channels on each CPU core */
 | 
			
		||||
#define SOC_DEDIC_PERIPH_AUTO_ENABLE    (1) /*!< The dedicated GPIO peripheral is enabled automatically */
 | 
			
		||||
 | 
			
		||||
/*-------------------------- I2C CAPS ----------------------------------------*/
 | 
			
		||||
// ESP32-C3 have 2 I2C.
 | 
			
		||||
#define SOC_I2C_NUM                 (1)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user