Skip to content

Commit

Permalink
Merge pull request #284 from espressif/fix/deprecate_audio_drivers
Browse files Browse the repository at this point in the history
Fix/deprecate audio drivers
  • Loading branch information
tore-espressif authored Jan 29, 2024
2 parents 8a04228 + b637e64 commit de8a267
Show file tree
Hide file tree
Showing 18 changed files with 73 additions and 80 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: CC0-1.0
*/
Expand Down Expand Up @@ -55,11 +55,6 @@ extern "C" {
*
* There are multiple devices connected to I2C peripheral:)
* - LCD Touch controller
*
* After initialization of I2C, use BSP_I2C_NUM macro when creating I2C devices drivers ie.:
* \code{.c}
* es8311_handle_t es8311_dev = es8311_create(BSP_I2C_NUM, ES8311_ADDRRES_0);
* \endcode
**************************************************************************************************/
#define BSP_I2C_NUM 1
#define BSP_I2C_CLK_SPEED_HZ 400000
Expand Down Expand Up @@ -99,7 +94,7 @@ esp_err_t bsp_i2c_deinit(void);
* This function initializes SPI, display controller and starts LVGL handling task.
* LCD backlight must be enabled separately by calling bsp_display_brightness_set()
*
* @return Pointer to LVGL display or NULL when error occured
* @return Pointer to LVGL display or NULL when error occurred
*/
lv_disp_t *bsp_display_start(void);

Expand Down
14 changes: 7 additions & 7 deletions bsp/esp-box-3/include/bsp/esp-box-3.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -184,21 +184,21 @@ esp_err_t bsp_audio_init(const i2s_std_config_t *i2s_config);
* @brief Get codec I2S interface (initialized in bsp_audio_init)
*
* @return
* - Pointer to codec I2S interface handle or NULL when error occured
* - Pointer to codec I2S interface handle or NULL when error occurred
*/
const audio_codec_data_if_t *bsp_audio_get_codec_itf(void);

/**
* @brief Initialize speaker codec device
*
* @return Pointer to codec device handle or NULL when error occured
* @return Pointer to codec device handle or NULL when error occurred
*/
esp_codec_dev_handle_t bsp_audio_codec_speaker_init(void);

/**
* @brief Initialize microphone codec device
*
* @return Pointer to codec device handle or NULL when error occured
* @return Pointer to codec device handle or NULL when error occurred
*/
esp_codec_dev_handle_t bsp_audio_codec_microphone_init(void);

Expand All @@ -215,7 +215,7 @@ esp_codec_dev_handle_t bsp_audio_codec_microphone_init(void);
*
* After initialization of I2C, use BSP_I2C_NUM macro when creating I2C devices drivers ie.:
* \code{.c}
* es8311_handle_t es8311_dev = es8311_create(BSP_I2C_NUM, ES8311_ADDRRES_0);
* icm42670_handle_t imu = icm42670_create(BSP_I2C_NUM, ICM42670_I2C_ADDRESS);
* \endcode
**************************************************************************************************/
#define BSP_I2C_NUM CONFIG_BSP_I2C_NUM
Expand Down Expand Up @@ -344,7 +344,7 @@ esp_err_t bsp_sdcard_unmount(void);
* This function initializes SPI, display controller and starts LVGL handling task.
* LCD backlight must be enabled separately by calling bsp_display_brightness_set()
*
* @return Pointer to LVGL display or NULL when error occured
* @return Pointer to LVGL display or NULL when error occurred
*/
lv_disp_t *bsp_display_start(void);

Expand All @@ -356,7 +356,7 @@ lv_disp_t *bsp_display_start(void);
*
* @param cfg display configuration
*
* @return Pointer to LVGL display or NULL when error occured
* @return Pointer to LVGL display or NULL when error occurred
*/
lv_disp_t *bsp_display_start_with_config(const bsp_display_cfg_t *cfg);

Expand Down
25 changes: 12 additions & 13 deletions bsp/esp-box-lite/include/bsp/esp-box-lite.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -171,21 +171,21 @@ esp_err_t bsp_audio_init(const i2s_std_config_t *i2s_config);
* @brief Get codec I2S interface (initialized in bsp_audio_init)
*
* @return
* - Pointer to codec I2S interface handle or NULL when error occured
* - Pointer to codec I2S interface handle or NULL when error occurred
*/
const audio_codec_data_if_t *bsp_audio_get_codec_itf(void);

/**
* @brief Initialize speaker codec device
*
* @return Pointer to codec device handle or NULL when error occured
* @return Pointer to codec device handle or NULL when error occurred
*/
esp_codec_dev_handle_t bsp_audio_codec_speaker_init(void);

/**
* @brief Initialize microphone codec device
*
* @return Pointer to codec device handle or NULL when error occured
* @return Pointer to codec device handle or NULL when error occurred
*/
esp_codec_dev_handle_t bsp_audio_codec_microphone_init(void);

