examples/fboverlay/fboverlay_main.c: Fix printf format warnings
This commit is contained in:
parent
20c7a06a84
commit
ff130be078
@ -219,7 +219,7 @@ static void draw_rect24(FAR void *fbmem, FAR struct fb_overlayinfo_s * oinfo,
|
|||||||
g = (rgb >> 8);
|
g = (rgb >> 8);
|
||||||
b = (rgb >> 16);
|
b = (rgb >> 16);
|
||||||
|
|
||||||
printf("Fill area (%d,%d,%d,%d) with color: %08x -> (r,g,b) = "
|
printf("Fill area (%d,%d,%d,%d) with color: %08" PRIx32 " -> (r,g,b) = "
|
||||||
"(%02x,%02x,%02x)\n", area->x, area->y, area->w, area->h,
|
"(%02x,%02x,%02x)\n", area->x, area->y, area->w, area->h,
|
||||||
rgb, b, g, r);
|
rgb, b, g, r);
|
||||||
|
|
||||||
@ -260,8 +260,9 @@ static void draw_rect32(FAR void *fbmem, FAR struct fb_overlayinfo_s * oinfo,
|
|||||||
FAR uint32_t *dest;
|
FAR uint32_t *dest;
|
||||||
FAR uint8_t *row;
|
FAR uint8_t *row;
|
||||||
|
|
||||||
printf("Fill area (%d,%d,%d,%d) with color: %08x -> (a,r,g,b) = "
|
printf("Fill area (%d,%d,%d,%d) with color: %08" PRIx32 " -> (a,r,g,b) = "
|
||||||
"(%02x,%02x,%02x,%02x)\n", area->x, area->y, area->w, area->h,
|
"(%02" PRIx32 ",%02" PRIx32 ",%02" PRIx32 ",%02" PRIx32 ")\n",
|
||||||
|
area->x, area->y, area->w, area->h,
|
||||||
argb, argb >> 24, argb >> 16, argb >> 8, argb);
|
argb, argb >> 24, argb >> 16, argb >> 8, argb);
|
||||||
|
|
||||||
row = (FAR uint8_t *)fbmem + oinfo->stride * area->y;
|
row = (FAR uint8_t *)fbmem + oinfo->stride * area->y;
|
||||||
@ -429,7 +430,8 @@ static void print_plane_info(int fb)
|
|||||||
" fblen: %lu\n"
|
" fblen: %lu\n"
|
||||||
" stride: %u\n"
|
" stride: %u\n"
|
||||||
" display: %u\n"
|
" display: %u\n"
|
||||||
" bpp: %u\n",
|
" bpp: %u\n"
|
||||||
|
" fbmem: %p\n",
|
||||||
pinfo.fbmem, (unsigned long)pinfo.fblen, pinfo.stride,
|
pinfo.fbmem, (unsigned long)pinfo.fblen, pinfo.stride,
|
||||||
pinfo.display,
|
pinfo.display,
|
||||||
pinfo.bpp, fbmem);
|
pinfo.bpp, fbmem);
|
||||||
@ -487,11 +489,11 @@ static void print_overlay_info(int fb, uint8_t overlayno)
|
|||||||
" overlay: %u\n"
|
" overlay: %u\n"
|
||||||
" bpp: %u\n"
|
" bpp: %u\n"
|
||||||
" blank: %08x\n"
|
" blank: %08x\n"
|
||||||
"chromakey: %08x\n"
|
"chromakey: %08" PRIx32 "\n"
|
||||||
" color: %08x\n"
|
" color: %08" PRIx32 "\n"
|
||||||
" transp: %02x\n"
|
" transp: %02x\n"
|
||||||
" mode: %08x\n"
|
" mode: %08x\n"
|
||||||
" accl: %08x\n"
|
" accl: %08" PRIx32 "\n"
|
||||||
" mmap: %p\n",
|
" mmap: %p\n",
|
||||||
oinfo.fbmem, (unsigned long)oinfo.fblen, oinfo.stride,
|
oinfo.fbmem, (unsigned long)oinfo.fblen, oinfo.stride,
|
||||||
oinfo.overlay,
|
oinfo.overlay,
|
||||||
@ -624,7 +626,7 @@ static int overlay_accl(int fb, uint8_t overlayno, uint32_t accl)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("%s: %08x %08x\n", __func__, oinfo.accl, accl);
|
printf("%s: %08" PRIx32 " %08" PRIx32 "\n", __func__, oinfo.accl, accl);
|
||||||
return (oinfo.accl & accl) ? OK : -1;
|
return (oinfo.accl & accl) ? OK : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -688,7 +690,7 @@ static int overlay_chromakey(int fb, FAR struct fb_overlayinfo_s *oinfo)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
printf("Overlay: %d, set chromakey: 0x%08x\n", oinfo->overlay,
|
printf("Overlay: %d, set chromakey: 0x%08" PRIx32 "\n", oinfo->overlay,
|
||||||
oinfo->chromakey);
|
oinfo->chromakey);
|
||||||
|
|
||||||
ret = overlay_accl(fb, oinfo->overlay, FB_ACCL_CHROMA);
|
ret = overlay_accl(fb, oinfo->overlay, FB_ACCL_CHROMA);
|
||||||
|
Loading…
Reference in New Issue
Block a user