File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ CONFIG_HEAP_MEM_POOL_SIZE=16384
55CONFIG_DISPLAY=y
66
77CONFIG_LOG=y
8- CONFIG_DISPLAY_LOG_LEVEL_DBG=y
98
109CONFIG_CFB_LOG_LEVEL_DBG=y
1110CONFIG_CHARACTER_FRAMEBUFFER=y
Original file line number Diff line number Diff line change 1+ CONFIG_HEAP_MEM_POOL_SIZE=16384
2+
3+ CONFIG_DISPLAY=y
4+ CONFIG_SDL_DISPLAY_DEV_NAME="DISPLAY"
5+ CONFIG_SDL_DISPLAY_X_RES=250
6+ CONFIG_SDL_DISPLAY_Y_RES=120
7+
8+ CONFIG_LOG=y
9+
10+ CONFIG_CFB_LOG_LEVEL_DBG=y
11+ CONFIG_CHARACTER_FRAMEBUFFER=y
Original file line number Diff line number Diff line change 1717#define DISPLAY_DRIVER "SSD1306"
1818#endif
1919
20+ #ifndef DISPLAY_DRIVER
21+ #define DISPLAY_DRIVER "DISPLAY"
22+ #endif
23+
2024void main (void )
2125{
2226 struct device * dev ;
@@ -33,6 +37,11 @@ void main(void)
3337 return ;
3438 }
3539
40+ if (display_set_pixel_format (dev , PIXEL_FORMAT_MONO10 ) != 0 ) {
41+ printf ("Failed to set required pixel format\n" );
42+ return ;
43+ }
44+
3645 printf ("initialized %s\n" , DISPLAY_DRIVER );
3746
3847 if (cfb_framebuffer_init (dev )) {
@@ -43,6 +52,8 @@ void main(void)
4352 api = dev -> driver_api ;
4453 cfb_framebuffer_clear (dev , true);
4554
55+ display_blanking_off (dev );
56+
4657 rows = cfb_get_display_parameter (dev , CFB_DISPLAY_ROWS );
4758 ppt = cfb_get_display_parameter (dev , CFB_DISPLAY_PPT );
4859
@@ -73,6 +84,9 @@ void main(void)
7384 }
7485
7586 cfb_framebuffer_finalize (dev );
87+ #if defined(CONFIG_ARCH_POSIX )
88+ k_sleep (100 );
89+ #endif
7690 }
7791 }
7892}
You can’t perform that action at this time.
0 commit comments