1
0
Эх сурвалжийг харах

[bsp][ch32v307]修复了模拟iic的BUG (#6505)

hg0720 2 жил өмнө
parent
commit
90d566308d

+ 2 - 2
bsp/wch/risc-v/Libraries/ch32_drivers/SConscript

@@ -15,10 +15,10 @@ if  GetDepend('SOC_RISCV_FAMILY_CH32'):
     if GetDepend('BSP_USING_ADC'):
         src += ['drv_adc.c']
 
-    if GetDepend(['BSP_USING_DAC']):
+    if GetDepend('BSP_USING_DAC'):
         src += ['drv_dac.c'] 
 
-    if GetDepend(['BSP_USING_I2C_BITOPS']):
+    if GetDepend('BSP_USING_SOFT_I2C'):
         src += ['drv_soft_i2c.c']
 
     if GetDepend('BSP_USING_RTC'):

+ 1 - 1
bsp/wch/risc-v/Libraries/ch32_drivers/drv_soft_i2c.c

@@ -11,7 +11,7 @@
 #include <board.h>
 #include "drv_soft_i2c.h"
 
-#ifdef RT_USING_I2C
+#ifdef BSP_USING_SOFT_I2C
 
 //#define DRV_DEBUG
 #define LOG_TAG              "drv.i2c"

+ 2 - 2
bsp/wch/risc-v/ch32v307v-r1/board/Kconfig

@@ -89,14 +89,14 @@ menu "On-chip Peripheral Drivers"
                 default n  
         endif 
 
-    menuconfig BSP_USING_I2C
+    menuconfig BSP_USING_SOFT_I2C
         bool "Enable I2C Bus"
         select RT_USING_I2C
         select RT_USING_I2C_BITOPS
         select RT_USING_PIN
         default n
 
-        if BSP_USING_I2C
+        if BSP_USING_SOFT_I2C
             config BSP_USING_I2C1
                 bool "Enable I2C1 Bus"
                 default n