亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? lcd07x1.c

?? 一個非常難得的ucos嵌入式液晶驅動源程序
?? C
?? 第 1 頁 / 共 4 頁
字號:
    #define XORPIXEL_DATA(x, y,c)  XorPixel_Data(LCD_XSIZE-1-(x),y,c)
  #elif ( LCD_MIRROR_X && !LCD_MIRROR_Y &&  LCD_SWAP_XY) 
    #error This combination of mirroring/swapping not yet supported
  #elif ( LCD_MIRROR_X &&  LCD_MIRROR_Y && !LCD_SWAP_XY) 
    #define SETPIXEL(x, y, c)  _SetPixel(LCD_XSIZE-1-(x), LCD_YSIZE-1-(y), c)
    #define GETPIXEL(x, y)     _GetPixel(LCD_XSIZE-1-(x), LCD_YSIZE-1-(y))
    #define XORPIXEL(x, y)     XorPixel (LCD_XSIZE-1-(x), LCD_YSIZE-1-(y))
    #define XORPIXEL_DATA(x, y,c)  XorPixel_Data(LCD_XSIZE-1-(x), LCD_YSIZE-1-(y),c)
  #elif ( LCD_MIRROR_X &&  LCD_MIRROR_Y &&  LCD_SWAP_XY) 
    #error This combination of mirroring/swapping not yet supported
  #endif
#elif (LCD_SUPPORT_COMTRANS && !LCD_SUPPORT_SEGTRANS)
  #if (!LCD_SWAP_XY)
    #define SETPIXEL(x, y, c)  _SetPixel(x,LCD__aLine2Com0[y], c)
    #define GETPIXEL(x, y)     _GetPixel(x,LCD__aLine2Com0[y])
    #define XORPIXEL(x, y)      XorPixel(x,LCD__aLine2Com0[y])
  #else
    #define SETPIXEL(x, y, c)  _SetPixel(y,LCD__aLine2Com0[x], c)
    #define GETPIXEL(x, y)     _GetPixel(y,LCD__aLine2Com0[x])
    #define XORPIXEL(x, y)      XorPixel(y,LCD__aLine2Com0[x])
  #endif
#elif (!LCD_SUPPORT_COMTRANS && LCD_SUPPORT_SEGTRANS)
  #if (!LCD_SWAP_XY)
    #define SETPIXEL(x, y, c)  _SetPixel(LCD__aRow2Seg0[x],y, c)
    #define GETPIXEL(x, y)     _GetPixel(LCD__aRow2Seg0[x],y)
    #define XORPIXEL(x, y)      XorPixel(LCD__aRow2Seg0[x],y)
  #else
    #define SETPIXEL(x, y, c)  _SetPixel(LCD__aRow2Seg0[y],x, c)
    #define GETPIXEL(x, y)     _GetPixel(LCD__aRow2Seg0[y],x)
    #define XORPIXEL(x, y)      XorPixel(LCD__aRow2Seg0[y],x)
  #endif
#elif (LCD_SUPPORT_COMTRANS && LCD_SUPPORT_SEGTRANS)
  #if (!LCD_SWAP_XY)
    #define SETPIXEL(x, y, c)  _SetPixel(LCD__aRow2Seg0[x],LCD__aLine2Com0[y], c)
    #define GETPIXEL(x, y)     _GetPixel(LCD__aRow2Seg0[x],LCD__aLine2Com0[y])
    #define XORPIXEL(x, y)      XorPixel(LCD__aRow2Seg0[x],LCD__aLine2Com0[y])
  #else
    #define SETPIXEL(x, y, c)  _SetPixel(LCD__aRow2Seg0[y],LCD__aLine2Com0[x], c)
    #define GETPIXEL(x, y)     _GetPixel(LCD__aRow2Seg0[y],LCD__aLine2Com0[x])
    #define XORPIXEL(x, y)      XorPixel(LCD__aRow2Seg0[y],LCD__aLine2Com0[x])
  #endif
#else
  #error This combination of switches not yet supported
#endif


/*
        *********************************************************
        *                                                       *
        *       Next pixel routines                             *
        *                                                       *
        *********************************************************
*/

#if 0 /* Not yet defined ! */
     (LCD_OPTIMIZE)             \
      && (LCD_BUSWIDTH == 8)        \
      && (LCD_MIRROR_X)             \
      && (!LCD_MIRROR_Y)            \
      && (LCD_SWAP_XY)              \
      && (!LCD_SUPPORT_COMTRANS)    \
      && (!LCD_SUPPORT_SEGTRANS)    \
      && (LCD_BITSPERPIXEL == 4)

