From 0379084f401e1a5b4d4b782743b96d418848eced Mon Sep 17 00:00:00 2001 From: chunyexixiaoyu <834670833@qq.com> Date: Tue, 30 Nov 2021 15:14:30 +0800 Subject: [PATCH] Ubiquitous/RT_Thread/:update ov2640 drivers to adapt the hardware,IIC two wires(SCL SDA) switched due to due to hardware design. --- Ubiquitous/RT_Thread/bsp/stm32f407-atk-coreboard/.config | 2 ++ Ubiquitous/RT_Thread/bsp/stm32f407-atk-coreboard/rtconfig.h | 4 ++-- .../RT_Thread/drivers/ov2640/ov2640_source/drv_ov2640.c | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Ubiquitous/RT_Thread/bsp/stm32f407-atk-coreboard/.config b/Ubiquitous/RT_Thread/bsp/stm32f407-atk-coreboard/.config index 681cee72..a13d53ab 100644 --- a/Ubiquitous/RT_Thread/bsp/stm32f407-atk-coreboard/.config +++ b/Ubiquitous/RT_Thread/bsp/stm32f407-atk-coreboard/.config @@ -11,6 +11,7 @@ CONFIG_RTT_DIR="../../rt-thread" # RT-Thread Kernel # CONFIG_RT_NAME_MAX=8 +# CONFIG_RT_USING_BIG_ENDIAN is not set # CONFIG_RT_USING_ARCH_DATA_TYPE is not set # CONFIG_RT_USING_SMP is not set CONFIG_RT_ALIGN_SIZE=4 @@ -515,6 +516,7 @@ CONFIG_USING_KPU_POSTPROCESSING=y # CONFIG_USING_YOLOV2 is not set # CONFIG_USING_KNOWING_FILTER is not set # CONFIG_USING_OTA_MODEL is not set +# CONFIG_USING_IMAGE_PROCESSING is not set # CONFIG_SUPPORT_CONTROL_FRAMEWORK is not set # diff --git a/Ubiquitous/RT_Thread/bsp/stm32f407-atk-coreboard/rtconfig.h b/Ubiquitous/RT_Thread/bsp/stm32f407-atk-coreboard/rtconfig.h index a2c1cb8b..3236e0f7 100644 --- a/Ubiquitous/RT_Thread/bsp/stm32f407-atk-coreboard/rtconfig.h +++ b/Ubiquitous/RT_Thread/bsp/stm32f407-atk-coreboard/rtconfig.h @@ -265,8 +265,8 @@ #define BSP_USING_SPI1 #define BSP_USING_SPI2 #define BSP_USING_I2C1 -#define BSP_I2C1_SCL_PIN 54 -#define BSP_I2C1_SDA_PIN 55 +#define BSP_I2C1_SCL_PIN 55 +#define BSP_I2C1_SDA_PIN 54 #define BSP_USING_DCMI #define BSP_USING_EXT_FMC_IO #define BSP_USING_FMC diff --git a/Ubiquitous/RT_Thread/drivers/ov2640/ov2640_source/drv_ov2640.c b/Ubiquitous/RT_Thread/drivers/ov2640/ov2640_source/drv_ov2640.c index d694db7a..9a22c085 100644 --- a/Ubiquitous/RT_Thread/drivers/ov2640/ov2640_source/drv_ov2640.c +++ b/Ubiquitous/RT_Thread/drivers/ov2640/ov2640_source/drv_ov2640.c @@ -1188,12 +1188,12 @@ void rt_stm32407_atk_miniexpolre() __HAL_RCC_GPIOD_CLK_ENABLE(); __HAL_RCC_GPIOG_CLK_ENABLE(); // GPIO_Initure.Pin=GPIO_PIN_6; - GPIO_Initure.Mode=GPIO_MODE_OUTPUT_PP; + GPIO_Initure.Mode=GPIO_MODE_OUTPUT_OD; GPIO_Initure.Pull=GPIO_PULLUP; GPIO_Initure.Speed=GPIO_SPEED_FREQ_VERY_HIGH; HAL_GPIO_Init(GPIOD,&GPIO_Initure); GPIO_Initure.Pin=GPIO_PIN_7; - GPIO_Initure.Mode=GPIO_MODE_OUTPUT_OD; + GPIO_Initure.Mode=GPIO_MODE_OUTPUT_PP; GPIO_Initure.Pull=GPIO_PULLUP; GPIO_Initure.Speed=GPIO_SPEED_FREQ_VERY_HIGH; HAL_GPIO_Init(GPIOD,&GPIO_Initure);