|
|
@@ -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();
|
|
|
}
|