Select one of the symbols to view example projects that use it.
 
Outline
#include "esp_err.h"
i2s_ctlr_t
i2s_platform_acquire_occupation(i2s_ctlr_t, int, const char *);
i2s_platform_release_occupation(i2s_ctlr_t, int);
i2s_platform_get_dma_buffer_offset();
Files
loading...
SourceVuESP-IDF Framework and ExamplesESP-IDFcomponents/esp_driver_i2s/include/esp_private/i2s_platform.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* * SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */ // DO NOT USE THESE APIS IN YOUR APPLICATIONS // The following APIs are for internal use, public to other IDF components, but not for users' applications. #pragma once #include "esp_err.h" #ifdef __cplusplus extern "C" { #endif /** * @brief I2S controller type *//* ... */ typedef enum { I2S_CTLR_HP, ///< HP I2S I2S_CTLR_LP, ///< LP I2S }{ ... } i2s_ctlr_t; /** * @brief Hold the I2S port occupation * * @note This private API is used to avoid applications from using the same I2S instance for different purpose. * @note This function will help enable the peripheral APB clock as well. * * @param[in] type I2S controller type * @param id I2S port number * @param comp_name The name of compnant that occupied this i2s controller * @return * - ESP_OK: The specific I2S port is free and register the new device object successfully * - ESP_ERR_INVALID_ARG: Invalid argument, e.g. wrong port_id * - ESP_ERR_NOT_FOUND Specific I2S port is not available *//* ... */ esp_err_t i2s_platform_acquire_occupation(i2s_ctlr_t type, int id, const char *comp_name); /** * @brief Release the I2S port occupation * * @note This function will help disable the peripheral APB clock as well. * * @param[in] type I2S controller type * @param id I2S port number * @return * - ESP_OK: Deregister I2S port successfully (i.e. that I2S port can used used by other users after this function returns) * - ESP_ERR_INVALID_ARG: Invalid argument, e.g. wrong port_id * - ESP_ERR_INVALID_STATE: Specific I2S port is free already *//* ... */ esp_err_t i2s_platform_release_occupation(i2s_ctlr_t type, int id); /** * @brief This function is only used for getting DMA buffer offset in `test_i2s_iram.c` * * @return * - The offset of DMA buffers in the `i2s_chan_handle_t` struct (unit: bytes) *//* ... */ size_t i2s_platform_get_dma_buffer_offset(void); #ifdef __cplusplus }{...} #endif
Details