Browse Source

Разбираюсь с другой либой. Есть проблемы с выводом текста.

unknown 1 month ago
parent
commit
a1d7630f72

+ 0 - 2
desk/libs/thirdparty/oled_ssd1327/fonts/font_8x5.h

@@ -114,8 +114,6 @@ const uint8_t font_8x5[] =
 
 const uint8_t Font8_Table[] = 
 {
-    8, 5, //height, width
-
 	// @0 ' ' (5 pixels wide)
 	0x00, //      
 	0x00, //      

+ 15 - 6
desk/modules/ssd_1327/oled_common.cpp

@@ -45,9 +45,9 @@ void init_oled(void)
     
     oled_clear(BLACK);
     
-    //test_oled();
+    test_oled();
     
-    //while(1) {}
+    while(1) {}
             
     oled_display();
 }
@@ -515,26 +515,35 @@ void test_oled_old(void)
     oled_display();
 }
 
+sFONT Font8 = {
+  Font8_Table,
+  5, /* Width */
+  8, /* Height */
+};
+
 //
 void test_oled(void)
 {
     //void Paint_DrawPoint(UWORD Xpoint, UWORD Ypoint, UWORD Color, DOT_PIXEL Dot_Pixel, DOT_STYLE Dot_FillWay);
-#if 0    
+#if 1    
     Paint_NewImage(oled_buf, OLED_WIDTH, OLED_HEIGHT, 0, BLACK);
-    Paint_SetScale(2);
+    Paint_SetScale(16);
     // 1.Select Image
     Paint_SelectImage(oled_buf);
     Paint_Clear(BLACK);
   
-    Paint_DrawPoint(40, 40, WHITE, DOT_PIXEL_1X1, DOT_FILL_AROUND);
+    Paint_DrawPoint(40, 40, WHITE, DOT_PIXEL_8X8, DOT_FILL_AROUND);
     
     //void Paint_DrawLine(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend,
     //                UWORD Color, DOT_PIXEL Line_width, LINE_STYLE Line_Style)
 
       
     Paint_DrawLine(10, 10, 10, 20, WHITE, DOT_PIXEL_1X1, LINE_STYLE_SOLID);
+    
+    Paint_DrawString_EN(10, 17, "hello world", &Font8, 0x2, 0xc);
 #endif
 
+#if 0    
     GFX_SetFont(Font8_Table);
     GFX_SetFontSize(1);
     
@@ -542,7 +551,7 @@ void test_oled(void)
     ///GFX_SetFontSize(1);
     
     GFX_DrawString(8, 20, (char*)"Hellow world", 15, 0);
-    
+#endif    
     
     oled_display();
 }

BIN
output/desk.bin


File diff suppressed because it is too large
+ 0 - 0
project/ewarm/settings/tuber.wsdt


Some files were not shown because too many files changed in this diff