4242#include "tick.h"
4343
4444void common_hal_framebufferio_framebufferdisplay_construct (framebufferio_framebufferdisplay_obj_t * self ,
45- mp_obj_t framebuffer , uint16_t width , uint16_t height ,
46- uint16_t rotation , uint16_t color_depth ,
47- uint8_t bytes_per_cell ,
48- bool auto_refresh , uint16_t native_frames_per_second ) {
45+ mp_obj_t framebuffer ,
46+ uint16_t rotation ,
47+ bool auto_refresh ) {
4948 // Turn off auto-refresh as we init.
5049 self -> auto_refresh = false;
5150 self -> framebuffer = framebuffer ;
@@ -54,15 +53,29 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu
5453 uint16_t ram_width = 0x100 ;
5554 uint16_t ram_height = 0x100 ;
5655
57- displayio_display_core_construct (& self -> core , NULL , width , height , ram_width , ram_height , 0 , 0 , rotation ,
58- color_depth , false, false, bytes_per_cell , false, false);
56+ displayio_display_core_construct (
57+ & self -> core ,
58+ NULL ,
59+ self -> framebuffer_protocol -> get_width (self -> framebuffer ),
60+ self -> framebuffer_protocol -> get_height (self -> framebuffer ),
61+ ram_width ,
62+ ram_height ,
63+ 0 ,
64+ 0 ,
65+ rotation ,
66+ self -> framebuffer_protocol -> get_color_depth (self -> framebuffer ),
67+ false,
68+ false,
69+ self -> framebuffer_protocol -> get_bytes_per_cell (self -> framebuffer ),
70+ false,
71+ false);
5972
6073 self -> first_manual_refresh = !auto_refresh ;
6174
62- self -> native_frames_per_second = native_frames_per_second ;
63- self -> native_ms_per_frame = 1000 / native_frames_per_second ;
75+ self -> native_frames_per_second = self -> framebuffer_protocol -> get_native_frames_per_second ( self -> framebuffer ) ;
76+ self -> native_ms_per_frame = 1000 / self -> native_frames_per_second ;
6477
65- supervisor_start_terminal (width , height );
78+ supervisor_start_terminal (self -> core . width , self -> core . height );
6679
6780 // Set the group after initialization otherwise we may send pixels while we delay in
6881 // initialization.
0 commit comments