Răsfoiți Sursa

[bsp][stm32] 驱动bug

liYony 1 an în urmă
părinte
comite
6dad3fb9a8

+ 2 - 0
bsp/allwinner_tina/drivers/drv_gpio.h

@@ -10,6 +10,8 @@
 #ifndef __DRV_GPIO_H__
 #ifndef __DRV_GPIO_H__
 #define __DRV_GPIO_H__
 #define __DRV_GPIO_H__
 
 
+#include <rtdef.h>
+
 /* IO default function */
 /* IO default function */
 #define IO_INPUT         (0x00)
 #define IO_INPUT         (0x00)
 #define IO_OUTPUT        (0x01)
 #define IO_OUTPUT        (0x01)

+ 1 - 1
bsp/stm32/libraries/HAL_Drivers/drivers/drv_gpio.c

@@ -221,7 +221,7 @@ static rt_int8_t stm32_pin_read(rt_device_t dev, rt_base_t pin)
 {
 {
     GPIO_TypeDef *gpio_port;
     GPIO_TypeDef *gpio_port;
     uint16_t gpio_pin;
     uint16_t gpio_pin;
-    GPIO_PinState state = PIN_LOW;
+    GPIO_PinState state = GPIO_PIN_RESET;
 
 
     if (PIN_PORT(pin) < PIN_STPORT_MAX)
     if (PIN_PORT(pin) < PIN_STPORT_MAX)
     {
     {

+ 1 - 1
bsp/stm32/libraries/HAL_Drivers/drivers/drv_gpio.h

@@ -14,7 +14,7 @@
 #ifndef __DRV_GPIO_H__
 #ifndef __DRV_GPIO_H__
 #define __DRV_GPIO_H__
 #define __DRV_GPIO_H__
 
 
-#include <drv_common.h>
+#include <rtdevice.h>
 #include <board.h>
 #include <board.h>
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus

+ 1 - 0
bsp/stm32/libraries/HAL_Drivers/drivers/drv_lcd_mipi.c

@@ -9,6 +9,7 @@
  */
  */
 
 
 #include <board.h>
 #include <board.h>
+#include <rtconfig.h>
 
 
 #ifdef BSP_USING_LCD_MIPI
 #ifdef BSP_USING_LCD_MIPI
 #include <lcd_port.h>
 #include <lcd_port.h>

+ 2 - 0
bsp/stm32/stm32f469-st-disco/.ci/attachconfig/lvgl.attach

@@ -0,0 +1,2 @@
+CONFIG_BSP_USING_LVGL=y
+CONFIG_BSP_USING_LVGL_DEMO=y

+ 1 - 0
bsp/stm32/stm32f469-st-disco/board/Kconfig

@@ -82,6 +82,7 @@ menu "Onboard Peripheral Drivers"
 
 
     config BSP_USING_TOUCH
     config BSP_USING_TOUCH
         bool "Enable touch screen"
         bool "Enable touch screen"
+        select RT_USING_TOUCH
         select BSP_USING_I2C1
         select BSP_USING_I2C1
 
 
     choice
     choice

+ 2 - 0
bsp/stm32/stm32f469-st-disco/board/ports/drv_otm8009a.c

@@ -9,6 +9,8 @@
  */
  */
 
 
 #include <board.h>
 #include <board.h>
+#include <drv_gpio.h>
+
 #ifdef BSP_USING_LCD_OTM8009A
 #ifdef BSP_USING_LCD_OTM8009A
 extern DSI_HandleTypeDef hdsi;
 extern DSI_HandleTypeDef hdsi;
 extern DSI_VidCfgTypeDef hdsi_video;
 extern DSI_VidCfgTypeDef hdsi_video;

+ 1 - 2
bsp/stm32/stm32h750-fk750m1-vbt6/applications/main.c

@@ -8,9 +8,8 @@
  * 2019-10-25     zylx         first version
  * 2019-10-25     zylx         first version
  */
  */
 
 
-#include <rtthread.h>
 #include <rtdevice.h>
 #include <rtdevice.h>
-#include <board.h>
+#include <drv_gpio.h>
 
 
 /* defined the LED1 pin: PC13 */
 /* defined the LED1 pin: PC13 */
 #define LED1_PIN    GET_PIN(C, 13)
 #define LED1_PIN    GET_PIN(C, 13)

+ 2 - 0
bsp/stm32/stm32h750-fk750m1-vbt6/board/board.c

@@ -8,7 +8,9 @@
  * 2023-03-24     spaceman          the first version
  * 2023-03-24     spaceman          the first version
  */
  */
 
 
+#include <rtthread.h>
 #include "board.h"
 #include "board.h"
+#include <drv_common.h>
 
 
 #define AXI_SRAM_ADDR (0X24000000)
 #define AXI_SRAM_ADDR (0X24000000)
 #define AXI_SRAM_SIZE (512*1024)
 #define AXI_SRAM_SIZE (512*1024)

+ 0 - 3
bsp/stm32/stm32h750-fk750m1-vbt6/board/board.h

@@ -12,10 +12,7 @@
 #ifndef __BOARD_H__
 #ifndef __BOARD_H__
 #define __BOARD_H__
 #define __BOARD_H__
 
 
-#include <rtthread.h>
 #include <stm32h7xx.h>
 #include <stm32h7xx.h>
-// #include "drv_common.h"
-#include "drv_gpio.h"
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 extern "C" {
 extern "C" {