TimJTi commented on code in PR #16257: URL: https://github.com/apache/nuttx/pull/16257#discussion_r2061504942
########## include/nuttx/video/fb.h: ########## @@ -892,47 +930,94 @@ struct fb_fix_screeninfo struct fb_bitfield { - uint32_t offset; /* Beginning of bitfield */ - uint32_t length; /* Length of bitfield */ - uint32_t msb_right; /* != 0 : Most significant bit is right */ + uint32_t offset; /* Beginning of bitfield */ + uint32_t length; /* Length of bitfield */ + uint32_t msb_right; /* != 0 : Most significant bit is right */ }; struct fb_var_screeninfo { - uint32_t xres; /* Visible resolution */ + uint32_t xres; /* Visible resolution */ uint32_t yres; - uint32_t xres_virtual; /* Virtual resolution */ + uint32_t xres_virtual; /* Virtual resolution */ uint32_t yres_virtual; - uint32_t xoffset; /* Offset from virtual to visible */ - uint32_t yoffset; /* Resolution */ - uint32_t bits_per_pixel; /* Guess what */ - uint32_t grayscale; /* 0 = color, 1 = grayscale, >1 = FOURCC */ - struct fb_bitfield red; /* Bitfield in fb mem if true color, */ - struct fb_bitfield green; /* else only length is significant */ + uint32_t xoffset; /* Offset from virtual to visible */ + uint32_t yoffset; /* Resolution */ + uint32_t bits_per_pixel; /* Guess what */ + uint32_t grayscale; /* 0 = color, 1 = grayscale, >1 = FOURCC */ + struct fb_bitfield red; /* Bitfield in fb mem if true color, */ + struct fb_bitfield green; /* else only length is significant */ struct fb_bitfield blue; - struct fb_bitfield transp; /* Transparency */ - uint32_t nonstd; /* != 0 Non standard pixel format */ - uint32_t activate; /* See FB_ACTIVATE_* */ - uint32_t height; /* Height of picture in mm */ - uint32_t width; /* Width of picture in mm */ - uint32_t accel_flags; /* (OBSOLETE) See fb_info.flags */ + struct fb_bitfield transp; /* Transparency */ + uint32_t nonstd; /* != 0 Non standard pixel format */ + uint32_t activate; /* See FB_ACTIVATE_* */ + uint32_t height; /* Height of picture in mm */ + uint32_t width; /* Width of picture in mm */ + uint32_t accel_flags; /* (OBSOLETE) See fb_info.flags */ /* Timing: All values in pixclocks, except pixclock (of course) */ - uint32_t pixclock; /* Pixel clock in ps (pico seconds) */ - uint32_t left_margin; /* Time from sync to picture */ - uint32_t right_margin; /* Time from picture to sync */ - uint32_t upper_margin; /* Time from sync to picture */ + uint32_t pixclock; /* Pixel clock in ps (pico seconds) */ + uint32_t left_margin; /* Time from sync to picture */ + uint32_t right_margin; /* Time from picture to sync */ + uint32_t upper_margin; /* Time from sync to picture */ uint32_t lower_margin; - uint32_t hsync_len; /* Length of horizontal sync */ - uint32_t vsync_len; /* Length of vertical sync */ - uint32_t sync; /* See FB_SYNC_* */ - uint32_t vmode; /* See FB_VMODE_* */ - uint32_t rotate; /* Angle we rotate counter clockwise */ - uint32_t colorspace; /* Colorspace for FOURCC-based modes */ - uint32_t reserved[4]; /* Reserved for future compatibility */ + uint32_t hsync_len; /* Length of horizontal sync */ + uint32_t vsync_len; /* Length of vertical sync */ + uint32_t sync; /* See FB_SYNC_* */ + uint32_t vmode; /* See FB_VMODE_* */ + uint32_t rotate; /* Angle we rotate counter clockwise */ + uint32_t colorspace; /* Colorspace for FOURCC-based modes */ + uint32_t reserved[4]; /* Reserved for future compatibility */ +}; + +#ifdef CONFIG_VIDEO_FB_SPLASHSCREEN +# if defined(CONFIG_VIDEO_FB_SPLASHSCREEN_BPP8) || \ + defined(CONFIG_VIDEO_FB_SPLASHSCREEN_MONO) || \ + defined(CONFIG_VIDEO_FB_SPLASHSCREEN_GREY) + typedef uint8_t fb_pixel_t; +# elif defined(CONFIG_VIDEO_FB_SPLASHSCREEN_BPP16) + typedef uint16_t fb_pixel_t; + #elif defined(CONFIG_VIDEO_FB_SPLASHSCREEN_BPP24) + typedef uint32_t fb_pixel_t; +# elif defined(CONFIG_VIDEO_FB_SPLASHSCREEN_BPP32) + typedef uint32_t fb_pixel_t; +# else +# error "Pixel depth is unknown" +#endif + +/* Describes a point on the display */ + +struct fb_point_s +{ + fb_coord_t x; /* X position, range: 0 to screen width - 1 */ + fb_coord_t y; /* Y position, range: 0 to screen height - 1 */ }; +struct fb_rect_s +{ + struct fb_point_s pt1; /* Upper, left-hand corner */ + struct fb_point_s pt2; /* Lower, right-hand corner */ +}; + +/* This structure describes the splashscreen */ + +struct splscr_bitmap_s +{ + uint8_t npixels; /* Number of pixels */ + uint8_t lookup; /* Pixel RGB lookup index */ +}; + +struct palette_bitmap_s Review Comment: Which one? Where? I was trying to avoid including an large "heavy duty" NXG header files, but perhaps I missed something appropriate? It was borrowed from an NX example app if I remember. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org