Advertisement
Guest User

Pokitto mode 13 update

a guest
Jun 17th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 39.08 KB | None | 0 0
  1. void Pokitto::lcdRefreshMode13(uint8_t * scrbuf, uint16_t* paletteptr, uint8_t offset){
  2. uint32_t x,y;
  3. uint32_t scanline[2][110]; // read two nibbles = pixels at a time
  4. uint8_t *d;
  5.  
  6. write_command(0x20); write_data(0);
  7. write_command(0x21); write_data(0);
  8. write_command(0x22);
  9. CLR_CS_SET_CD_RD_WR;
  10.  
  11. SET_MASK_P2;
  12.  
  13. for(x=0;x<110;x+=2)
  14.   {
  15.     d = scrbuf+x;// point to beginning of line in data
  16.     uint32_t s=0;
  17.     uint32_t t = *d;
  18.     uint32_t t1 = *(d+1);
  19.  
  20.     #ifdef PROJ_SHOW_FPS_COUNTER
  21.     if (x<4) continue;
  22.     setDRAMptr(x<<1, 0);
  23.     #endif
  24.  
  25.     //for(s=0;s<88;){
  26.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  27.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  28.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  29.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  30.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  31.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  32.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  33.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  34.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  35.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  36.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  37.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  38.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  39.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  40.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  41.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  42.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  43.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  44.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  45.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  46.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  47.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  48.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  49.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  50.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  51.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  52.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  53.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  54.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  55.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  56.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  57.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  58.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  59.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  60.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  61.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  62.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  63.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  64.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  65.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  66.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  67.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  68.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  69.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  70.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  71.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  72.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  73.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  74.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  75.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  76.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  77.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  78.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  79.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  80.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  81.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  82.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  83.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  84.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  85.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  86.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  87.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  88.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  89.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  90.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  91.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  92.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  93.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  94.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  95.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  96.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  97.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  98.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  99.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  100.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  101.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  102.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  103.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  104.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  105.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  106.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  107.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  108.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  109.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  110.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  111.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  112.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  113.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  114.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  115.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  116.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  117.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  118.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  119.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  120.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  121.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  122.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  123.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  124.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  125.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  126.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  127.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  128.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  129.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  130.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  131.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  132.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  133.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  134.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  135.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  136.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  137.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  138.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  139.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  140.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  141.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  142.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  143.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  144.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  145.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  146.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  147.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  148.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  149.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  150.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  151.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  152.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  153.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  154.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  155.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  156.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  157.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  158.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  159.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  160.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  161.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  162.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  163.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  164.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  165.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  166.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  167.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  168.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  169.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  170.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  171.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  172.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  173.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  174.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  175.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  176.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  177.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  178.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  179.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  180.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  181.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  182.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  183.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  184.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  185.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  186.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  187.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  188.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  189.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  190.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  191.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  192.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  193.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  194.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  195.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  196.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  197.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  198.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  199.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  200.         LPC_GPIO_PORT->MPIN[2] = scanline[0][s] = paletteptr[(t+offset)&255]<<3; CLR_WR;SET_WR;CLR_WR;SET_WR;
  201.         scanline[1][s++] = paletteptr[(t1+offset)&255]<<3; d+=110; t = *d; t1 = *(d+1);
  202. //    }
  203.     s=0;
  204. //    for (s=0;s<88;) {
  205.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  206.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  207.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  208.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  209.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  210.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  211.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  212.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  213.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  214.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  215.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  216.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  217.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  218.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  219.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  220.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  221.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  222.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  223.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  224.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  225.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  226.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  227.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  228.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  229.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  230.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  231.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  232.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  233.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  234.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  235.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  236.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  237.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  238.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  239.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  240.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  241.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  242.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  243.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  244.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  245.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  246.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  247.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  248.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  249.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  250.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  251.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  252.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  253.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  254.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  255.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  256.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  257.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  258.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  259.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  260.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  261.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  262.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  263.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  264.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  265.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  266.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  267.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  268.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  269.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  270.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  271.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  272.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  273.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  274.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  275.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  276.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  277.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  278.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  279.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  280.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  281.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  282.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  283.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  284.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  285.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  286.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  287.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  288.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  289.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  290.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  291.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  292.         LPC_GPIO_PORT->MPIN[2] = (scanline[0][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  293. //    }
  294.     s=0;
  295.     //for (s=0;s<88;) {
  296.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  297.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  298.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  299.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  300.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  301.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  302.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  303.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  304.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  305.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  306.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  307.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  308.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  309.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  310.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  311.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  312.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  313.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  314.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  315.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  316.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  317.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  318.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  319.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  320.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  321.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  322.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  323.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  324.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  325.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  326.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  327.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  328.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  329.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  330.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  331.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  332.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  333.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  334.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  335.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  336.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  337.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  338.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  339.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  340.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  341.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  342.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  343.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  344.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  345.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  346.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  347.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  348.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  349.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  350.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  351.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  352.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  353.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  354.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  355.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  356.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  357.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  358.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  359.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  360.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  361.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  362.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  363.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  364.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  365.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  366.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  367.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  368.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  369.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  370.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  371.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  372.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  373.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  374.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  375.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  376.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  377.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  378.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  379.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  380.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  381.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  382.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  383.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  384.     //}
  385.     s=0;
  386.     //for (s=0;s<88;) {
  387.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  388.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  389.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  390.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  391.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  392.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  393.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  394.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  395.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  396.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  397.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  398.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  399.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  400.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  401.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  402.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  403.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  404.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  405.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  406.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  407.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  408.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  409.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  410.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  411.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  412.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  413.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  414.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  415.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  416.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  417.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  418.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  419.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  420.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  421.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  422.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  423.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  424.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  425.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  426.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  427.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  428.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  429.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  430.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  431.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  432.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  433.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  434.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  435.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  436.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  437.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  438.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  439.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  440.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  441.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  442.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  443.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  444.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  445.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  446.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  447.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  448.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  449.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  450.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  451.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  452.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  453.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  454.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  455.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  456.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  457.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  458.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  459.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  460.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  461.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  462.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  463.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  464.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  465.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  466.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  467.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  468.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  469.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  470.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  471.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  472.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  473.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  474.         LPC_GPIO_PORT->MPIN[2] = (scanline[1][s++]);CLR_WR;SET_WR;CLR_WR;SET_WR;
  475.     //}
  476.  
  477.  
  478.   }
  479.     CLR_MASK_P2;
  480.  
  481. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement