From af5bd68c58a536620ff1281559a404c21249ea1b Mon Sep 17 00:00:00 2001 From: ShaquilleLiu Date: Thu, 20 Jun 2024 21:42:11 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8E=E7=81=AB=E5=90=AF=E6=98=8E6m5?= =?UTF-8?q?=E9=A9=B1=E5=8A=A8=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/renesas/ebf_qi_min_6m5/README.md | 4 + bsp/renesas/ebf_qi_min_6m5/board/Kconfig | 120 +++++++++++++++++++- bsp/renesas/ebf_qi_min_6m5/template.uvprojx | 2 +- bsp/renesas/libraries/HAL_Drivers/drv_i2c.c | 3 + 4 files changed, 127 insertions(+), 2 deletions(-) diff --git a/bsp/renesas/ebf_qi_min_6m5/README.md b/bsp/renesas/ebf_qi_min_6m5/README.md index f0a1c7e044..87d3e8a6ae 100644 --- a/bsp/renesas/ebf_qi_min_6m5/README.md +++ b/bsp/renesas/ebf_qi_min_6m5/README.md @@ -34,6 +34,10 @@ | GPIO | 支持 | | | I2C | 支持 | | | SPI | 支持 | | +| DAC | 支持 | | +| ADC | 支持 | | +| PWM | 支持 | | +| SPI | 支持 | | | 持续更新中... | | | | **外接外设** | **支持情况** | **备注** | | 持续更新中... | | | diff --git a/bsp/renesas/ebf_qi_min_6m5/board/Kconfig b/bsp/renesas/ebf_qi_min_6m5/board/Kconfig index f6b0d6a398..dc5cc7e801 100644 --- a/bsp/renesas/ebf_qi_min_6m5/board/Kconfig +++ b/bsp/renesas/ebf_qi_min_6m5/board/Kconfig @@ -21,11 +21,38 @@ menu "Hardware Drivers Config" select RT_USING_SERIAL select RT_USING_SERIAL_V2 if BSP_USING_UART + menuconfig BSP_USING_UART2 + bool "Enable UART2" + default n + if BSP_USING_UART2 + config BSP_UART2_RX_USING_DMA + bool "Enable UART2 RX DMA" + depends on BSP_USING_UART2 && RT_SERIAL_USING_DMA + default n + + config BSP_UART2_TX_USING_DMA + bool "Enable UART2 TX DMA" + depends on BSP_USING_UART2 && RT_SERIAL_USING_DMA + default n + + config BSP_UART2_RX_BUFSIZE + int "Set UART2 RX buffer size" + range 64 65535 + depends on RT_USING_SERIAL_V2 + default 256 + + config BSP_UART2_TX_BUFSIZE + int "Set UART2 TX buffer size" + range 0 65535 + depends on RT_USING_SERIAL_V2 + default 0 + endif + menuconfig BSP_USING_UART4 bool "Enable UART4" default n if BSP_USING_UART4 - config BSP_UART0_RX_USING_DMA + config BSP_UART4_RX_USING_DMA bool "Enable UART4 RX DMA" depends on BSP_USING_UART4 && RT_SERIAL_USING_DMA default n @@ -51,11 +78,15 @@ menu "Hardware Drivers Config" menuconfig BSP_USING_HW_I2C bool "Enable hardware I2C BUS" + select RT_USING_I2C default n if BSP_USING_HW_I2C config BSP_USING_HW_I2C1 bool "Enable Hardware I2C1 BUS" default n + config BSP_USING_HW_I2C2 + bool "Enable Hardware I2C2 BUS" + default n endif menuconfig BSP_USING_SOFT_I2C @@ -430,6 +461,93 @@ menu "Hardware Drivers Config" endif endif + menuconfig BSP_USING_ADC + bool "Enable ADC" + default n + select RT_USING_ADC + if BSP_USING_ADC + config BSP_USING_ADC0 + bool "Enable ADC0" + default n + + config BSP_USING_ADC1 + bool "Enable ADC1" + default n + endif + + menuconfig BSP_USING_DAC + bool "Enable DAC" + default n + select RT_USING_DAC + if BSP_USING_DAC + config BSP_USING_DAC0 + bool "Enable DAC0" + default n + + config BSP_USING_DAC1 + bool "Enable DAC1" + default n + endif + + menuconfig BSP_USING_PWM + bool "Enable PWM" + default n + select RT_USING_PWM + if BSP_USING_PWM + config BSP_USING_PWM0 + bool "Enable GPT0 (32-Bits) output PWM" + default n + + config BSP_USING_PWM1 + bool "Enable GPT1 (32-Bits) output PWM" + default n + + config BSP_USING_PWM2 + bool "Enable GPT2 (32-Bits) output PWM" + default n + + config BSP_USING_PWM3 + bool "Enable GPT3 (32-Bits) output PWM" + default n + + config BSP_USING_PWM4 + bool "Enable GPT4 (16-Bits) output PWM" + default n + + config BSP_USING_PWM5 + bool "Enable GPT5 (16-Bits) output PWM" + default n + + config BSP_USING_PWM6 + bool "Enable GPT6 (16-Bits) output PWM" + default n + + config BSP_USING_PWM7 + bool "Enable GPT7 (16-Bits) output PWM" + default n + + config BSP_USING_PWM8 + bool "Enable GPT8 (16-Bits) output PWM" + default n + + config BSP_USING_PWM9 + bool "Enable GPT9 (16-Bits) output PWM" + default n + endif + + menuconfig BSP_USING_SPI + bool "Enable SPI BUS" + default n + select RT_USING_SPI + if BSP_USING_SPI + config BSP_USING_SPI0 + bool "Enable SPI0 BUS" + default n + config BSP_USING_SPI1 + bool "Enable SPI1 BUS" + default n + endif + endmenu menu "Board extended module Drivers" diff --git a/bsp/renesas/ebf_qi_min_6m5/template.uvprojx b/bsp/renesas/ebf_qi_min_6m5/template.uvprojx index d17e01fd09..b67c286e2b 100644 --- a/bsp/renesas/ebf_qi_min_6m5/template.uvprojx +++ b/bsp/renesas/ebf_qi_min_6m5/template.uvprojx @@ -335,7 +335,7 @@ 0 0 - -Wno-license-management -Wunused -Wuninitialized -Wall -Wextra -Wmissing-declarations -Wconversion -Wpointer-arith -Wshadow -Waggregate-return -Wfloat-equal + -Wno-license-management -Wunused -Wuninitialized -Wall -Wmissing-declarations -Wpointer-arith -Waggregate-return -Wfloat-equal diff --git a/bsp/renesas/libraries/HAL_Drivers/drv_i2c.c b/bsp/renesas/libraries/HAL_Drivers/drv_i2c.c index 8a79b675dd..7b452108b8 100644 --- a/bsp/renesas/libraries/HAL_Drivers/drv_i2c.c +++ b/bsp/renesas/libraries/HAL_Drivers/drv_i2c.c @@ -45,6 +45,9 @@ static struct ra_i2c_handle ra_i2cs[] = #ifdef BSP_USING_HW_I2C1 {.bus_name = "i2c1", .i2c_cfg = &g_i2c_master1_cfg, .i2c_ctrl = &g_i2c_master1_ctrl,}, #endif +#ifdef BSP_USING_HW_I2C2 + {.bus_name = "i2c2", .i2c_cfg = &g_i2c_master2_cfg, .i2c_ctrl = &g_i2c_master2_ctrl,}, +#endif }; void i2c_master_callback(i2c_master_callback_args_t *p_args)