Expand All @@ -194,15 +194,14 @@ esp_codec_dev_handle_t bsp_audio_codec_microphone_init(void);
* I2C interface
*
* There are multiple devices connected to I2C peripheral:
* - Codec ES8311 (configuration only)
* - ADC ES7210 (configuration only)
* - Encryption chip ATECC608A (NOT populated on most boards)
* - Codec ES8156 (configuration only)
* - ADC ES7243E (configuration only)
* - LCD Touch controller
* - Inertial Measurement Unit ICM-42607-P
* - Inertial Measurement Unit ICM-42607-P (NOT populated on most boards)
*
* After initialization of I2C, use BSP_I2C_NUM macro when creating I2C devices drivers ie.:
* \code{.c}
* es8311_handle_t es8311_dev = es8311_create(BSP_I2C_NUM, ES8311_ADDRRES_0);
* icm42670_handle_t imu = icm42670_create(BSP_I2C_NUM, ICM42670_I2C_ADDRESS);
* \endcode
**************************************************************************************************/
#define BSP_I2C_NUM CONFIG_BSP_I2C_NUM
Expand Down Expand Up @@ -290,7 +289,7 @@ esp_err_t bsp_spiffs_unmount(void);
* This function initializes SPI, display controller and starts LVGL handling task.
* LCD backlight must be enabled separately by calling bsp_display_brightness_set()
*
* @return Pointer to LVGL display or NULL when error occured
* @return Pointer to LVGL display or NULL when error occurred
*/
lv_disp_t *bsp_display_start(void);

Expand All @@ -302,7 +301,7 @@ lv_disp_t *bsp_display_start(void);
*
* @param cfg display configuration
*
* @return Pointer to LVGL display or NULL when error occured
* @return Pointer to LVGL display or NULL when error occurred
*/
lv_disp_t *bsp_display_start_with_config(const bsp_display_cfg_t *cfg);

Expand Down Expand Up @@ -333,7 +332,7 @@ void bsp_display_unlock(void);
/**
* @brief Set display's brightness
*
* Brightness is controlled with PWM signal to a pin controling backlight.
* Brightness is controlled with PWM signal to a pin controlling backlight.
*
* @param[in] brightness_percent Brightness in [%]
* @return
Expand Down Expand Up @@ -421,7 +420,7 @@ adc_oneshot_unit_handle_t bsp_adc_get_handle(void);
* @return
* - ESP_OK All buttons initialized
* - ESP_ERR_INVALID_ARG btn_array is too small or NULL
* - ESP_FAIL Underlaying iot_button_create failed
* - ESP_FAIL Underlying iot_button_create failed
*/
esp_err_t bsp_iot_button_create(button_handle_t btn_array[], int *btn_cnt, int btn_array_size);

Expand Down
8 changes: 4 additions & 4 deletions bsp/esp-box/include/bsp/esp-box.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -172,7 +172,7 @@ esp_err_t bsp_audio_init(const i2s_std_config_t *i2s_config);
* @brief Get codec I2S interface (initialized in bsp_audio_init)
*
* @return
* - Pointer to codec I2S interface handle or NULL when error occured
* - Pointer to codec I2S interface handle or NULL when error occurred
*/
const audio_codec_data_if_t *bsp_audio_get_codec_itf(void);

Expand Down Expand Up @@ -286,7 +286,7 @@ esp_err_t bsp_spiffs_unmount(void);
* This function initializes SPI, display controller and starts LVGL handling task.
* LCD backlight must be enabled separately by calling bsp_display_brightness_set()
*
* @return Pointer to LVGL display or NULL when error occured
* @return Pointer to LVGL display or NULL when error occurred
*/
lv_disp_t *bsp_display_start(void);

Expand All @@ -298,7 +298,7 @@ lv_disp_t *bsp_display_start(void);
*
* @param cfg display configuration
*
* @return Pointer to LVGL display or NULL when error occured
* @return Pointer to LVGL display or NULL when error occurred
*/
lv_disp_t *bsp_display_start_with_config(const bsp_display_cfg_t *cfg);

Expand Down
4 changes: 2 additions & 2 deletions bsp/esp32_azure_iot_kit/include/bsp/esp32_azure_iot_kit.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ esp_err_t bsp_sdcard_unmount(void);
* This function initializes SPI, display controller and starts LVGL handling task.
* LCD backlight must be enabled separately by calling bsp_display_brightness_set()
*
* @return Pointer to LVGL display or NULL when error occured
* @return Pointer to LVGL display or NULL when error occurred
*/
lv_disp_t *bsp_display_start(void);

Expand All @@ -211,7 +211,7 @@ lv_disp_t *bsp_display_start(void);
*
* @param cfg display configuration
*
* @return Pointer to LVGL display or NULL when error occured
* @return Pointer to LVGL display or NULL when error occurred
*/
lv_disp_t *bsp_display_start_with_config(const bsp_display_cfg_t *cfg);

