i2s_rec_example: add support for esp32s3

This commit is contained in:
laokaiyao
2021-09-28 12:04:34 +08:00
committed by pedro.minatel
parent f397379c8d
commit 7264c0e59a
9 changed files with 140 additions and 81 deletions

View File

@@ -1,16 +1,8 @@
// Copyright 2021 Espressif Systems (Shanghai) PTE LTD
//
// Licensed 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.
/*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
// The LL layer for I2S register operations
/*******************************************************************************
@@ -86,6 +78,26 @@ static inline void i2s_ll_rx_enable_clock(i2s_dev_t *hw)
hw->rx_clkm_conf.rx_clk_active = 1;
}
/**
* @brief Disable I2S tx module clock
*
* @param hw Peripheral I2S hardware instance address.
*/
static inline void i2s_ll_tx_disable_clock(i2s_dev_t *hw)
{
hw->tx_clkm_conf.tx_clk_active = 0;
}
/**
* @brief Disable I2S rx module clock
*
* @param hw Peripheral I2S hardware instance address.
*/
static inline void i2s_ll_rx_disable_clock(i2s_dev_t *hw)
{
hw->rx_clkm_conf.rx_clk_active = 0;
}
/**
* @brief I2S mclk use tx module clock
*