daily pastebin goal
62%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top