Expand Down
4 changes: 2 additions & 2 deletions bsp/esp32_c3_lcdkit/include/bsp/esp32_c3_lcdkit.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ extern "C" {
* This function initializes SPI, display controller and starts LVGL handling task.
* LCD backlight must be enabled separately by calling bsp_display_brightness_set()
*
* @return Pointer to LVGL display or NULL when error occured
* @return Pointer to LVGL display or NULL when error occurred
*/
lv_disp_t *bsp_display_start(void);

Expand Down Expand Up @@ -215,7 +215,7 @@ esp_err_t bsp_audio_init(const i2s_pdm_tx_config_t *i2s_config, i2s_chan_handle_
/**
* @brief Initialize speaker codec device
*
* @return Pointer to codec device handle or NULL when error occured
* @return Pointer to codec device handle or NULL when error occurred
*/
esp_codec_dev_handle_t bsp_audio_codec_speaker_init(void);
/**************************************************************************************************
Expand Down
8 changes: 4 additions & 4 deletions bsp/esp32_lyrat/include/bsp/esp32_lyrat.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -143,21 +143,21 @@ esp_err_t bsp_audio_init(const i2s_std_config_t *i2s_config);
* @brief Get codec I2S interface (initialized in bsp_audio_init)
*
* @return
* - Pointer to codec I2S interface handle or NULL when error occured
* - Pointer to codec I2S interface handle or NULL when error occurred
*/
const audio_codec_data_if_t *bsp_audio_get_codec_itf(void);

/**
* @brief Initialize speaker codec device
*
* @return Pointer to codec device handle or NULL when error occured
* @return Pointer to codec device handle or NULL when error occurred
*/
esp_codec_dev_handle_t bsp_audio_codec_speaker_init(void);

/**
* @brief Initialize microphone codec device
*
* @return Pointer to codec device handle or NULL when error occured
* @return Pointer to codec device handle or NULL when error occurred
*/
esp_codec_dev_handle_t bsp_audio_codec_microphone_init(void);

Expand Down
10 changes: 5 additions & 5 deletions bsp/esp32_s3_eye/include/bsp/esp32_s3_eye.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -300,7 +300,7 @@ esp_err_t bsp_sdcard_unmount(void);
*
* This function initializes SPI, display controller and starts LVGL handling task.
*
* @return Pointer to LVGL display or NULL when error occured
* @return Pointer to LVGL display or NULL when error occurred
*/
lv_disp_t *bsp_display_start(void);

Expand All @@ -312,7 +312,7 @@ lv_disp_t *bsp_display_start(void);
*
* @param cfg display configuration
*
* @return Pointer to LVGL display or NULL when error occured
* @return Pointer to LVGL display or NULL when error occurred
*/
lv_disp_t *bsp_display_start_with_config(const bsp_display_cfg_t *cfg);

Expand Down Expand Up @@ -455,14 +455,14 @@ esp_err_t bsp_audio_init(const i2s_std_config_t *i2s_config);
* @brief Get codec I2S interface (initialized in bsp_audio_init)
*
* @return
* - Pointer to codec I2S interface handle or NULL when error occured
* - Pointer to codec I2S interface handle or NULL when error occurred
*/
const audio_codec_data_if_t *bsp_audio_get_codec_itf(void);

/**
* @brief Initialize microphone codec device
*
* @return Pointer to codec device handle or NULL when error occured
* @return Pointer to codec device handle or NULL when error occurred
*/
esp_codec_dev_handle_t bsp_audio_codec_microphone_init(void);

Expand Down
8 changes: 4 additions & 4 deletions bsp/esp32_s3_korvo_2/include/bsp/esp32_s3_korvo_2.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -203,7 +203,7 @@ esp_err_t bsp_audio_init(const i2s_std_config_t *i2s_config);
* @brief Get codec I2S interface (initialized in bsp_audio_init)
*
* @return
* - Pointer to codec I2S interface handle or NULL when error occured
* - Pointer to codec I2S interface handle or NULL when error occurred
*/
const audio_codec_data_if_t *bsp_audio_get_codec_itf(void);

Expand Down Expand Up @@ -436,7 +436,7 @@ esp_err_t bsp_sdcard_unmount(void);
* This function initializes SPI, display controller and starts LVGL handling task.
* LCD backlight must be enabled separately by calling bsp_display_brightness_set()
*
* @return Pointer to LVGL display or NULL when error occured
* @return Pointer to LVGL display or NULL when error occurred
*/
lv_disp_t *bsp_display_start(void);

Expand All @@ -448,7 +448,7 @@ lv_disp_t *bsp_display_start(void);
*
* @param cfg display configuration
*
* @return Pointer to LVGL display or NULL when error occured
* @return Pointer to LVGL display or NULL when error occurred
*/
lv_disp_t *bsp_display_start_with_config(const bsp_display_cfg_t *cfg);

Expand Down
Loading

0 comments on commit de8a267

Please sign in to comment.