static int CurPosY;    /* Physical x position !!! */
static int CurOff;

static void SetPosXY(int x, int y) {
  y = LCD_YSIZE-1-y;
  CurPosY = y;
  CurOff = XY2OFF(y,x);
}

static void SetNextPixel(PIXELCOLOR c) {
  U8 Data = LCD_READ_MEM(Off);
  if (CurPosY&1) {
    Data = (Data & ~(15<<0)) | (c<<0);
    CurOff++;
  } else {
    Data = (Data & ~(15<<4)) | (c<<4);
  }
  LCD_WRITE_MEM(Off, Data);
  CurPosY++;
}

#define SETNEXTPIXEL(c) SetNextPixel(c)
#endif


/*
        *********************************************************
        *                                                       *
        *       Palette info                                    *
        *                                                       *
        *********************************************************

The following are "sample" palettes. You might have to create
a table yourself containing the entries corresponding to the
colors which your LCD can display.

*/

#if (LCD_FIXEDPALETTE==0)
  static const LCD_COLOR PhysColors[] = {
    #if (LCD_REVERSE)
      #if   (LCD_BITSPERPIXEL == 1)                   /* black/white */
        0xffffff, 0x000000
      #elif (LCD_BITSPERPIXEL == 2)                   /* 4 gray scales */
        0xffffff, 0xaaaaaa, 0x555555, 0x000000
      #endif
    #else
      #if   (LCD_BITSPERPIXEL == 1)                   /* black/white */
        0x000000, 0xffffff
      #elif (LCD_BITSPERPIXEL == 2)                   /* 4 gray scales */
        0x000000, 0x555555, 0xaaaaaa, 0xffffff
      #endif
    #endif
  };
#endif


/*
        *********************************************************
        *                                                       *
        *                   LCD_SetPaletteEntry                 *
        *                                                       *
        *********************************************************

*/

void LCD_L0_SetLUTEntry(U8 Pos, LCD_COLOR color) {
  Pos=Pos;
  color=color;
}


/*
        *********************************************************
        *                                                       *
        *       ID translation table                            *
        *                                                       *
        *********************************************************

This table contains 0, 1, 2, ... and serves as translation table for DDBs

*/

#define INTS(Base)  Base+0,Base+1,Base+2,Base+3,Base+4,Base+5,   \
                    Base+6,Base+7,Base+8,Base+9,Base+10,Base+11, \
                    Base+12,Base+13,Base+14,Base+15

static const PIXELCOLOR TransId[] = {
  INTS(0*16)
};


/*
  ********************************************************************
  *                                                                  *
  *                  Hardware access, register level                 *
  *                                                                  *
  *           Write Page / Column                                    *
  *                                                                  *
  ********************************************************************

 The following routines are used for all access to the
 LCD-controller(s).

*/

static U8 PageCache, ColCache;            /* Page / column of cache byte */


/*
        *****************************************
        *                                       *
        *         Set Column routines           *
        *                                       *
        *****************************************

These routines set the page-register of their respective
LCD-controller. Note that page is not what you might imagine,
but is a section of the controllers internal video RAM.
For details, please refer to the datasheet.

*/

#define SETCOL(col) {                                             \
  if (ColCache != col) {                                          \
    U8 temp_NewCol = 0x0+(col&15);    /* Set low nibble */        \
    LCD_WRITECMD(temp_NewCol);        /* Send low nibble */       \
    temp_NewCol = 0x10+(col>>4);   /* Set high nibble */       \
    LCD_WRITECMD(temp_NewCol);        /* Send high nibble */      \
    ColCache = col;                                            \
  }                                                               \
}

void SetCol(U8 col) {
  SETCOL(col);
}

#define SETCOL_IF_NEEDED(c) { if (c != ColCache) SETCOL(c); }


/*
        *****************************************
        *                                       *
        *         Set Page routines             *
        *                                       *
        *****************************************

These routines set the page-register of their respective
LCD-controller. Note that page is not what you might imagine,
but is a section of the controllers internal video RAM.
For details, please refer to the datasheet.

*/

#define SETPAGE(p) {              \
  U8 temp_NewPage;                \
  if (PageCache != p) {     \
    PageCache = p;          \
    temp_NewPage = 0xb0+ PageCache; \
    LCD_WRITECMD(temp_NewPage);   \
  }                               \
}

#define SETPAGE_IF_NEEDED(p) { if (p != PageCache) SETPAGE(p); }

