Commit 7a4dcfbf authored by Stefan Haun's avatar Stefan Haun
Browse files

Fix code formatting

parent e3902ef9
Pipeline #4139 passed with stages
in 46 seconds
......@@ -188,7 +188,8 @@ void compositor()
fb_pixel(overlay_screen.fb, x, y);
uint8_t *target = fb_pixel(display_screen.fb, x, y);
if ((overlay_pixel[0] == 0) && (overlay_pixel[1] == 0)) {
if ((overlay_pixel[0] == 0) &&
(overlay_pixel[1] == 0)) {
uint8_t *app_pixel =
fb_pixel(application_screen.fb, x, y);
target[0] = app_pixel[0];
......
......@@ -18,11 +18,11 @@ struct txt_buffer display_textb;
/***** Virtual framebuffers *****/
static uint8_t app_buffer[LCD_HEIGHT][LCD_WIDTH][2];
static struct framebuffer app_framebuffer = {
.data = app_buffer,
static struct framebuffer app_framebuffer = { .data = app_buffer,
.width = LCD_WIDTH,
.height = LCD_HEIGHT,
.stride = LCD_WIDTH * LCD_HEIGHT * 2,
.stride = LCD_WIDTH * LCD_HEIGHT *
2,
.orientation = FB_O_180,
.update = NULL };
......@@ -30,11 +30,11 @@ static struct framebuffer app_framebuffer = {
struct gfx_region application_screen;
static uint8_t ovl_buffer[LCD_HEIGHT][LCD_WIDTH][2];
static struct framebuffer ovl_framebuffer = {
.data = ovl_buffer,
static struct framebuffer ovl_framebuffer = { .data = ovl_buffer,
.width = LCD_WIDTH,
.height = LCD_HEIGHT,
.stride = LCD_WIDTH * LCD_HEIGHT * 2,
.stride = LCD_WIDTH * LCD_HEIGHT *
2,
.orientation = FB_O_180,
.update = NULL };
......@@ -99,5 +99,4 @@ void display_init_slim(void)
ovl_framebuffer.encode_color_rgb = display_screen.fb->encode_color_rgb;
overlay_screen = gfx_screen(&ovl_framebuffer);
gfx_clear(&overlay_screen);
}
......@@ -250,15 +250,18 @@ static mp_obj_t mp_display_set_fullscreen(mp_obj_t enable_obj)
}
return mp_const_none;
}
static MP_DEFINE_CONST_FUN_OBJ_1(display_set_fullscreen_obj, mp_display_set_fullscreen);
static MP_DEFINE_CONST_FUN_OBJ_1(
display_set_fullscreen_obj, mp_display_set_fullscreen
);
static mp_obj_t mp_display_is_fullscreen()
{
bool res = epic_disp_is_fullscreen();
return mp_obj_new_bool(res);
}
static MP_DEFINE_CONST_FUN_OBJ_0(display_is_fullscreen_obj, mp_display_is_fullscreen);
static MP_DEFINE_CONST_FUN_OBJ_0(
display_is_fullscreen_obj, mp_display_is_fullscreen
);
/* Overlay mode is not exposed to Python apps*/
......@@ -276,8 +279,10 @@ static MP_DEFINE_CONST_FUN_OBJ_0(display_close_obj, mp_display_close);
static const mp_rom_map_elem_t display_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_sys_display) },
{ MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&display_open_obj) },
{ MP_ROM_QSTR(MP_QSTR_set_fullscreen), MP_ROM_PTR(&display_set_fullscreen_obj) },
{ MP_ROM_QSTR(MP_QSTR_is_fullscreen), MP_ROM_PTR(&display_is_fullscreen_obj) },
{ MP_ROM_QSTR(MP_QSTR_set_fullscreen),
MP_ROM_PTR(&display_set_fullscreen_obj) },
{ MP_ROM_QSTR(MP_QSTR_is_fullscreen),
MP_ROM_PTR(&display_is_fullscreen_obj) },
{ MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&display_close_obj) },
{ MP_ROM_QSTR(MP_QSTR_print), MP_ROM_PTR(&display_print_obj) },
{ MP_ROM_QSTR(MP_QSTR_print_adv), MP_ROM_PTR(&display_print_adv_obj) },
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment