Selaa lähdekoodia

[fix] virtual device bug and name fix.

yuanjie 5 vuotta sitten
vanhempi
sitoutus
aabe6a7176
2 muutettua tiedostoa jossa 8 lisäystä ja 4 poistoa
  1. 6 2
      vlcd.c
  2. 2 2
      vtouch.c

+ 6 - 2
vlcd.c

@@ -15,7 +15,7 @@
 #define DBG_LVL DBG_LOG
 #include <rtdbg.h>
 
-#ifdef PKG_USING_LCD
+#ifdef VDEVICE_USING_LCD
 
 #define LCD_USING_RGB565
 //#define LCD_USING_RGB888
@@ -144,6 +144,8 @@ const static struct rt_device_ops _lcd_ops =
     _lcd_init,
     _lcd_open,
     _lcd_close,
+    RT_NULL,
+    RT_NULL,
     _lcd_control
 };
 #endif
@@ -168,6 +170,8 @@ int rt_hw_lcd_init(void)
     lcd_dev.init = _lcd_init;
     lcd_dev.open = _lcd_open;
     lcd_dev.close = _lcd_close;
+    lcd_dev.read = RT_NULL;
+    lcd_dev.write = RT_NULL;
     lcd_dev.control = _lcd_control;
 #endif
 
@@ -180,4 +184,4 @@ int rt_hw_lcd_init(void)
 }
 INIT_DEVICE_EXPORT(rt_hw_lcd_init);
 
-#endif /* PKG_USING_LCD */
+#endif /* VDEVICE_USING_LCD */

+ 2 - 2
vtouch.c

@@ -10,7 +10,7 @@
 
 #include "rtconfig.h"
 
-#ifdef PKG_USING_TOUCH
+#ifdef VDEVICE_USING_TOUCH
 
 #include <rtthread.h>
 #include <rtdevice.h>
@@ -138,4 +138,4 @@ static int rt_hw_touch_init(void)
 }
 INIT_DEVICE_EXPORT(rt_hw_touch_init);
 
-#endif /* PKG_USING_TOUCH */
+#endif /* VDEVICE_USING_TOUCH */