void SetPage(U8 p) {
  SETPAGE(p);
}

#define WRITE_VMEM_PAIR(page, col, ptr)  { \
  if (!CacheLocked) {                      \
    SETPAGE_IF_NEEDED(page);               \
    SETCOL_IF_NEEDED(col);                 \
    LCD_WRITEMDATA(ptr,2);                 \
    ColCache++;                            \
  } else {                                 \
    aCacheDirty[page] = CacheStat=1;       \
  }                                        \
}


/*
        *********************************************************
        *                                                       *
        *       Internal set pixel routines                     *
        *                                                       *
        *********************************************************
*/

static void _SetPixel(int x, int y, PIXELCOLOR c) {
  U8 page = (y+LCD_FIRSTSEG0)>>3;
  U8 mask = 1<<((y+LCD_FIRSTSEG0)&7);
  U8 aData[2];
  U8* pCache = &Cache[page][x][0];
/* Read data from cache into 2 byte array */
  aData[0] = *pCache;
  aData[1] = *(pCache+1);
/* Write Data into array */
  if (c&(1<<1))
    aData[0] |= mask;
  else
    aData[0] &= ~mask;
  if (c&(1<<0))
    aData[1] |=  mask;
  else
    aData[1] &= ~mask;
/* Check if we need to write */
  if ((*pCache == aData[0]) &&  (*(pCache+1) == aData[1]))
    return;
/* Write modified data back into cache */
  *pCache    = aData[0];
  *(pCache+1) = aData[1];
/* Write data from cache into 2 byte array */
  WRITE_VMEM_PAIR(page, x, &aData[0]);
}

static PIXELCOLOR _GetPixel(int x, int y) {
  PIXELCOLOR col=0;
  U8 page = (y+LCD_FIRSTSEG0)>>3;
  U8 mask = 1<<((y+LCD_FIRSTSEG0)&7);
  if (Cache[page][x][0] & mask)
    col|=(1<<1);
  if (Cache[page][x][1] & mask)
    col|=(1<<0);
  return col;
}

static void XorPixel   (int x, int y) {
  PIXELCOLOR Index = _GetPixel(x,y);
  _SetPixel(x,y, LCD_NUM_COLORS-1-Index);
}

static void XorPixel_Data(int x, int y, PIXELCOLOR c) {
  PIXELCOLOR Index = _GetPixel(x,y);
  _SetPixel(x,y,Index^c);
}

/*
        *********************************************************
        *                                                       *
        *                  LCD_GetPixelIndex                    *
        *                                                       *
        *********************************************************
*/
unsigned LCD_L0_GetPixelIndex(int x, int y) {
  return GETPIXEL(x,y);
  /*return _GetPixel(x,y);*/
}

/*
        *********************************************************
        *                                                       *
        *       LCD_L0_XorPixel                                 *
        *                                                       *
        *********************************************************

Purpose:  This routine is called by emWin. It writes 1 pixel into the
          display.

*/

void LCD_L0_XorPixel(int x, int y) {
  XORPIXEL(x, y);
}

/*
        *********************************************************
        *                                                       *
        *       LCD_L0_SetPixelIndex                            *
        *                                                       *
        *********************************************************

Purpose:  This routine is called by emWin. It writes 1 pixel into the
          display.

*/
void LCD_L0_SetPixelIndex(int x, int y, int ColorIndex) {
  SETPIXEL(x, y, ColorIndex);
}



/*
        *********************************************************
        *                                                       *
        *          LCD_L0_DrawHLine unoptimized                    *
        *                                                       *
        *********************************************************
*/

void LCD_L0_DrawHLine  (int x0, int y,  int x1) {
  LCD_KICK_WATCHDOG();
  if (LCD_DrawMode & LCD_DRAWMODE_XOR) {
    while (x0 <= x1) {
      XORPIXEL(x0, y);
      x0++;
    }
  } else {
    while (x0 <= x1) {
      SETPIXEL(x0, y, COLOR);
      x0++;
    }
  }
}


/*
        *********************************************************
        *                                                       *
        *          LCD_L0_DrawVLine no optimization                *
        *                                                       *
        *********************************************************
*/

void LCD_L0_DrawVLine  (int x, int y0,  int y1) {
  LCD_KICK_WATCHDOG();
  if (LCD_DrawMode & LCD_DRAWMODE_XOR) {
    while (y0 <= y1) {
      XORPIXEL(x, y0);
      y0++;
    }
  } else {
    while (y0 <= y1) {
      SETPIXEL(x, y0, COLOR);
      y0++;
    }
  }
}


