Просмотр исходного кода

[bsp][renesas][ek-ra2a1]add AD\DA and Flash device (#10704)

add AD\DA and Flash device
CYFS 3 месяцев назад
Родитель
Сommit
64a938174e
2 измененных файлов с 54 добавлено и 0 удалено
  1. 22 0
      bsp/renesas/ra2a1-ek/board/Kconfig
  2. 32 0
      bsp/renesas/ra2a1-ek/board/ports/fal_cfg.h

+ 22 - 0
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"

+ 32 - 0
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_ */
+