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

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

?? lcd15xx.c

?? uCOS/uCGUI在2440上的移植
?? C
?? 第 1 頁 / 共 5 頁
字號:
static int DataCacheY1;

#if LCD_SUPPORT_COMTRANS
  static int DataCacheYBit0;
#else
  #define DataCacheYBit0 DataCacheY0
#endif

/*
        *****************************************
        *                                       *
        *         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.

*/

static void SetPage0(void) {
  SET_PAGE0(Page);
  aPage[0] = Page;
}

#if (LCD_NUM_CONTROLLERS > 1)
static void SetPage1(void) {
  SET_PAGE1(Page);
  aPage[1] = Page;
}
#endif

#if (LCD_NUM_CONTROLLERS > 2)
static void SetPage2(void) {
  SET_PAGE2(Page);
  aPage[2] = Page;
}
#endif

#if (LCD_NUM_CONTROLLERS > 3)
static void SetPage3(void) {
  SET_PAGE3(Page);
  aPage[3] = Page;
}
#endif

/*
        *****************************************
        *                                       *
        *         Set column routines           *
        *                                       *
        *****************************************
*/

static void SetCAdr0(void) {
  #if LCD_SEGOFF0
    U8 ColP = Col+LCD_SEGOFF0;
  #else
    #define ColP Col
  #endif
  SET_CADR0(ColP);
  aCAdr[0] = Col;
  #if !LCD_SEGOFF0
    #undef ColP
  #endif
}

#if (LCD_NUM_CONTROLLERS > 1)
static void SetCAdr1(void) {
  #if LCD_SEGOFF1
    U8 ColP = Col+LCD_SEGOFF1;
  #else
    #define ColP Col
  #endif
  SET_CADR1(ColP);
  aCAdr[1] = Col;
  #if !LCD_SEGOFF1
    #undef ColP
  #endif
}
#endif

#if (LCD_NUM_CONTROLLERS > 2)
static void SetCAdr2(void) {
  #if LCD_SEGOFF2
    U8 ColP = Col+LCD_SEGOFF2;
  #else
    #define ColP Col
  #endif
  SET_CADR2(ColP);
  aCAdr[2] = Col;
  #if !LCD_SEGOFF2
    #undef ColP
  #endif
}
#endif

#if (LCD_NUM_CONTROLLERS > 3)
static void SetCAdr3(void) {
  #if LCD_SEGOFF3
    U8 ColP = Col+LCD_SEGOFF3;
  #else
    #define ColP Col
  #endif
  SET_CADR3(ColP);
  aCAdr[3] = Col;
  #if !LCD_SEGOFF3
    #undef ColP
  #endif
}
#endif

/*
        *****************************************
        *                                       *
        *        Read video memory routines     *
        *                                       *
        *****************************************
*/

#if !LCD_CACHE
  static U8 ReadVMem0() {
    if (Page !=aPage[0])
      SetPage0();
    if (Col != aCAdr[0])
      SetCAdr0();
    aCAdr[0]+=2;
    LCD_ReadData0(Data);        /* Dummy read */
    return LCD_ReadData0(Data);
  }
#else
  #define ReadVMem0() (*pCacheByte)
#endif
#if (LCD_NUM_CONTROLLERS > 1)
  #if !LCD_CACHE
    U8 ReadVMem1() {
      if (Page !=aPage[1])
        SetPage1();
      if (Col != aCAdr[1])
        SetCAdr1();
      aCAdr[1]+=2;
      LCD_ReadData1(Data);      /* Dummy read */
      return LCD_ReadData1(Data);
    }
  #else
    #define ReadVMem1() (*pCacheByte)
  #endif
#endif /* LCD_NUM_CONTROLLERS >1 */
#if (LCD_NUM_CONTROLLERS > 2)
  #if !LCD_CACHE
    U8 ReadVMem2() {
      if (Page !=aPage[2])
        SetPage2();
      if (Col != aCAdr[2])
        SetCAdr2();
      aCAdr[2]+=2;
      LCD_ReadData2(Data);      /* Dummy read */
      return LCD_ReadData2(Data);
    }
  #else
    #define ReadVMem2() (*pCacheByte)
  #endif
#endif
#if (LCD_NUM_CONTROLLERS > 3)
  #if !LCD_CACHE
    U8 ReadVMem3() {
      if (Page !=aPage[3])
        SetPage3();
      if (Col != aCAdr[3])
        SetCAdr3();
      aCAdr[3]+=2;
      LCD_ReadData3(Data);      /* Dummy read */
      return LCD_ReadData3(Data);
    }
  #else
    #define ReadVMem3() (*pCacheByte)
  #endif
#endif