/*
        *********************************************************
        *                                                       *
        *          LCD_FillRect, no swap, optimized             *
        *                                                       *
        *********************************************************
*/

#if (!LCD_SWAP_XY) && (LCD_OPTIMIZE)

static const U8 aStartMask[] = { 255, 255-1, 255-3, 255-7, 255-15, 255-31, 255-63, 255-127 };
static const U8 aEndMask[] = { 1,3,7,15,31,63,127,255 };

void LCD_L0_FillRect(int x0, int y0, int x1, int y1) {
  U8 MaskStart, MaskEnd;
  U8 Page, Page0, Page1;
  int x;
  #if LCD_MIRROR_X
    #define X0 (LCD_XSIZE - 1 - x1)
    #define X1 (LCD_XSIZE - 1 - x0)
  #else
    #define X0 x0
    #define X1 x1
  #endif
  #if LCD_MIRROR_Y
    #define Y0 (LCD_YSIZE - 1 - y1)
    #define Y1 (LCD_YSIZE - 1 - y0)
  #else
    #define Y0 y0
    #define Y1 y1
  #endif
  if ((LCD_DrawMode & LCD_DRAWMODE_XOR) ==0) {
    MaskStart = aStartMask[Y0&7];
    MaskEnd   = aEndMask[Y1&7];
    Page0     = Y0>>3;
    Page1     = Y1>>3;
    for (Page =Page0; Page<= Page1; Page++) {
      U8 Mask =0xff;
      if (Page==Page0) {
        Mask  = MaskStart;
      }
      if (Page==Page1) {
        Mask &= MaskEnd;
      }
      for (x=X0; x<=X1; x++) {
        U8 aData[2];
        aData[0] = Cache[Page][x][0];
        aData[1] = Cache[Page][x][1];
        if (COLOR&(1<<1)) {
          aData[0] |= Mask;
        } else {
          aData[0] &= ~Mask;
        }
        if (COLOR&(1<<0)) {
          aData[1] |= Mask;
        } else {
          aData[1] &= ~Mask;
        }
        if (memcmp(&aData[0], &Cache[Page][x],2)) {
          Cache[Page][x][0]      = aData[0];
          Cache[Page][x][1]      = aData[1];
          WRITE_VMEM_PAIR(Page, x, &aData[0]);
        }
      }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区美女视频| 久久不见久久见中文字幕免费| 国产无人区一区二区三区| 欧美一级欧美三级在线观看| 欧美视频在线一区二区三区| 色网综合在线观看| 91久久精品一区二区三| 99在线视频精品| 国产99久久久久| 成人污污视频在线观看| 国产.欧美.日韩| 粉嫩av亚洲一区二区图片| 风流少妇一区二区| thepron国产精品| 99久久久久久99| 91免费看`日韩一区二区| 91在线观看美女| 色欧美88888久久久久久影院| 91论坛在线播放| 日本精品视频一区二区三区| 色94色欧美sute亚洲线路一久 | 成人av综合在线| www.欧美日韩| 欧洲精品在线观看| 欧美精品欧美精品系列| 日韩欧美成人激情| 国产欧美一区二区精品性色| 亚洲欧美综合色| 亚洲一区二区在线免费看| 婷婷综合五月天| 久久99深爱久久99精品| 成人深夜视频在线观看| 精品国产三级a在线观看| 国产午夜精品久久久久久久| 3d动漫精品啪啪| 欧美大胆一级视频| 国产精品乱人伦| 日韩精品一区二区三区三区免费| 日本久久电影网| 日韩色视频在线观看| 福利一区在线观看| 成人黄色777网| 国产麻豆精品久久一二三| 日日摸夜夜添夜夜添亚洲女人| 老司机一区二区| jlzzjlzz亚洲日本少妇| 欧美精品日日鲁夜夜添| 久久久国际精品| 一区二区欧美国产| 美脚の诱脚舐め脚责91| 99视频一区二区三区| 欧美日韩mp4| 欧美国产1区2区| 午夜视频在线观看一区二区| 国产毛片精品一区| 欧美色图天堂网| 26uuu色噜噜精品一区| 亚洲欧美国产三级| 久久成人免费日本黄色| 在线精品视频免费观看| 久久久99久久| 日韩极品在线观看| av电影天堂一区二区在线| 欧美一区在线视频| 亚洲另类在线制服丝袜| 加勒比av一区二区| 欧美伊人久久大香线蕉综合69 | 欧美日韩国产高清一区二区三区 | 国产精品剧情在线亚洲| 日本麻豆一区二区三区视频| 99免费精品视频| 精品国产一二三| 亚洲国产sm捆绑调教视频| 成人h版在线观看| 日韩免费一区二区| 亚洲小少妇裸体bbw| 高清不卡在线观看| 久久中文字幕电影| 日产国产欧美视频一区精品 | 久久久久久久久久久电影| 亚洲综合精品自拍| 99re这里只有精品6| 久久综合九色综合97婷婷女人 | 久久精品亚洲乱码伦伦中文| 激情五月婷婷综合| 国产欧美一区二区精品久导航| 天堂资源在线中文精品| 风间由美一区二区三区在线观看| 久久理论电影网| 国产91丝袜在线18| 久久亚洲捆绑美女| 成人午夜av在线| 91尤物视频在线观看| 日韩西西人体444www| 首页国产欧美久久| 在线观看av不卡| 亚洲欧美日韩国产另类专区| 丰满亚洲少妇av| 精品久久久久久久久久久久久久久| 亚洲sss视频在线视频| 欧美综合色免费| 亚洲色图视频网站| 99久久综合精品| 亚洲丝袜美腿综合| 99久久精品99国产精品| 国产精品美女久久久久久| 国产风韵犹存在线视精品| 精品久久99ma| 麻豆国产精品官网| 欧美mv日韩mv国产网站| 美女性感视频久久| 精品久久久久久亚洲综合网| 蜜桃av一区二区三区电影| 欧美一级午夜免费电影| 久久精品噜噜噜成人88aⅴ| 欧美一区二区精美| 日韩电影在线看| 日韩一级片在线播放| 激情六月婷婷久久| 国产日韩欧美不卡| gogo大胆日本视频一区| **网站欧美大片在线观看| 91亚洲精品久久久蜜桃| 夜夜揉揉日日人人青青一国产精品| 91欧美激情一区二区三区成人| 亚洲三级免费观看| 欧美无砖砖区免费| 免费xxxx性欧美18vr| 久久嫩草精品久久久精品| 不卡av免费在线观看| 亚洲精品自拍动漫在线| 欧美日韩国产另类不卡| 欧美色精品天天在线观看视频| 日本一不卡视频| 欧美xxxx在线观看| 大白屁股一区二区视频| 亚洲欧美色综合| 欧美精品一级二级| 国产在线国偷精品产拍免费yy| 国产精品天天摸av网| 在线中文字幕不卡| 久久99久久精品欧美| 国产精品美女久久久久久久久久久 | aa级大片欧美| 亚洲国产一二三| 精品99一区二区三区| 99久久久久免费精品国产| 日韩在线观看一区二区| 国产欧美日韩视频在线观看| 91福利在线看| 韩国一区二区三区| 亚洲美女淫视频| 精品国产乱码久久久久久夜甘婷婷| 成人精品亚洲人成在线| 亚洲成人一二三| 中文字幕国产精品一区二区| 色播五月激情综合网| 久久99国产精品成人| 中文字幕亚洲成人| 91精品国产黑色紧身裤美女| 成人精品免费视频| 日本麻豆一区二区三区视频| 欧美国产视频在线| 91精品久久久久久久99蜜桃| 成人黄色一级视频| 亚洲一区电影777| 欧美国产日本韩| 5858s免费视频成人| 91在线看国产| 国产专区综合网| 亚洲成人一区二区在线观看| 国产精品嫩草久久久久| 91麻豆精品国产91久久久资源速度| 亚洲第一会所有码转帖| 视频在线观看一区| 精品国产乱码久久久久久蜜臀| 午夜精品久久久久久久蜜桃app| 久久精品国产久精国产爱| 成人黄色在线网站| 久久色.com| 秋霞成人午夜伦在线观看| 成人理论电影网| 欧美videos中文字幕| 一区av在线播放| 欧美日产国产精品| 久久综合久色欧美综合狠狠| 亚洲综合免费观看高清完整版在线| 亚洲mv大片欧洲mv大片精品| 91小视频在线观看| 国产在线不卡视频| 日本不卡高清视频| 亚洲成人一区二区| 一区二区三区中文字幕| 国产精品国产成人国产三级| 欧美精品一区二区三区视频| 91精品国产福利在线观看| 欧美日韩电影在线播放| 91国偷自产一区二区三区成为亚洲经典| 国产精品自拍在线| 国产在线精品视频|