@@ -0,0 +1,12 @@
|
||||
# Board information output
|
||||
message(STATUS "Selected Board: echoear_core_board_v1_2")
|
||||
message(STATUS "Board Path: E:/Codex/story/platform/firmware/echoear-platform-agent/managed_components/espressif__esp_board_manager/boards/echoear_core_board_v1_2")
|
||||
|
||||
idf_component_register(
|
||||
SRC_DIRS "." "../../managed_components/espressif__esp_board_manager/boards/echoear_core_board_v1_2"
|
||||
INCLUDE_DIRS "." "../../managed_components/espressif__esp_board_manager/boards/echoear_core_board_v1_2"
|
||||
REQUIRES esp_board_manager
|
||||
)
|
||||
|
||||
# This is equivalent to adding WHOLE_ARCHIVE option to the idf_component_register call above:
|
||||
idf_component_set_property(${COMPONENT_NAME} WHOLE_ARCHIVE TRUE)
|
||||
@@ -0,0 +1,299 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO., LTD
|
||||
* SPDX-License-Identifier: LicenseRef-Espressif-Modified-MIT
|
||||
*
|
||||
* Auto-generated device configuration file
|
||||
* DO NOT MODIFY THIS FILE MANUALLY
|
||||
*
|
||||
* See LICENSE file for details.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "esp_board_device.h"
|
||||
#include "dev_audio_codec.h"
|
||||
#include "dev_display_lcd_spi.h"
|
||||
#include "dev_fatfs_sdcard.h"
|
||||
#include "dev_gpio_ctrl.h"
|
||||
#include "dev_lcd_touch_i2c.h"
|
||||
#include "dev_ledc_ctrl.h"
|
||||
#include "driver/sdmmc_host.h"
|
||||
#include "driver/sdmmc_types.h"
|
||||
|
||||
// Device configuration structures
|
||||
const static dev_gpio_ctrl_config_t esp_bmgr_audio_power_cfg = {
|
||||
.name = "audio_power",
|
||||
.type = "gpio_ctrl",
|
||||
.gpio_name = "gpio_power_audio",
|
||||
.active_level = 1,
|
||||
.default_level = 0,
|
||||
};
|
||||
|
||||
const static dev_gpio_ctrl_config_t esp_bmgr_lcd_power_cfg = {
|
||||
.name = "lcd_power",
|
||||
.type = "gpio_ctrl",
|
||||
.gpio_name = "gpio_power_lcd",
|
||||
.active_level = 0,
|
||||
.default_level = 1,
|
||||
};
|
||||
|
||||
const static dev_audio_codec_config_t esp_bmgr_audio_dac_cfg = {
|
||||
.name = "audio_dac",
|
||||
.chip = "es8311",
|
||||
.type = "audio_codec",
|
||||
.adc_enabled = false,
|
||||
.adc_max_channel = 0,
|
||||
.adc_channel_mask = 0x3,
|
||||
.adc_channel_labels = "",
|
||||
.adc_init_gain = 0,
|
||||
.dac_enabled = true,
|
||||
.dac_max_channel = 1,
|
||||
.dac_channel_mask = 0x1,
|
||||
.dac_init_gain = 0,
|
||||
.pa_cfg = {
|
||||
.name = "gpio_pa_control",
|
||||
.port = 15,
|
||||
.active_level = 1,
|
||||
.gain = 6.0,
|
||||
},
|
||||
.i2c_cfg = {
|
||||
.name = "i2c_master",
|
||||
.port = 0,
|
||||
.address = 48,
|
||||
.frequency = 400000,
|
||||
},
|
||||
.i2s_cfg = {
|
||||
.name = "i2s_audio_out",
|
||||
.port = 0,
|
||||
},
|
||||
.metadata = NULL,
|
||||
.metadata_size = 0,
|
||||
.mclk_enabled = true,
|
||||
.aec_enabled = false,
|
||||
.eq_enabled = false,
|
||||
.alc_enabled = false,
|
||||
};
|
||||
|
||||
const static dev_audio_codec_config_t esp_bmgr_audio_adc_cfg = {
|
||||
.name = "audio_adc",
|
||||
.chip = "es7210",
|
||||
.type = "audio_codec",
|
||||
.adc_enabled = true,
|
||||
.adc_max_channel = 4,
|
||||
.adc_channel_mask = 0x7,
|
||||
.adc_channel_labels = "NA,RE,FR,FL",
|
||||
.adc_init_gain = 0,
|
||||
.dac_enabled = false,
|
||||
.dac_max_channel = 0,
|
||||
.dac_channel_mask = 0x0,
|
||||
.dac_init_gain = 0,
|
||||
.pa_cfg = {
|
||||
.name = "none",
|
||||
.port = -1,
|
||||
.active_level = 0,
|
||||
.gain = 0.0,
|
||||
},
|
||||
.i2c_cfg = {
|
||||
.name = "i2c_master",
|
||||
.port = 0,
|
||||
.address = 128,
|
||||
.frequency = 400000,
|
||||
},
|
||||
.i2s_cfg = {
|
||||
.name = "i2s_audio_in",
|
||||
.port = 0,
|
||||
},
|
||||
.metadata = NULL,
|
||||
.metadata_size = 0,
|
||||
.mclk_enabled = false,
|
||||
.aec_enabled = false,
|
||||
.eq_enabled = false,
|
||||
.alc_enabled = false,
|
||||
};
|
||||
|
||||
const static dev_fatfs_sdcard_config_t esp_bmgr_fs_sdcard_cfg = {
|
||||
.name = "fs_sdcard",
|
||||
.mount_point = "/sdcard",
|
||||
.vfs_config = {
|
||||
.format_if_mount_failed = true,
|
||||
.max_files = 5,
|
||||
.allocation_unit_size = 16384,
|
||||
},
|
||||
.frequency = SDMMC_FREQ_HIGHSPEED,
|
||||
.slot = SDMMC_HOST_SLOT_1,
|
||||
.bus_width = 1,
|
||||
.slot_flags = SDMMC_SLOT_FLAG_INTERNAL_PULLUP,
|
||||
.pins = {
|
||||
.clk = 16,
|
||||
.cmd = 38,
|
||||
.d0 = 17,
|
||||
.d1 = -1,
|
||||
.d2 = -1,
|
||||
.d3 = -1,
|
||||
.d4 = -1,
|
||||
.d5 = -1,
|
||||
.d6 = -1,
|
||||
.d7 = -1,
|
||||
.cd = -1,
|
||||
.wp = -1,
|
||||
},
|
||||
.ldo_chan_id = -1,
|
||||
};
|
||||
|
||||
const static dev_display_lcd_spi_config_t esp_bmgr_display_lcd_cfg = {
|
||||
.name = "display_lcd",
|
||||
.chip = "st77916",
|
||||
.type = "display_lcd_spi",
|
||||
.spi_name = "spi_display",
|
||||
.io_spi_config = {
|
||||
.cs_gpio_num = 14,
|
||||
.dc_gpio_num = 45,
|
||||
.spi_mode = 0,
|
||||
.pclk_hz = 20000000,
|
||||
.trans_queue_depth = 1,
|
||||
.on_color_trans_done = NULL,
|
||||
.user_ctx = NULL,
|
||||
.lcd_cmd_bits = 32,
|
||||
.lcd_param_bits = 8,
|
||||
.cs_ena_pretrans = 0,
|
||||
.cs_ena_posttrans = 0,
|
||||
.flags = {
|
||||
.dc_high_on_cmd = false,
|
||||
.dc_low_on_data = false,
|
||||
.dc_low_on_param = false,
|
||||
.octal_mode = false,
|
||||
.quad_mode = true,
|
||||
.sio_mode = false,
|
||||
.lsb_first = false,
|
||||
.cs_high_active = false,
|
||||
},
|
||||
},
|
||||
.panel_config = {
|
||||
.reset_gpio_num = 47,
|
||||
.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_RGB,
|
||||
.data_endian = LCD_RGB_DATA_ENDIAN_BIG,
|
||||
.bits_per_pixel = 16,
|
||||
.flags = {
|
||||
.reset_active_high = true,
|
||||
},
|
||||
.vendor_config = NULL,
|
||||
},
|
||||
.swap_xy = false,
|
||||
.mirror_x = false,
|
||||
.mirror_y = false,
|
||||
.x_max = 360,
|
||||
.y_max = 360,
|
||||
};
|
||||
|
||||
const static dev_lcd_touch_i2c_config_t esp_bmgr_lcd_touch_cfg = {
|
||||
.name = "lcd_touch",
|
||||
.chip = "cst816s",
|
||||
.type = "lcd_touch_i2c",
|
||||
.i2c_name = "i2c_master",
|
||||
.i2c_addr = {0x15, 0x00},
|
||||
.io_i2c_config = {
|
||||
.dev_addr = 21,
|
||||
.control_phase_bytes = 1,
|
||||
.dc_bit_offset = 0,
|
||||
.lcd_cmd_bits = 8,
|
||||
.lcd_param_bits = 0,
|
||||
.scl_speed_hz = 100000,
|
||||
.flags = {
|
||||
.dc_low_on_data = false,
|
||||
.disable_control_phase = true,
|
||||
},
|
||||
},
|
||||
.touch_config = {
|
||||
.x_max = 360,
|
||||
.y_max = 360,
|
||||
.rst_gpio_num = -1,
|
||||
.int_gpio_num = 10,
|
||||
.levels = {
|
||||
.reset = 0,
|
||||
.interrupt = 0,
|
||||
},
|
||||
.flags = {
|
||||
.swap_xy = false,
|
||||
.mirror_x = false,
|
||||
.mirror_y = false,
|
||||
},
|
||||
.process_coordinates = NULL,
|
||||
.interrupt_callback = NULL,
|
||||
.user_data = NULL,
|
||||
.driver_data = NULL,
|
||||
},
|
||||
};
|
||||
|
||||
const static dev_ledc_ctrl_config_t esp_bmgr_lcd_brightness_cfg = {
|
||||
.name = "lcd_brightness",
|
||||
.type = "ledc_ctrl",
|
||||
.ledc_name = "ledc_backlight",
|
||||
.default_percent = 100,
|
||||
};
|
||||
|
||||
// Device descriptor array
|
||||
const esp_board_device_desc_t g_esp_board_devices[] = {
|
||||
{
|
||||
.next = &g_esp_board_devices[1],
|
||||
.name = "audio_power",
|
||||
.type = "gpio_ctrl",
|
||||
.cfg = &esp_bmgr_audio_power_cfg,
|
||||
.cfg_size = sizeof(esp_bmgr_audio_power_cfg),
|
||||
.init_skip = false,
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_devices[2],
|
||||
.name = "lcd_power",
|
||||
.type = "gpio_ctrl",
|
||||
.cfg = &esp_bmgr_lcd_power_cfg,
|
||||
.cfg_size = sizeof(esp_bmgr_lcd_power_cfg),
|
||||
.init_skip = false,
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_devices[3],
|
||||
.name = "audio_dac",
|
||||
.type = "audio_codec",
|
||||
.cfg = &esp_bmgr_audio_dac_cfg,
|
||||
.cfg_size = sizeof(esp_bmgr_audio_dac_cfg),
|
||||
.init_skip = false,
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_devices[4],
|
||||
.name = "audio_adc",
|
||||
.type = "audio_codec",
|
||||
.cfg = &esp_bmgr_audio_adc_cfg,
|
||||
.cfg_size = sizeof(esp_bmgr_audio_adc_cfg),
|
||||
.init_skip = false,
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_devices[5],
|
||||
.name = "fs_sdcard",
|
||||
.type = "fatfs_sdcard",
|
||||
.cfg = &esp_bmgr_fs_sdcard_cfg,
|
||||
.cfg_size = sizeof(esp_bmgr_fs_sdcard_cfg),
|
||||
.init_skip = false,
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_devices[6],
|
||||
.name = "display_lcd",
|
||||
.type = "display_lcd_spi",
|
||||
.cfg = &esp_bmgr_display_lcd_cfg,
|
||||
.cfg_size = sizeof(esp_bmgr_display_lcd_cfg),
|
||||
.init_skip = false,
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_devices[7],
|
||||
.name = "lcd_touch",
|
||||
.type = "lcd_touch_i2c",
|
||||
.cfg = &esp_bmgr_lcd_touch_cfg,
|
||||
.cfg_size = sizeof(esp_bmgr_lcd_touch_cfg),
|
||||
.init_skip = false,
|
||||
},
|
||||
{
|
||||
.next = NULL,
|
||||
.name = "lcd_brightness",
|
||||
.type = "ledc_ctrl",
|
||||
.cfg = &esp_bmgr_lcd_brightness_cfg,
|
||||
.cfg_size = sizeof(esp_bmgr_lcd_brightness_cfg),
|
||||
.init_skip = false,
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO., LTD
|
||||
* SPDX-License-Identifier: LicenseRef-Espressif-Modified-MIT
|
||||
*
|
||||
* Auto-generated custom device structure definitions
|
||||
* DO NOT MODIFY THIS FILE MANUALLY
|
||||
*
|
||||
* See LICENSE file for details.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// No custom device structures defined
|
||||
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO., LTD
|
||||
* SPDX-License-Identifier: LicenseRef-Espressif-Modified-MIT
|
||||
*
|
||||
* Auto-generated device handle definition file
|
||||
* DO NOT MODIFY THIS FILE MANUALLY
|
||||
*
|
||||
* See LICENSE file for details.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include "esp_board_device.h"
|
||||
#include "dev_audio_codec.h"
|
||||
#include "dev_display_lcd_spi.h"
|
||||
#include "dev_fatfs_sdcard.h"
|
||||
#include "dev_gpio_ctrl.h"
|
||||
#include "dev_lcd_touch_i2c.h"
|
||||
#include "dev_ledc_ctrl.h"
|
||||
|
||||
// Device handle array
|
||||
esp_board_device_handle_t g_esp_board_device_handles[] = {
|
||||
{
|
||||
.next = &g_esp_board_device_handles[1],
|
||||
.name = "audio_power",
|
||||
.type = "gpio_ctrl",
|
||||
.device_handle = NULL,
|
||||
.init = dev_gpio_ctrl_init,
|
||||
.deinit = dev_gpio_ctrl_deinit
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_device_handles[2],
|
||||
.name = "lcd_power",
|
||||
.type = "gpio_ctrl",
|
||||
.device_handle = NULL,
|
||||
.init = dev_gpio_ctrl_init,
|
||||
.deinit = dev_gpio_ctrl_deinit
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_device_handles[3],
|
||||
.name = "audio_dac",
|
||||
.type = "audio_codec",
|
||||
.device_handle = NULL,
|
||||
.init = dev_audio_codec_init,
|
||||
.deinit = dev_audio_codec_deinit
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_device_handles[4],
|
||||
.name = "audio_adc",
|
||||
.type = "audio_codec",
|
||||
.device_handle = NULL,
|
||||
.init = dev_audio_codec_init,
|
||||
.deinit = dev_audio_codec_deinit
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_device_handles[5],
|
||||
.name = "fs_sdcard",
|
||||
.type = "fatfs_sdcard",
|
||||
.device_handle = NULL,
|
||||
.init = dev_fatfs_sdcard_init,
|
||||
.deinit = dev_fatfs_sdcard_deinit
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_device_handles[6],
|
||||
.name = "display_lcd",
|
||||
.type = "display_lcd_spi",
|
||||
.device_handle = NULL,
|
||||
.init = dev_display_lcd_spi_init,
|
||||
.deinit = dev_display_lcd_spi_deinit
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_device_handles[7],
|
||||
.name = "lcd_touch",
|
||||
.type = "lcd_touch_i2c",
|
||||
.device_handle = NULL,
|
||||
.init = dev_lcd_touch_i2c_init,
|
||||
.deinit = dev_lcd_touch_i2c_deinit
|
||||
},
|
||||
{
|
||||
.next = NULL,
|
||||
.name = "lcd_brightness",
|
||||
.type = "ledc_ctrl",
|
||||
.device_handle = NULL,
|
||||
.init = dev_ledc_ctrl_init,
|
||||
.deinit = dev_ledc_ctrl_deinit
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO., LTD
|
||||
* SPDX-License-Identifier: LicenseRef-Espressif-Modified-MIT
|
||||
*
|
||||
* Auto-generated board information file
|
||||
* DO NOT MODIFY THIS FILE MANUALLY
|
||||
*
|
||||
* See LICENSE file for details.
|
||||
*/
|
||||
|
||||
#include "esp_board_manager.h"
|
||||
|
||||
// Board information
|
||||
const esp_board_info_t g_esp_board_info = {
|
||||
.name = "echoear_core_board_v1_2",
|
||||
.chip = "esp32s3",
|
||||
.version = "1.2.0",
|
||||
.description = "EchoEar Core Board V1.2- AI Pet Companion Development Board",
|
||||
.manufacturer = "ESPRESSIF",
|
||||
};
|
||||
@@ -0,0 +1,266 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO., LTD
|
||||
* SPDX-License-Identifier: LicenseRef-Espressif-Modified-MIT
|
||||
*
|
||||
* Auto-generated peripheral configuration file
|
||||
* DO NOT MODIFY THIS FILE MANUALLY
|
||||
*
|
||||
* See LICENSE file for details.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "esp_board_periph.h"
|
||||
#include "driver/i2c_master.h"
|
||||
#include "driver/i2c_types.h"
|
||||
#include "hal/gpio_types.h"
|
||||
#include "periph_gpio.h"
|
||||
#include "periph_i2s.h"
|
||||
#include "periph_ledc.h"
|
||||
#include "periph_spi.h"
|
||||
|
||||
// Peripheral configuration structures
|
||||
const static i2c_master_bus_config_t esp_bmgr_i2c_master_cfg = {
|
||||
.i2c_port = I2C_NUM_0,
|
||||
.sda_io_num = 2,
|
||||
.scl_io_num = 1,
|
||||
.clk_source = I2C_CLK_SRC_DEFAULT,
|
||||
.glitch_ignore_cnt = 7,
|
||||
.intr_priority = 1,
|
||||
.trans_queue_depth = 0,
|
||||
.flags = {
|
||||
.enable_internal_pullup = true,
|
||||
},
|
||||
};
|
||||
|
||||
const static periph_i2s_config_t esp_bmgr_i2s_audio_out_cfg = {
|
||||
.port = I2S_NUM_0,
|
||||
.role = I2S_ROLE_MASTER,
|
||||
.mode = I2S_COMM_MODE_STD,
|
||||
.direction = I2S_DIR_TX,
|
||||
.i2s_cfg = {
|
||||
.std = {
|
||||
.clk_cfg = {
|
||||
.sample_rate_hz = 48000,
|
||||
.clk_src = I2S_CLK_SRC_DEFAULT,
|
||||
.ext_clk_freq_hz = 0,
|
||||
.mclk_multiple = I2S_MCLK_MULTIPLE_256,
|
||||
},
|
||||
.slot_cfg = {
|
||||
.data_bit_width = I2S_DATA_BIT_WIDTH_16BIT,
|
||||
.slot_bit_width = I2S_SLOT_BIT_WIDTH_AUTO,
|
||||
.slot_mode = I2S_SLOT_MODE_STEREO,
|
||||
.slot_mask = I2S_STD_SLOT_BOTH,
|
||||
.ws_width = 16,
|
||||
.ws_pol = false,
|
||||
.bit_shift = true,
|
||||
.left_align = true,
|
||||
.big_endian = false,
|
||||
.bit_order_lsb = false,
|
||||
},
|
||||
.gpio_cfg = {
|
||||
.mclk = 42,
|
||||
.bclk = 40,
|
||||
.ws = 39,
|
||||
.dout = 41,
|
||||
.din = 3,
|
||||
.invert_flags = {
|
||||
.mclk_inv = false,
|
||||
.bclk_inv = false,
|
||||
.ws_inv = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const static periph_i2s_config_t esp_bmgr_i2s_audio_in_cfg = {
|
||||
.port = I2S_NUM_0,
|
||||
.role = I2S_ROLE_MASTER,
|
||||
.mode = I2S_COMM_MODE_STD,
|
||||
.direction = I2S_DIR_RX,
|
||||
.i2s_cfg = {
|
||||
.std = {
|
||||
.clk_cfg = {
|
||||
.sample_rate_hz = 48000,
|
||||
.clk_src = I2S_CLK_SRC_DEFAULT,
|
||||
.ext_clk_freq_hz = 0,
|
||||
.mclk_multiple = I2S_MCLK_MULTIPLE_256,
|
||||
},
|
||||
.slot_cfg = {
|
||||
.data_bit_width = I2S_DATA_BIT_WIDTH_16BIT,
|
||||
.slot_bit_width = I2S_SLOT_BIT_WIDTH_AUTO,
|
||||
.slot_mode = I2S_SLOT_MODE_STEREO,
|
||||
.slot_mask = I2S_STD_SLOT_BOTH,
|
||||
.ws_width = 16,
|
||||
.ws_pol = false,
|
||||
.bit_shift = true,
|
||||
.left_align = true,
|
||||
.big_endian = false,
|
||||
.bit_order_lsb = false,
|
||||
},
|
||||
.gpio_cfg = {
|
||||
.mclk = 42,
|
||||
.bclk = 40,
|
||||
.ws = 39,
|
||||
.dout = 41,
|
||||
.din = 3,
|
||||
.invert_flags = {
|
||||
.mclk_inv = false,
|
||||
.bclk_inv = false,
|
||||
.ws_inv = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static periph_spi_config_t esp_bmgr_spi_display_cfg = {
|
||||
.spi_port = SPI2_HOST,
|
||||
.spi_bus_config = {
|
||||
.mosi_io_num = 46,
|
||||
.miso_io_num = 13,
|
||||
.sclk_io_num = 18,
|
||||
.quadwp_io_num = 11,
|
||||
.quadhd_io_num = 12,
|
||||
.data4_io_num = -1,
|
||||
.data5_io_num = -1,
|
||||
.data6_io_num = -1,
|
||||
.data7_io_num = -1,
|
||||
.data_io_default_level = false,
|
||||
.max_transfer_sz = 72000,
|
||||
.flags = 0,
|
||||
.isr_cpu_id = ESP_INTR_CPU_AFFINITY_AUTO,
|
||||
.intr_flags = 0,
|
||||
},
|
||||
};
|
||||
|
||||
const static periph_ledc_config_t esp_bmgr_ledc_backlight_cfg = {
|
||||
.handle = {
|
||||
.channel = LEDC_CHANNEL_0,
|
||||
.speed_mode = LEDC_LOW_SPEED_MODE,
|
||||
},
|
||||
.gpio_num = 44,
|
||||
.duty = 2048,
|
||||
.freq_hz = 2000,
|
||||
.duty_resolution = LEDC_TIMER_10_BIT,
|
||||
.timer_sel = LEDC_TIMER_0,
|
||||
.sleep_mode = LEDC_SLEEP_MODE_NO_ALIVE_NO_PD,
|
||||
.output_invert = false,
|
||||
};
|
||||
|
||||
const static periph_gpio_config_t esp_bmgr_gpio_power_lcd_cfg = {
|
||||
.gpio_config = {
|
||||
.pin_bit_mask = BIT64(9),
|
||||
.mode = GPIO_MODE_OUTPUT,
|
||||
.pull_up_en = GPIO_PULLUP_DISABLE,
|
||||
.pull_down_en = GPIO_PULLDOWN_DISABLE,
|
||||
.intr_type = GPIO_INTR_DISABLE,
|
||||
},
|
||||
.default_level = 0,
|
||||
};
|
||||
|
||||
const static periph_gpio_config_t esp_bmgr_gpio_power_audio_cfg = {
|
||||
.gpio_config = {
|
||||
.pin_bit_mask = BIT64(48),
|
||||
.mode = GPIO_MODE_OUTPUT,
|
||||
.pull_up_en = GPIO_PULLUP_DISABLE,
|
||||
.pull_down_en = GPIO_PULLDOWN_DISABLE,
|
||||
.intr_type = GPIO_INTR_DISABLE,
|
||||
},
|
||||
.default_level = 1,
|
||||
};
|
||||
|
||||
const static periph_gpio_config_t esp_bmgr_gpio_pa_control_cfg = {
|
||||
.gpio_config = {
|
||||
.pin_bit_mask = BIT64(15),
|
||||
.mode = GPIO_MODE_OUTPUT,
|
||||
.pull_up_en = GPIO_PULLUP_DISABLE,
|
||||
.pull_down_en = GPIO_PULLDOWN_DISABLE,
|
||||
.intr_type = GPIO_INTR_DISABLE,
|
||||
},
|
||||
.default_level = 0,
|
||||
};
|
||||
|
||||
// Peripheral descriptor array
|
||||
const esp_board_periph_desc_t g_esp_board_peripherals[] = {
|
||||
{
|
||||
.next = &g_esp_board_peripherals[1],
|
||||
.name = "i2c_master",
|
||||
.type = "i2c",
|
||||
.format = NULL,
|
||||
.role = "master",
|
||||
.cfg = &esp_bmgr_i2c_master_cfg,
|
||||
.cfg_size = sizeof(esp_bmgr_i2c_master_cfg),
|
||||
.id = 0,
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_peripherals[2],
|
||||
.name = "i2s_audio_out",
|
||||
.type = "i2s",
|
||||
.format = "std-out",
|
||||
.role = "master",
|
||||
.cfg = &esp_bmgr_i2s_audio_out_cfg,
|
||||
.cfg_size = sizeof(esp_bmgr_i2s_audio_out_cfg),
|
||||
.id = 0,
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_peripherals[3],
|
||||
.name = "i2s_audio_in",
|
||||
.type = "i2s",
|
||||
.format = "std-in",
|
||||
.role = "slave",
|
||||
.cfg = &esp_bmgr_i2s_audio_in_cfg,
|
||||
.cfg_size = sizeof(esp_bmgr_i2s_audio_in_cfg),
|
||||
.id = 0,
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_peripherals[4],
|
||||
.name = "spi_display",
|
||||
.type = "spi",
|
||||
.format = NULL,
|
||||
.role = "master",
|
||||
.cfg = &esp_bmgr_spi_display_cfg,
|
||||
.cfg_size = sizeof(esp_bmgr_spi_display_cfg),
|
||||
.id = 0,
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_peripherals[5],
|
||||
.name = "ledc_backlight",
|
||||
.type = "ledc",
|
||||
.format = NULL,
|
||||
.role = "none",
|
||||
.cfg = &esp_bmgr_ledc_backlight_cfg,
|
||||
.cfg_size = sizeof(esp_bmgr_ledc_backlight_cfg),
|
||||
.id = 0,
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_peripherals[6],
|
||||
.name = "gpio_power_lcd",
|
||||
.type = "gpio",
|
||||
.format = NULL,
|
||||
.role = "none",
|
||||
.cfg = &esp_bmgr_gpio_power_lcd_cfg,
|
||||
.cfg_size = sizeof(esp_bmgr_gpio_power_lcd_cfg),
|
||||
.id = 0,
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_peripherals[7],
|
||||
.name = "gpio_power_audio",
|
||||
.type = "gpio",
|
||||
.format = NULL,
|
||||
.role = "none",
|
||||
.cfg = &esp_bmgr_gpio_power_audio_cfg,
|
||||
.cfg_size = sizeof(esp_bmgr_gpio_power_audio_cfg),
|
||||
.id = 0,
|
||||
},
|
||||
{
|
||||
.next = NULL,
|
||||
.name = "gpio_pa_control",
|
||||
.type = "gpio",
|
||||
.format = NULL,
|
||||
.role = "none",
|
||||
.cfg = &esp_bmgr_gpio_pa_control_cfg,
|
||||
.cfg_size = sizeof(esp_bmgr_gpio_pa_control_cfg),
|
||||
.id = 0,
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO., LTD
|
||||
* SPDX-License-Identifier: LicenseRef-Espressif-Modified-MIT
|
||||
*
|
||||
* Auto-generated peripheral handle definition file
|
||||
* DO NOT MODIFY THIS FILE MANUALLY
|
||||
*
|
||||
* See LICENSE file for details.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include "esp_board_periph.h"
|
||||
#include "periph_gpio.h"
|
||||
#include "periph_i2c.h"
|
||||
#include "periph_i2s.h"
|
||||
#include "periph_i2s.h"
|
||||
#include "periph_ledc.h"
|
||||
#include "periph_spi.h"
|
||||
|
||||
// Peripheral handle array
|
||||
esp_board_periph_entry_t g_esp_board_periph_handles[] = {
|
||||
{
|
||||
.next = &g_esp_board_periph_handles[1],
|
||||
.type = "gpio",
|
||||
.role = "none",
|
||||
.init = periph_gpio_init,
|
||||
.deinit = periph_gpio_deinit
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_periph_handles[2],
|
||||
.type = "i2c",
|
||||
.role = "master",
|
||||
.init = periph_i2c_init,
|
||||
.deinit = periph_i2c_deinit
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_periph_handles[3],
|
||||
.type = "i2s",
|
||||
.role = "master",
|
||||
.init = periph_i2s_init,
|
||||
.deinit = periph_i2s_deinit
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_periph_handles[4],
|
||||
.type = "i2s",
|
||||
.role = "slave",
|
||||
.init = periph_i2s_init,
|
||||
.deinit = periph_i2s_deinit
|
||||
},
|
||||
{
|
||||
.next = &g_esp_board_periph_handles[5],
|
||||
.type = "ledc",
|
||||
.role = "none",
|
||||
.init = periph_ledc_init,
|
||||
.deinit = periph_ledc_deinit
|
||||
},
|
||||
{
|
||||
.next = NULL,
|
||||
.type = "spi",
|
||||
.role = "master",
|
||||
.init = periph_spi_init,
|
||||
.deinit = periph_spi_deinit
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
dependencies:
|
||||
espressif/esp_lcd_st77916: '*'
|
||||
espressif/esp_lcd_touch_cst816s: '*'
|
||||
Reference in New Issue
Block a user