mirror of
https://github.com/apache/nuttx.git
synced 2026-05-24 16:11:56 +08:00
arch/xtensa: Remove legacy I2S implementation for esp32[-|-s2|s3]
Remove legacy I2S implementation without breaking defconfigs for Xtensa based Espressif devices Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
This commit is contained in:
committed by
Xiang Xiao
parent
dd7ac7e57d
commit
8a835dd545
@@ -35,7 +35,6 @@ config ESPRESSIF_I2S
|
||||
config ESPRESSIF_I2S0
|
||||
bool "I2S 0"
|
||||
default n
|
||||
depends on !ESP32_I2S && !ESP32S2_I2S && !ESP32S3_I2S
|
||||
select ESPRESSIF_I2S
|
||||
select I2S
|
||||
select ESP32S3_DMA if ARCH_CHIP_ESP32S3
|
||||
@@ -379,6 +378,7 @@ menu "I2S Configuration"
|
||||
|
||||
config ESPRESSIF_I2S_MAXINFLIGHT
|
||||
int "I2S queue size"
|
||||
default ESP32S3_I2S_MAXINFLIGHT if ESP32S3_I2S
|
||||
default 4
|
||||
---help---
|
||||
This is the total number of transfers, both RX and TX, that can be
|
||||
@@ -390,18 +390,26 @@ if ESPRESSIF_I2S0
|
||||
|
||||
config ESPRESSIF_I2S0_RX
|
||||
bool "Enable I2S receiver"
|
||||
default ESP32_I2S0_RX if ESP32_I2S0
|
||||
default ESP32S2_I2S_RX if ESP32S2_I2S
|
||||
default ESP32S3_I2S0_RX if ESP32S3_I2S0
|
||||
default y
|
||||
---help---
|
||||
Enable I2S receiver (port 0)
|
||||
|
||||
config ESPRESSIF_I2S0_TX
|
||||
bool "Enable I2S transmitter"
|
||||
default ESP32_I2S0_TX if ESP32_I2S0
|
||||
default ESP32S2_I2S_TX if ESP32S2_I2S
|
||||
default ESP32S3_I2S0_TX if ESP32S3_I2S0
|
||||
default y
|
||||
---help---
|
||||
Enable I2S transmitter (port 0)
|
||||
|
||||
choice ESPRESSIF_I2S0_ROLE
|
||||
prompt "I2S0 role"
|
||||
default ESPRESSIF_I2S0_ROLE_MASTER if (ESP32_I2S0_ROLE_MASTER || ESP32S2_I2S_ROLE_MASTER || ESP32S3_I2S0_ROLE_MASTER)
|
||||
default ESPRESSIF_I2S0_ROLE_SLAVE if (ESP32_I2S0_ROLE_SLAVE || ESP32S2_I2S_ROLE_SLAVE || ESP32S3_I2S0_ROLE_SLAVE)
|
||||
default ESPRESSIF_I2S0_ROLE_MASTER
|
||||
---help---
|
||||
Selects the operation role of the I2S0.
|
||||
@@ -416,6 +424,10 @@ endchoice # I2S0 role
|
||||
|
||||
choice ESPRESSIF_I2S0_DATA_BIT_WIDTH
|
||||
prompt "Bit width"
|
||||
default ESPRESSIF_I2S0_DATA_BIT_WIDTH_8BIT if (ESP32_I2S0_DATA_BIT_WIDTH_8BIT || ESP32S2_I2S_DATA_BIT_WIDTH_8BIT || ESP32S3_I2S0_DATA_BIT_WIDTH_8BIT)
|
||||
default ESPRESSIF_I2S0_DATA_BIT_WIDTH_16BIT if (ESP32_I2S0_DATA_BIT_WIDTH_16BIT || ESP32S2_I2S_DATA_BIT_WIDTH_16BIT || ESP32S3_I2S0_DATA_BIT_WIDTH_16BIT)
|
||||
default ESPRESSIF_I2S0_DATA_BIT_WIDTH_24BIT if (ESP32_I2S0_DATA_BIT_WIDTH_24BIT || ESP32S2_I2S_DATA_BIT_WIDTH_24BIT || ESP32S3_I2S0_DATA_BIT_WIDTH_24BIT)
|
||||
default ESPRESSIF_I2S0_DATA_BIT_WIDTH_32BIT if (ESP32_I2S0_DATA_BIT_WIDTH_32BIT || ESP32S2_I2S_DATA_BIT_WIDTH_32BIT || ESP32S3_I2S0_DATA_BIT_WIDTH_32BIT)
|
||||
default ESPRESSIF_I2S0_DATA_BIT_WIDTH_16BIT
|
||||
---help---
|
||||
Selects the valid data bits per sample.
|
||||
@@ -438,6 +450,9 @@ endchoice # Bit width
|
||||
|
||||
config ESPRESSIF_I2S0_SAMPLE_RATE
|
||||
int "I2S0 sample rate"
|
||||
default ESP32_I2S0_SAMPLE_RATE if ESP32_I2S
|
||||
default ESP32S2_I2S_SAMPLE_RATE if ESP32S2_I2S
|
||||
default ESP32S3_I2S0_SAMPLE_RATE if ESP32S3_I2S
|
||||
default 44100
|
||||
range 8000 48000
|
||||
---help---
|
||||
@@ -447,6 +462,9 @@ config ESPRESSIF_I2S0_SAMPLE_RATE
|
||||
|
||||
config ESPRESSIF_I2S0_BCLKPIN
|
||||
int "I2S0 BCLK pin"
|
||||
default ESP32_I2S0_BCLKPIN if ESP32_I2S
|
||||
default ESP32S2_I2S_BCLKPIN if ESP32S2_I2S
|
||||
default ESP32S3_I2S0_BCLKPIN if ESP32S3_I2S
|
||||
default 4 if ARCH_CHIP_ESP32S3 || ARCH_CHIP_ESP32
|
||||
default 35 if ARCH_CHIP_ESP32S2
|
||||
range 0 45 if (ARCH_CHIP_ESP32S2 && ESPRESSIF_I2S0_ROLE_MASTER)
|
||||
@@ -457,6 +475,9 @@ config ESPRESSIF_I2S0_BCLKPIN
|
||||
|
||||
config ESPRESSIF_I2S0_WSPIN
|
||||
int "I2S0 WS pin"
|
||||
default ESP32_I2S0_WSPIN if ESP32_I2S
|
||||
default ESP32S2_I2S_WSPIN if ESP32S2_I2S
|
||||
default ESP32S3_I2S0_WSPIN if ESP32S3_I2S
|
||||
default 5 if ARCH_CHIP_ESP32S3 || ARCH_CHIP_ESP32
|
||||
default 34 if ARCH_CHIP_ESP32S2
|
||||
range 0 45 if (ARCH_CHIP_ESP32S2 && ESPRESSIF_I2S0_ROLE_MASTER)
|
||||
@@ -468,8 +489,11 @@ config ESPRESSIF_I2S0_WSPIN
|
||||
config ESPRESSIF_I2S0_DINPIN
|
||||
int "I2S0 DIN pin"
|
||||
depends on ESPRESSIF_I2S0_RX
|
||||
default 19 if ARCH_CHIP_ESP32S3 || ARCH_CHIP_ESP32
|
||||
default ESP32_I2S0_DINPIN if ESP32_I2S0_RX
|
||||
default ESP32S2_I2S_DINPIN if ESP32S2_I2S_RX
|
||||
default ESP32S3_I2S0_DINPIN if ESP32S3_I2S0_RX
|
||||
default 37 if ARCH_CHIP_ESP32S2
|
||||
default 19 if ARCH_CHIP_ESP32S3 || ARCH_CHIP_ESP32
|
||||
range 0 46 if ARCH_CHIP_ESP32S2
|
||||
range 0 48 if ARCH_CHIP_ESP32S3
|
||||
range 0 39 if ARCH_CHIP_ESP32
|
||||
@@ -477,6 +501,9 @@ config ESPRESSIF_I2S0_DINPIN
|
||||
config ESPRESSIF_I2S0_DOUTPIN
|
||||
int "I2S0 DOUT pin"
|
||||
depends on ESPRESSIF_I2S0_TX
|
||||
default ESP32_I2S0_DOUTPIN if ESP32_I2S0_TX
|
||||
default ESP32S2_I2S_DOUTPIN if ESP32S2_I2S_TX
|
||||
default ESP32S3_I2S0_DOUTPIN if ESP32S3_I2S0_TX
|
||||
default 18 if ARCH_CHIP_ESP32S3 || ARCH_CHIP_ESP32
|
||||
default 36 if ARCH_CHIP_ESP32S2
|
||||
range 0 46 if ARCH_CHIP_ESP32S2
|
||||
@@ -486,6 +513,9 @@ config ESPRESSIF_I2S0_DOUTPIN
|
||||
config ESPRESSIF_I2S0_MCLK
|
||||
bool "Enable I2S Master Clock"
|
||||
depends on ESPRESSIF_I2S0_ROLE_MASTER
|
||||
default ESP32_I2S0_MCLK if ESP32_I2S0
|
||||
default ESP32S2_I2S_MCLK if ESP32S2_I2S
|
||||
default ESP32S3_I2S0_MCLK if ESP32S3_I2S0
|
||||
default n
|
||||
---help---
|
||||
Enable I2S master clock
|
||||
@@ -493,6 +523,9 @@ config ESPRESSIF_I2S0_MCLK
|
||||
config ESPRESSIF_I2S0_MCLKPIN
|
||||
int "I2S MCLK pin"
|
||||
depends on ESPRESSIF_I2S0_MCLK
|
||||
default ESP32_I2S0_MCLKPIN if ESP32_I2S0_MCLK
|
||||
default ESP32S2_I2S_MCLKPIN if ESP32S2_I2S_MCLK
|
||||
default ESP32S3_I2S0_MCLKPIN if ESP32S3_I2S0_MCLK
|
||||
default 0 if ARCH_CHIP_ESP32S3 || ARCH_CHIP_ESP32
|
||||
default 33 if ARCH_CHIP_ESP32S2
|
||||
range 0 45 if ARCH_CHIP_ESP32S2
|
||||
@@ -505,18 +538,24 @@ if ESPRESSIF_I2S1
|
||||
|
||||
config ESPRESSIF_I2S1_RX
|
||||
bool "Enable I2S receiver"
|
||||
default ESP32_I2S1_RX if ESP32_I2S1
|
||||
default ESP32S3_I2S1_RX if ESP32S3_I2S1
|
||||
default y
|
||||
---help---
|
||||
Enable I2S receiver (port 1)
|
||||
|
||||
config ESPRESSIF_I2S1_TX
|
||||
bool "Enable I2S transmitter"
|
||||
default ESP32_I2S1_TX if ESP32_I2S1
|
||||
default ESP32S3_I2S1_TX if ESP32S3_I2S1
|
||||
default y
|
||||
---help---
|
||||
Enable I2S transmitter (port 1)
|
||||
|
||||
choice ESPRESSIF_I2S1_ROLE
|
||||
prompt "I2S1 role"
|
||||
default ESPRESSIF_I2S1_ROLE_MASTER if (ESP32_I2S1_ROLE_MASTER || ESP32S3_I2S1_ROLE_MASTER)
|
||||
default ESPRESSIF_I2S1_ROLE_SLAVE if (ESP32_I2S1_ROLE_SLAVE || ESP32S3_I2S1_ROLE_SLAVE)
|
||||
default ESPRESSIF_I2S1_ROLE_MASTER
|
||||
---help---
|
||||
Selects the operation role of the I2S0.
|
||||
@@ -531,6 +570,10 @@ endchoice # I2S1 role
|
||||
|
||||
choice ESPRESSIF_I2S1_DATA_BIT_WIDTH
|
||||
prompt "Bit width"
|
||||
default ESPRESSIF_I2S1_DATA_BIT_WIDTH_8BIT if (ESP32_I2S1_DATA_BIT_WIDTH_8BIT || ESP32S3_I2S1_DATA_BIT_WIDTH_8BIT)
|
||||
default ESPRESSIF_I2S1_DATA_BIT_WIDTH_16BIT if (ESP32_I2S1_DATA_BIT_WIDTH_16BIT || ESP32S3_I2S1_DATA_BIT_WIDTH_16BIT)
|
||||
default ESPRESSIF_I2S1_DATA_BIT_WIDTH_24BIT if (ESP32_I2S1_DATA_BIT_WIDTH_24BIT || ESP32S3_I2S1_DATA_BIT_WIDTH_24BIT)
|
||||
default ESPRESSIF_I2S1_DATA_BIT_WIDTH_32BIT if (ESP32_I2S1_DATA_BIT_WIDTH_32BIT || ESP32S3_I2S1_DATA_BIT_WIDTH_32BIT)
|
||||
default ESPRESSIF_I2S1_DATA_BIT_WIDTH_16BIT
|
||||
---help---
|
||||
Selects the valid data bits per sample.
|
||||
@@ -553,6 +596,8 @@ endchoice # Bit width
|
||||
|
||||
config ESPRESSIF_I2S1_SAMPLE_RATE
|
||||
int "I2S1 sample rate"
|
||||
default ESP32_I2S1_SAMPLE_RATE if ESP32_I2S
|
||||
default ESP32S3_I2S1_SAMPLE_RATE if ESP32S3_I2S
|
||||
default 44100
|
||||
range 8000 48000
|
||||
---help---
|
||||
@@ -562,6 +607,8 @@ config ESPRESSIF_I2S1_SAMPLE_RATE
|
||||
|
||||
config ESPRESSIF_I2S1_BCLKPIN
|
||||
int "I2S1 BCLK pin"
|
||||
default ESP32_I2S1_BCLKPIN if ESP32_I2S
|
||||
default ESP32S3_I2S1_BCLKPIN if ESP32S3_I2S
|
||||
default 22
|
||||
range 0 33 if (ARCH_CHIP_ESP32 && ESPRESSIF_I2S0_ROLE_MASTER)
|
||||
range 0 39 if (ARCH_CHIP_ESP32 && ESPRESSIF_I2S0_ROLE_SLAVE)
|
||||
@@ -569,6 +616,8 @@ config ESPRESSIF_I2S1_BCLKPIN
|
||||
|
||||
config ESPRESSIF_I2S1_WSPIN
|
||||
int "I2S1 WS pin"
|
||||
default ESP32_I2S1_WSPIN if ESP32_I2S
|
||||
default ESP32S3_I2S1_WSPIN if ESP32S3_I2S
|
||||
default 23
|
||||
range 0 33 if (ARCH_CHIP_ESP32 && ESPRESSIF_I2S0_ROLE_MASTER)
|
||||
range 0 39 if (ARCH_CHIP_ESP32 && ESPRESSIF_I2S0_ROLE_SLAVE)
|
||||
@@ -577,13 +626,18 @@ config ESPRESSIF_I2S1_WSPIN
|
||||
config ESPRESSIF_I2S1_DINPIN
|
||||
int "I2S1 DIN pin"
|
||||
depends on ESPRESSIF_I2S1_RX
|
||||
default ESP32_I2S1_DINPIN if ESP32_I2S1_RX
|
||||
default ESP32S3_I2S1_DINPIN if ESP32S3_I2S1_RX
|
||||
default 26
|
||||
default ESP32_I2S1_DINPIN if ESP32_I2S1_RX
|
||||
range 0 39 if ARCH_CHIP_ESP32
|
||||
range 0 48 if ARCH_CHIP_ESP32S3
|
||||
|
||||
config ESPRESSIF_I2S1_DOUTPIN
|
||||
int "I2S1 DOUT pin"
|
||||
depends on ESPRESSIF_I2S1_TX
|
||||
default ESP32_I2S1_DOUTPIN if ESP32_I2S1_TX
|
||||
default ESP32S3_I2S1_DOUTPIN if ESP32S3_I2S1_TX
|
||||
default 25
|
||||
range 0 39 if ARCH_CHIP_ESP32
|
||||
range 0 48 if ARCH_CHIP_ESP32S3
|
||||
@@ -591,6 +645,8 @@ config ESPRESSIF_I2S1_DOUTPIN
|
||||
config ESPRESSIF_I2S1_MCLK
|
||||
bool "Enable I2S Master Clock"
|
||||
depends on ESPRESSIF_I2S1_ROLE_MASTER
|
||||
default ESP32_I2S1_MCLK if ESP32_I2S1
|
||||
default ESP32S3_I2S1_MCLK if ESP32S3_I2S1
|
||||
default n
|
||||
---help---
|
||||
Enable I2S master clock
|
||||
@@ -598,6 +654,8 @@ config ESPRESSIF_I2S1_MCLK
|
||||
config ESPRESSIF_I2S1_MCLKPIN
|
||||
int "I2S1 MCLK pin"
|
||||
depends on ESPRESSIF_I2S1_MCLK
|
||||
default ESP32_I2S1_MCLKPIN if ESP32_I2S1_MCLK
|
||||
default ESP32S3_I2S1_MCLKPIN if ESP32S3_I2S1_MCLK
|
||||
default 1 if ARCH_CHIP_ESP32S3
|
||||
default 0 if ARCH_CHIP_ESP32
|
||||
range 0 48 if ARCH_CHIP_ESP32S3
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
#include "esp32s2_irq.h"
|
||||
#else
|
||||
#include "esp32_gpio.h"
|
||||
#include "hardware/esp32_gpio_sigmap.h"
|
||||
#include "esp32_dma.h"
|
||||
#include "esp32_irq.h"
|
||||
#endif
|
||||
@@ -137,23 +136,35 @@
|
||||
#define ESP_IRQ_TRIGGER_LEVEL ESP32_CPUINT_LEVEL
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_I2S0_DATA_BIT_WIDTH_8BIT
|
||||
#if defined(CONFIG_ESPRESSIF_I2S0_DATA_BIT_WIDTH_8BIT) || \
|
||||
defined(CONFIG_ESP32_I2S0_DATA_BIT_WIDTH_8BIT) || \
|
||||
defined(CONFIG_ESP32S2_I2S_DATA_BIT_WIDTH_8BIT)
|
||||
# define ESPRESSIF_I2S0_DATA_BIT_WIDTH 8
|
||||
#elif CONFIG_ESPRESSIF_I2S0_DATA_BIT_WIDTH_16BIT
|
||||
#elif defined(CONFIG_ESPRESSIF_I2S0_DATA_BIT_WIDTH_16BIT) || \
|
||||
defined(CONFIG_ESP32_I2S0_DATA_BIT_WIDTH_16BIT) || \
|
||||
defined(CONFIG_ESP32S2_I2S_DATA_BIT_WIDTH_16BIT)
|
||||
# define ESPRESSIF_I2S0_DATA_BIT_WIDTH 16
|
||||
#elif CONFIG_ESPRESSIF_I2S0_DATA_BIT_WIDTH_24BIT
|
||||
#elif defined(CONFIG_ESPRESSIF_I2S0_DATA_BIT_WIDTH_24BIT) || \
|
||||
defined(CONFIG_ESP32_I2S0_DATA_BIT_WIDTH_24BIT) || \
|
||||
defined(CONFIG_ESP32S2_I2S_DATA_BIT_WIDTH_24BIT)
|
||||
# define ESPRESSIF_I2S0_DATA_BIT_WIDTH 24
|
||||
#elif CONFIG_ESPRESSIF_I2S0_DATA_BIT_WIDTH_32BIT
|
||||
#elif defined(CONFIG_ESPRESSIF_I2S0_DATA_BIT_WIDTH_32BIT) || \
|
||||
defined(CONFIG_ESP32_I2S0_DATA_BIT_WIDTH_32BIT) || \
|
||||
defined(CONFIG_ESP32S2_I2S_DATA_BIT_WIDTH_32BIT)
|
||||
# define ESPRESSIF_I2S0_DATA_BIT_WIDTH 32
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESPRESSIF_I2S1_DATA_BIT_WIDTH_8BIT
|
||||
#if defined(CONFIG_ESPRESSIF_I2S1_DATA_BIT_WIDTH_8BIT) || \
|
||||
defined(CONFIG_ESP32_I2S1_DATA_BIT_WIDTH_8BIT)
|
||||
# define ESPRESSIF_I2S1_DATA_BIT_WIDTH 8
|
||||
#elif CONFIG_ESPRESSIF_I2S1_DATA_BIT_WIDTH_16BIT
|
||||
#elif defined(CONFIG_ESPRESSIF_I2S1_DATA_BIT_WIDTH_16BIT) || \
|
||||
defined(CONFIG_ESP32_I2S1_DATA_BIT_WIDTH_16BIT)
|
||||
# define ESPRESSIF_I2S1_DATA_BIT_WIDTH 16
|
||||
#elif CONFIG_ESPRESSIF_I2S1_DATA_BIT_WIDTH_24BIT
|
||||
#elif defined(CONFIG_ESPRESSIF_I2S1_DATA_BIT_WIDTH_24BIT) || \
|
||||
defined(CONFIG_ESP32_I2S1_DATA_BIT_WIDTH_24BIT)
|
||||
# define ESPRESSIF_I2S1_DATA_BIT_WIDTH 24
|
||||
#elif CONFIG_ESPRESSIF_I2S1_DATA_BIT_WIDTH_32BIT
|
||||
#elif defined(CONFIG_ESPRESSIF_I2S1_DATA_BIT_WIDTH_32BIT) || \
|
||||
defined(CONFIG_ESP32_I2S1_DATA_BIT_WIDTH_32BIT)
|
||||
# define ESPRESSIF_I2S1_DATA_BIT_WIDTH 32
|
||||
#endif
|
||||
|
||||
@@ -198,7 +209,7 @@
|
||||
#ifdef CONFIG_DEBUG_I2S_INFO
|
||||
# define CONFIG_ESPRESSIF_I2S_DUMPBUFFERS
|
||||
#else
|
||||
# undef CONFIG_ESPRESSIF_I2S_DUMPBUFFERS
|
||||
# undef CONFIG_ESPRESSIF_I2S_DUMPBUFFERS
|
||||
#endif
|
||||
|
||||
#define I2S_GPIO_UNUSED -1 /* For signals which are not used */
|
||||
|
||||
@@ -311,10 +311,11 @@ config ESP32_SDMMC
|
||||
No yet implemented
|
||||
|
||||
config ESP32_I2S
|
||||
bool "I2S (legacy implementation)"
|
||||
bool "I2S (legacy implementation: read help)"
|
||||
select I2S
|
||||
---help---
|
||||
See the Board Selection menu to configure the pins used by I2S.
|
||||
This is a deprecated Kconfig macro. Its kept for retrocompatibility only.
|
||||
Use "CONFIG_ESPRESSIF_I2S" instead.
|
||||
|
||||
if ESP32_I2S
|
||||
|
||||
@@ -323,6 +324,7 @@ config ESP32_I2S0
|
||||
default n
|
||||
select ARCH_DMA
|
||||
select ESP32_GPIO_IRQ
|
||||
select ESPRESSIF_I2S0
|
||||
|
||||
if ESP32_I2S0
|
||||
|
||||
@@ -452,6 +454,7 @@ config ESP32_I2S1
|
||||
default n
|
||||
select ARCH_DMA
|
||||
select ESP32_GPIO_IRQ
|
||||
select ESPRESSIF_I2S1
|
||||
|
||||
if ESP32_I2S1
|
||||
|
||||
|
||||
@@ -80,9 +80,6 @@ CHIP_CSRCS += esp32_i2c.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESP32_I2S),y)
|
||||
CHIP_CSRCS += esp32_i2s.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESP32_TWAI),y)
|
||||
CHIP_CSRCS += esp32_twai.c
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,75 +0,0 @@
|
||||
/****************************************************************************
|
||||
* arch/xtensa/src/esp32/esp32_i2s.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ARCH_XTENSA_SRC_ESP32_ESP32_I2S_H
|
||||
#define __ARCH_XTENSA_SRC_ESP32_ESP32_I2S_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/audio/i2s.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32_I2S
|
||||
|
||||
#define ESP32_I2S0 0
|
||||
#define ESP32_I2S1 1
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp32_i2sbus_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the selected I2S port
|
||||
*
|
||||
* Input Parameters:
|
||||
* Port number (for hardware that has multiple I2S interfaces)
|
||||
*
|
||||
* Returned Value:
|
||||
* Valid I2S device structure reference on success; a NULL on failure
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
struct i2s_dev_s *esp32_i2sbus_initialize(int port);
|
||||
|
||||
#endif /* CONFIG_ESP32_I2S */
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ARCH_XTENSA_SRC_ESP32_ESP32_I2S_H */
|
||||
@@ -229,13 +229,15 @@ config ESP32S2_RNG
|
||||
ESP32-S2 supports a RNG that passed on Dieharder test suite.
|
||||
|
||||
config ESP32S2_I2S
|
||||
bool "I2S (legacy implementation)"
|
||||
bool "I2S (legacy implementation: read help)"
|
||||
default n
|
||||
select I2S
|
||||
select ARCH_DMA
|
||||
select ESP32S2_GPIO_IRQ
|
||||
select ESPRESSIF_I2S0
|
||||
---help---
|
||||
See the Board Selection menu to configure the pins used by I2S.
|
||||
This is a deprecated Kconfig macro. Its kept for retrocompatibility only.
|
||||
Use "CONFIG_ESPRESSIF_I2S" instead.
|
||||
|
||||
if ESP32S2_I2S
|
||||
|
||||
|
||||
@@ -59,10 +59,6 @@ CHIP_CSRCS += esp32s2_i2c.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESP32S2_I2S),y)
|
||||
CHIP_CSRCS += esp32s2_i2s.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESP32S2_TWAI),y)
|
||||
CHIP_CSRCS += esp32s2_twai.c
|
||||
endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,74 +0,0 @@
|
||||
/****************************************************************************
|
||||
* arch/xtensa/src/esp32s2/esp32s2_i2s.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ARCH_XTENSA_SRC_ESP32S2_ESP32S2_I2S_H
|
||||
#define __ARCH_XTENSA_SRC_ESP32S2_ESP32S2_I2S_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/audio/i2s.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32S2_I2S
|
||||
|
||||
#define ESP32S2_I2S0 0
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp32s2_i2sbus_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the selected I2S port
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
*
|
||||
* Returned Value:
|
||||
* Valid I2S device structure reference on success; a NULL on failure
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
struct i2s_dev_s *esp32s2_i2sbus_initialize(void);
|
||||
|
||||
#endif /* CONFIG_ESP32S2_I2S */
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ARCH_XTENSA_SRC_ESP32S2_ESP32S2_I2S_H */
|
||||
@@ -365,10 +365,11 @@ config ESP32S3_I2C
|
||||
default n
|
||||
|
||||
config ESP32S3_I2S
|
||||
bool "I2S (legacy implementation)"
|
||||
bool "I2S (legacy implementation: read help)"
|
||||
select I2S
|
||||
---help---
|
||||
See the Board Selection menu to configure the pins used by I2S.
|
||||
This is a deprecated Kconfig macro. Its kept for retrocompatibility only.
|
||||
Use "CONFIG_ESPRESSIF_I2S" instead.
|
||||
|
||||
if ESP32S3_I2S
|
||||
|
||||
@@ -387,6 +388,7 @@ config ESP32S3_I2S0
|
||||
select ESP32S3_DMA
|
||||
select ESP32S3_GPIO_IRQ
|
||||
select SCHED_HPWORK
|
||||
select ESPRESSIF_I2S0
|
||||
|
||||
if ESP32S3_I2S0
|
||||
|
||||
@@ -497,6 +499,7 @@ config ESP32S3_I2S1
|
||||
select ESP32S3_DMA
|
||||
select ESP32S3_GPIO_IRQ
|
||||
select SCHED_HPWORK
|
||||
select ESPRESSIF_I2S1
|
||||
|
||||
if ESP32S3_I2S1
|
||||
|
||||
|
||||
@@ -115,10 +115,6 @@ CHIP_CSRCS += esp32s3_i2c.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESP32S3_I2S),y)
|
||||
CHIP_CSRCS += esp32s3_i2s.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESP32S3_SPI),y)
|
||||
ifeq ($(CONFIG_ESP32S3_SPI_IO_SPI),y)
|
||||
CHIP_CSRCS += esp32s3_spi.c
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,75 +0,0 @@
|
||||
/****************************************************************************
|
||||
* arch/xtensa/src/esp32s3/esp32s3_i2s.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ARCH_XTENSA_SRC_ESP32S3_ESP32S3_I2S_H
|
||||
#define __ARCH_XTENSA_SRC_ESP32S3_ESP32S3_I2S_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/audio/i2s.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#undef EXTERN
|
||||
#if defined(__cplusplus)
|
||||
#define EXTERN extern "C"
|
||||
extern "C"
|
||||
{
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ESP32S3_I2S
|
||||
|
||||
#define ESP32S3_I2S0 0
|
||||
#define ESP32S3_I2S1 1
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: esp32s3_i2sbus_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize the selected I2S port
|
||||
*
|
||||
* Input Parameters:
|
||||
* Port number (for hardware that has multiple I2S interfaces)
|
||||
*
|
||||
* Returned Value:
|
||||
* Valid I2S device structure reference on success; a NULL on failure
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
struct i2s_dev_s *esp32s3_i2sbus_initialize(int port);
|
||||
|
||||
#endif /* CONFIG_ESP32S3_I2S */
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ARCH_XTENSA_SRC_ESP32S3_ESP32S3_I2S_H */
|
||||
Reference in New Issue
Block a user