/*
        *****************************************
        *                                       *
        *       Write video memory routines     *
        *                                       *
        *****************************************
*/

#if  LCD_SUPPORT_CACHECONTROL
  #define CHECK_CACHE_LOCK(Con)                          \
  if (CacheLocked) {                                     \
    U8 ColOff = Col -LCD_FIRSTSEG##Con;                  \
    U8 Bit = ColOff&7;                                   \
    aaCacheDirtyTag##Con[Page][ColOff>>3] |= (1<<Bit);   \
    CacheStat = 1;         /* Mark cache as dirty */     \
    return;                                              \
  }
#else
  #define CHECK_CACHE_LOCK(LCDCON)
#endif
#define WRITE_VMEM(Con)             \
  CHECK_CACHE_LOCK(Con);            \
  if (Page !=aPage[Con])            \
    SetPage##Con();                 \
  if (Col != aCAdr[Con])            \
    SetCAdr##Con();                 \
  LCD_LOCK();                       \
  WRITE_DATA##Con(DataW_Cache);          \
  LCD_UNLOCK();                     \
  aCAdr[Con]++;

#if !LCD_CACHE_WRITETHRU
  #define RETURN_IF_WRITE_NOT_NEEDED(Con) \
    if ( *pCacheByte == DataW_Cache) \
      return;
#else
  #define RETURN_IF_WRITE_NOT_NEEDED(Con)
#endif

#if LCD_CACHE
  #define CHECK_VMEM_CACHE(Con) \
    RETURN_IF_WRITE_NOT_NEEDED(Con);                                \
    *pCacheByte = DataW_Cache;
#else
  #define CHECK_VMEM_CACHE(Con)
#endif

static void WriteVMem0(void) {
  CHECK_VMEM_CACHE(0);
  WRITE_VMEM(0);
}

#if (LCD_NUM_CONTROLLERS > 1)
static void WriteVMem1(void) {
  CHECK_VMEM_CACHE(1);
  WRITE_VMEM(1);
}
#endif

#if (LCD_NUM_CONTROLLERS > 2)
static void WriteVMem2(void) {
  CHECK_VMEM_CACHE(2);
  WRITE_VMEM(2);
}
#endif

#if (LCD_NUM_CONTROLLERS > 3)
static void WriteVMem3(void) {
  CHECK_VMEM_CACHE(3);
  WRITE_VMEM(3);
}
#endif

/*
  ********************************************************************
  *                                                                  *
  *                Write Cache control                               *
  *                                                                  *
  ********************************************************************

In order to speed up access to the LCD and to avoid flickering, it
can be necessary to lock the write cache. This means that all drawing
commands do not affect the hardware it the cache is locked until
the flush (or unlock) command is given.

Note: The code could be shortened a bit by defining an add. macro
      for the code for every controller. This has not been done
      because it would make debugging even harder.
      (It is already hard enough)
*/

#define CHECK_CACHE_BYTE_DIRTY(Controller,Bit)   \
  if (Dirty&(1<<Bit)) {                          \
    if (page !=aPage[Controller]) {              \
      Page = page;                               \
      SetPage##Controller();                     \
    }                                            \
    if (col+Bit != aCAdr[Controller]) {        \
      Col = col+Bit;                             \
      SetCAdr##Controller();                     \
    }                                            \
    LCD_WriteData##Controller(Cache##Controller[page][col+Bit]); \
    aCAdr[Controller]++;                         \
  }
    
