Advertisement
Guest User

Untitled

a guest
Jun 13th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. void blit(BITMAP_PTR SrcPm, uint8_t *fb, int src_x, int src_y, int dst_x, int dst_y, int w, int h)
  2. {
  3. uint16_t *ptr = (uint16_t*)SrcPm->data;
  4. for (uint32_t i = 0; i < h ; i++)
  5. {
  6. for (uint32_t j = 0; j < w; j++)
  7. {
  8. uint16_t color = ptr[j];
  9.  
  10. *(__IO uint16_t*) (fb + (2*((dst_y+i)*BSP_LCD_GetXSize() + dst_x + j))) = color;
  11.  
  12. }
  13.  
  14. ptr+=w;
  15. }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement