From bed7b36dc17b6f12a8e078a48f3a332cc71cd709 Mon Sep 17 00:00:00 2001 From: CYFS <2805686936@qq.com> Date: Wed, 17 Sep 2025 17:04:57 +0800 Subject: [PATCH] add AD\DA and Flash device --- bsp/renesas/ra2a1-ek/board/Kconfig | 22 +++++++++++++++ bsp/renesas/ra2a1-ek/board/ports/fal_cfg.h | 32 ++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 bsp/renesas/ra2a1-ek/board/ports/fal_cfg.h diff --git a/bsp/renesas/ra2a1-ek/board/Kconfig b/bsp/renesas/ra2a1-ek/board/Kconfig index 7ef62b3e5e1..4dbf9ab376e 100644 --- a/bsp/renesas/ra2a1-ek/board/Kconfig +++ b/bsp/renesas/ra2a1-ek/board/Kconfig @@ -219,6 +219,7 @@ menu "Hardware Drivers Config" menuconfig BSP_USING_HW_I2C bool "Enable hardware I2C BUS" default n + select RT_USING_I2C if BSP_USING_HW_I2C config BSP_USING_HW_I2C0 bool "Enable Hardware I2C0 BUS" @@ -274,6 +275,27 @@ menu "Hardware Drivers Config" bool "Enable SPI1 BUS" default n 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 + 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 + endif + endmenu menu "Board extended module Drivers" diff --git a/bsp/renesas/ra2a1-ek/board/ports/fal_cfg.h b/bsp/renesas/ra2a1-ek/board/ports/fal_cfg.h new file mode 100644 index 00000000000..82c4113f87c --- /dev/null +++ b/bsp/renesas/ra2a1-ek/board/ports/fal_cfg.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2006-2024, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2022-07-20 Sherman the first version + */ +#ifndef _FAL_CFG_H_ +#define _FAL_CFG_H_ + +#include "hal_data.h" + +extern const struct fal_flash_dev _onchip_flash_lp; +#define FLASH_START_ADDRESS 0x00000000 +/* flash device table */ +#define FAL_FLASH_DEV_TABLE \ +{ \ + &_onchip_flash_lp, \ +} +/* ====================== Partition Configuration ========================== */ +#ifdef FAL_PART_HAS_TABLE_CFG +/** partition table, The chip flash partition is defined in "\ra\fsp\src\bsp\mcu\ra6m4\bsp_feature.h". + * More details can be found in the RA6M4 Group User Manual: Hardware section 47 Flash memory.*/ +#define FAL_PART_TABLE \ +{ \ + {FAL_PART_MAGIC_WROD, "app", "onchip_flash_lp", 128*1024, 128*1024, 0}, \ +} +#endif /* FAL_PART_HAS_TABLE_CFG */ +#endif /* _FAL_CFG_H_ */ +