#define FLUSH_CACHE_X(Con)                                      \
  for (page=0; page<NUM_PAGES##Con; page++) {					\
    for (col8=0; col8<(NUM_COLS##Con+7)/8; col8++) {			\
      U8 Dirty;													\
      if ((Dirty=aaCacheDirtyTag##Con[page][col8]) !=0) {		\
        int col   = col8<<3;									\
        aaCacheDirtyTag##Con[page][col8] =0;					\
        CHECK_CACHE_BYTE_DIRTY(Con,0);							\
        CHECK_CACHE_BYTE_DIRTY(Con,1);							\
        CHECK_CACHE_BYTE_DIRTY(Con,2);							\
        CHECK_CACHE_BYTE_DIRTY(Con,3);							\
        CHECK_CACHE_BYTE_DIRTY(Con,4);							\
        CHECK_CACHE_BYTE_DIRTY(Con,5);							\
        CHECK_CACHE_BYTE_DIRTY(Con,6);							\
        CHECK_CACHE_BYTE_DIRTY(Con,7);                          \
      }                                                         \
    }															\
  }

#if  LCD_SUPPORT_CACHECONTROL
static void FlushCache(void) {
  int page;
  int col8;     /* Column index, 1 inc skips 8 bytes */
  FLUSH_CACHE_X(0);
  #if (LCD_NUM_CONTROLLERS >1)
    FLUSH_CACHE_X(1);
  #endif
  #if (LCD_NUM_CONTROLLERS >2)
    FLUSH_CACHE_X(2);
  #endif
  #if (LCD_NUM_CONTROLLERS >3)
    FLUSH_CACHE_X(3);
  #endif
/* Important !!!
  We have to make sure that the byte-level cache is not level
  inconsistent because we have modified the Page/Col values. This
  is done by invalidating the x-position. */
  DataCacheX=-1;
}

U8 LCD_L0_ControlCache(U8 cmd) {
  switch (cmd) {
  case LCD_CC_LOCK:   /* Set Cache to lock state.*/
    CacheLocked =1;
    break;
  case LCD_CC_UNLOCK: /* Set Cache to unlock state ... must flush !*/
    CacheLocked =0;
  case LCD_CC_FLUSH:  /* Flush cache */
    if (CacheStat) {
      CacheStat =0;
      FlushCache();
    }
  }
  return CacheStat;
}
#endif

/*
  ********************************************************************
  *                                                                  *
  *                                                                  *
  *         Internal video memory management                         *
  *                                                                  *
  *                                                                  *
  ********************************************************************

This contains the internal video management of this driver, which is
the core of it. It has been designed with the following goals:

+ Support for all types of orientaions of display
+ Support for multiple controllers
+ Support for both parallel and serial interface
+ Small RAM footprint
+ Fast execution on all CPUs in all configurations
+ Small code

It has taken a considerable amount of time to develop, optimize and
test the concept of this driver. It should pretty much cover most LCDs
using 15XX controllers; if you feel your configuration is not covered
by this driver, please get
in contact with us, preferably via email (support@segger.com).

*/

#define FLUSH() if (DataW_Dirty) Flush()

/* For XOR operations, the byte needs to be loaded in order to
   perform the operation. We also have to make sure that bits which
   have been previously modified are not forgotten.
   This essentially means loading only the unmodified bits (for which
   the bit in DATAW_Dirty is ==0) and leave the other ones unchanged.
*/

#define LOADDATA()                               \
  if (!DataR_Valid) {                            \
    ReadData();                                  \
    DataW_Cache &= DataW_Dirty;                  \
    DataW_Cache |= DataR_Cache&(~DataW_Dirty);   \
  }

#if LCD_CACHE
  #define ReadData() DataR_Cache = *pCacheByte; DataR_Valid= 0xff;
#else
static void ReadData(void) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产高清一区二区三区| 在线观看亚洲精品| 日本不卡1234视频| 午夜av一区二区| 日韩精品视频网站| 婷婷六月综合网| 美腿丝袜亚洲综合| 狠狠狠色丁香婷婷综合激情| 国产激情视频一区二区在线观看 | 99久久婷婷国产精品综合| 国产一区在线观看视频| 丰满少妇久久久久久久 | 亚洲男同性恋视频| 亚洲精品国产一区二区精华液| 一区二区三区久久| 蜜臀av性久久久久av蜜臀妖精| 激情综合色综合久久综合| 久久成人av少妇免费| 豆国产96在线|亚洲| 一本一道综合狠狠老| 欧美日韩免费视频| 26uuu色噜噜精品一区| 国产精品美女久久久久久| 亚洲午夜免费福利视频| 理论电影国产精品| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 欧美三级午夜理伦三级中视频| 在线电影欧美成精品| 久久一留热品黄| 亚洲精品少妇30p| 免费在线一区观看| 99精品欧美一区二区三区综合在线| 欧美三级午夜理伦三级中视频| 欧美tickling挠脚心丨vk| 国产精品激情偷乱一区二区∴| 亚洲aaa精品| 成人福利视频在线看| 欧美日韩成人在线| 国产精品免费视频观看| 免费成人在线网站| 色综合天天做天天爱| 久久综合色婷婷| 亚洲成人综合在线| 北岛玲一区二区三区四区| 欧美一区二区三区免费| 自拍偷自拍亚洲精品播放| 韩国女主播成人在线观看| 欧美日韩视频在线观看一区二区三区| 国产亚洲1区2区3区| 三级一区在线视频先锋| 91色视频在线| 欧美激情自拍偷拍| 狠狠狠色丁香婷婷综合激情| 7777精品伊人久久久大香线蕉的 | 日本成人中文字幕在线视频| 99久久精品一区| 国产日韩欧美在线一区| 婷婷开心久久网| 欧美唯美清纯偷拍| 日韩一区欧美小说| 丁香一区二区三区| 国产色产综合产在线视频| 免费国产亚洲视频| 在线电影院国产精品| 天堂va蜜桃一区二区三区漫画版| 91在线免费视频观看| 中文字幕在线播放不卡一区| 国产91在线观看丝袜| 国产女人18毛片水真多成人如厕 | 国产精品欧美一区喷水| 国产一区二区三区四区在线观看 | 国产成+人+日韩+欧美+亚洲| 欧美精品一区二区三区一线天视频| 天天综合日日夜夜精品| 欧美色电影在线| 丝袜诱惑制服诱惑色一区在线观看 | 久久机这里只有精品| 精品国产一区久久| 国产福利一区二区三区| 日本一区二区三区视频视频| 丁香婷婷综合激情五月色| 中文字幕第一区| 欧美影院一区二区三区| 亚洲r级在线视频| 日韩一级在线观看| 国产精品一级二级三级| 国产精品―色哟哟| 色欧美片视频在线观看在线视频| 亚洲国产成人精品视频| 精品久久国产97色综合| 国产精品影音先锋| 中文字幕一区二区在线观看| 91亚洲午夜精品久久久久久| 天天影视色香欲综合网老头| 精品盗摄一区二区三区| 国产成人免费在线视频| 亚洲综合另类小说| 日韩欧美国产系列| 成人97人人超碰人人99| 亚洲高清中文字幕| 精品999在线播放| 99re这里只有精品首页| 日本欧美一区二区三区| 国产日产欧美一区二区三区| 在线看日本不卡| 国产一区欧美二区| 一区二区三区四区中文字幕| 日韩一级二级三级| 99久久精品99国产精品| 天堂午夜影视日韩欧美一区二区| 国产清纯美女被跳蛋高潮一区二区久久w| 91丨porny丨国产| 久久丁香综合五月国产三级网站| 中文字幕一区二区三区不卡| 日韩亚洲欧美高清| 日本韩国欧美三级| 国产精品一级在线| 日韩影视精彩在线| 中文字幕日韩一区| 日韩精品中文字幕在线一区| 色呦呦一区二区三区| 国产美女视频91| 日日骚欧美日韩| 亚洲精品乱码久久久久久日本蜜臀| 欧美大肚乱孕交hd孕妇| 91福利视频久久久久| 丰满亚洲少妇av| 精久久久久久久久久久| 亚洲成人资源网| 亚洲精品你懂的| 国产精品美女久久久久aⅴ| 日韩精品一区二区三区四区| 欧美人伦禁忌dvd放荡欲情| 99久久精品费精品国产一区二区| 国产高清在线精品| 久久福利视频一区二区| 日韩不卡免费视频| 日韩精品五月天| 石原莉奈在线亚洲二区| 亚洲综合免费观看高清完整版在线| 中文字幕一区日韩精品欧美| 国产精品亲子乱子伦xxxx裸| www一区二区| 精品不卡在线视频| 欧美大片一区二区| 欧美精品一区二区三区在线| 欧美成人伊人久久综合网| 91精品国产91久久久久久最新毛片| 欧美日韩免费高清一区色橹橹| 色综合久久综合中文综合网| 99re热视频精品| 91丨porny丨中文| 在线精品视频免费观看| 在线免费精品视频| 欧美日韩国产一级| 91精品免费在线| 精品久久久久久久久久久久包黑料| 日韩一区二区麻豆国产| 久久免费精品国产久精品久久久久| 精品sm捆绑视频| 国产精品女同一区二区三区| 亚洲免费观看高清| 亚洲成人一区二区在线观看| 日韩国产精品91| 精品一区二区av| 国产成a人亚洲| 在线欧美小视频| 日韩欧美一区二区久久婷婷| 欧美精品一区二区三区久久久| 国产亚洲视频系列| 日韩一区在线免费观看| 亚洲成人av一区二区三区| 蜜臀av国产精品久久久久 | 亚洲视频中文字幕| 亚洲精品国产第一综合99久久| 亚洲图片欧美视频| 久久99精品视频| 99久久综合色| 欧美裸体bbwbbwbbw| 精品日韩成人av| 国产精品不卡一区| 青青草91视频| www.欧美.com| 日韩一卡二卡三卡| 综合激情成人伊人| 久久成人羞羞网站| 91麻豆自制传媒国产之光| 日韩一区二区不卡| 亚洲精品中文在线影院| 精品亚洲aⅴ乱码一区二区三区| 91网站在线观看视频| 欧美一区二区三区男人的天堂| 国产精品久久久久久久久久久免费看| 亚洲sss视频在线视频| 成人性生交大片免费看在线播放| 欧美人妖巨大在线| 自拍偷拍亚洲激情| 国产成人综合在线观看| 91精品国模一区二区三区| 中文字幕一区二区三区不卡|