Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void blit(BITMAP_PTR SrcPm, uint8_t *fb, int src_x, int src_y, int dst_x, int dst_y, int w, int h)
- {
- uint16_t *ptr = (uint16_t*)SrcPm->data;
- for (uint32_t i = 0; i < h ; i++)
- {
- for (uint32_t j = 0; j < w; j++)
- {
- uint16_t color = ptr[j];
- *(__IO uint16_t*) (fb + (2*((dst_y+i)*BSP_LCD_GetXSize() + dst_x + j))) = color;
- }
- ptr+=w;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement