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

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

?? lcd159a.c

?? 使用coderwarrior打開 內含中文字庫
?? C
?? 第 1 頁 / 共 3 頁
字號:
/*
*********************************************************************************************************
*                                                uC/GUI
*                        Universal graphic software for embedded applications
*
*                       (c) Copyright 2002, Micrium Inc., Weston, FL
*                       (c) Copyright 2002, SEGGER Microcontroller Systeme GmbH
*
*              礐/GUI is protected by international copyright laws. Knowledge of the
*              source code may not be used to write a similar product. This file may
*              only be used in accordance with a license and should not be redistributed
*              in any way. We appreciate your understanding and fairness.
*
----------------------------------------------------------------------
File        : LCD159A.C
Purpose     : Driver for LCDs using a Seiko Epson SED159A controller
----------------------------------------------------------------------   
Version-Date---Author-Explanation                                        
----------------------------------------------------------------------   
1.00b   020204 JE     a) Hardwareinterface routines renamed:
                         ...DATA -> ...A1, ...CMD -> ...A0
1.00a   010926 JE     a) Support for LCD_SWAPXY added
1.00.00 010710 JE     a) Speed optimizations added
0.90.00 010709 JE     a) First release
---------------------------LIST OF CONFIG SWITCHES--------------------
The following is a list of additional configuration switches for this
driver. These switches might not be listed in the manual, because
the manual mainly covers the general config switches which are
supported by all drivers.
----------------------------------------------------------------------
define ----------------------Explanation------------------------------
LCD_OPTIMIZE                 Controls the use of optimized routines.
                             If 1, several (speed) optimizations are used.
                             Default: ON (1)
----------------------------------------------------------------------
Known problems or limitations with current version
----------------------------------------------------------------------
a) Cache not supported yet, becuse RAM requirement would be 
   to large. LCD_CACHE must be set to 0
----------------------------------------------------------------------
Open issues
----------------------------------------------------------------------
none
---------------------------END-OF-HEADER------------------------------
*/

#include <string.h>             /* for memset */
#include <stddef.h>           /* needed for definition of NULL */
#include "LCD_Private.h"      /* private modul definitions & config */
#include "GUI_Private.h"
#include "GUIDebug.h"
#include "LCD_0.h"            /* Defines for first display */

#if      (LCD_CONTROLLER == 0x159A) \
      && (!defined(WIN32) | defined(LCD_SIMCONTROLLER))


/*
        *********************************************************
        *
        *           Defaults for config switches
        *
        *********************************************************

*/

#ifndef LCD_OPTIMIZE
  #define LCD_OPTIMIZE                (1)
#endif

#ifndef LCD_CACHE
  #define  LCD_CACHE                  (0)
#endif

/*
        *********************************************************
        *
        *           Defines for simulation
        *
        *********************************************************
*/

#ifdef WIN32
  #undef LCD_WRITE_A0
  #undef LCD_WRITE_A1
  #undef LCD_READ_A0
  #undef LCD_READ_A1
  void SIM_WriteA1C0(U8 Byte);
  void SIM_WriteA0C0(U8 Byte);
  U8   SIM_ReadA1C0(void);
  U8   SIM_ReadA0C0(void);
  #define LCD_WRITE_A1(Byte) SIM_WriteA1C0(Byte) 
  #define LCD_WRITE_A0(Byte) SIM_WriteA0C0(Byte)
  #define LCD_READ_A1(Byte)  Byte = SIM_ReadA1C0()
  #define LCD_READ_A0(Byte)  Byte = SIM_ReadA0C0()
#endif

/*
        *********************************************************
        *
        *          Remap ...A0, ...A1 -> ...CMD, ...DATA
        *
        *********************************************************
*/

#define LCD_READCMD0    LCD_READ_A0
#define LCD_READDATA0   LCD_READ_A1
#define LCD_WRITECMD0   LCD_WRITE_A0
#define LCD_WRITEDATA0  LCD_WRITE_A1

/*
        *********************************************************
        *
        *           Macro calculations
        *
        *********************************************************
*/

/*
        *********************************************************
        *
        *           Configuration switch checking
        *
        *********************************************************
*/

#if (LCD_BITSPERPIXEL != 8)
  #error This controller can handle only 8bpp displays
#endif

/*
        *********************************************************
        *
        *           Macros, standard
        *
        *********************************************************

These macros can be found in any LCD-driver as they serve purposes
that can be found in any class of LCD-driver (Like clipping).

*/

#if (!LCD_SWAP_XY) && (!LCD_MIRROR_X) && (!LCD_MIRROR_Y)
  #define LOG2PHYS(x, y) x, y
#elif (!LCD_SWAP_XY) && (!LCD_MIRROR_X) && (LCD_MIRROR_Y)
  #define LOG2PHYS(x, y) x, LCD_YSIZE_PHYS - 1 - (y)
#elif (!LCD_SWAP_XY) && (LCD_MIRROR_X) && (!LCD_MIRROR_Y)
  #define LOG2PHYS(x, y) LCD_XSIZE_PHYS - 1 - (x), y
#elif (!LCD_SWAP_XY) && (LCD_MIRROR_X) && (LCD_MIRROR_Y)
  #define LOG2PHYS(x, y) LCD_XSIZE_PHYS - 1 - (x), LCD_YSIZE_PHYS - 1 - (y)
#elif (LCD_SWAP_XY) && (!LCD_MIRROR_X) && (!LCD_MIRROR_Y)
  #define LOG2PHYS(x, y) y, x
#elif (LCD_SWAP_XY) && (LCD_MIRROR_X) && (!LCD_MIRROR_Y)
  #define LOG2PHYS(x, y) y, LCD_XSIZE - 1 - (x)
#elif (LCD_SWAP_XY) && (!LCD_MIRROR_X) && (LCD_MIRROR_Y)
  #define LOG2PHYS(x, y) LCD_YSIZE - 1 - (y), x
#elif (LCD_SWAP_XY) && (LCD_MIRROR_X) && (LCD_MIRROR_Y)
  #define LOG2PHYS(x, y) LCD_YSIZE - 1 - (y), LCD_XSIZE - 1 - (x)
#else
  #error unsupported configuration
#endif

#define BKCOLOR LCD_BKCOLORINDEX
#define   COLOR LCD_COLORINDEX

/*
        *********************************************************
        *
        *           Static variables for driver
        *
        *********************************************************
*/

#if LCD_CACHE
  static U8 VRam[LCD_YSIZE_PHYS][LCD_XSIZE_PHYS];
#endif

static int CurrentX, CurrentY, StartPage, StartColumn, RAM_Mode;

/*
        *********************************************************
        *
        *           Hardware access
        *
        *********************************************************
*/

/*
        *****************************************
        *
        *           Low level macros
        *
        *****************************************
*/

#define RAM_WRITE (0x5c)
#define RAM_READ  (0x5d)

#define INCREMENT_CURSOR() \
  CurrentX++; \
  if (CurrentX >= LCD_XSIZE_PHYS) { \
    CurrentX = StartColumn; \
    CurrentY++; \
    if (CurrentY >= LCD_YSIZE_PHYS) \
      CurrentY = StartPage; \
  }

#define RESET_CURSOR() \
  CurrentX = StartColumn; \
  CurrentY = StartPage

#define SET_RAMMODE(Mode) \
  RAM_Mode = Mode; \
  LCD_WRITECMD0 (Mode); \
  RESET_CURSOR()

#define PASET(y) \
  RAM_Mode = 0; \
  LCD_WRITECMD0 (0x75); \
  LCD_WRITEDATA0(y); \
  LCD_WRITEDATA0(LCD_YSIZE_PHYS - 1); \
  StartPage = y
  
#define CASET(x) \
  RAM_Mode = 0; \
  LCD_WRITECMD0 (0x15); \
  LCD_WRITEDATA0(x); \
  LCD_WRITEDATA0(LCD_XSIZE_PHYS - 1); \
  StartColumn = x

#define LCD_ON() \
  LCD_WRITECMD0 (0xaf); \
  SET_RAMMODE(RAM_WRITE)

#define LCD_OFF() \
  LCD_WRITECMD0 (0xae); \
  SET_RAMMODE(RAM_WRITE)

#define DUMMYREAD(Data) \
  LCD_READDATA0(Data)

#if (LCD_OPTIMIZE)
  
  #define SET_RECT(x1, y1, x2, y2) \
    CurrentX = CurrentY = 0xfff; \
    LCD_WRITECMD0 (0x15); \
    LCD_WRITEDATA0(x1); \
    LCD_WRITEDATA0(x2); \
    LCD_WRITECMD0 (0x75); \
    LCD_WRITEDATA0(y1); \
    LCD_WRITEDATA0(y2); \
    LCD_WRITECMD0 (0x5c)

  #define WRITEDATA_DIRECT(Data) \
    LCD_WRITEDATA0(Data)

#endif

#if LCD_CACHE

  #define WRITEDATA(Data) \
    if (VRam[CurrentX][CurrentY] != Data) { \
      VRam[CurrentX][CurrentY] = Data; \
      LCD_WRITEDATA0(Data); \
    } \
    INCREMENT_CURSOR()

  #define READDATA(Data) \
    Data = VRam[CurrentX][CurrentY]

#else

  #define WRITEDATA(Data) \
    LCD_WRITEDATA0(Data); \
    INCREMENT_CURSOR()

  #define READDATA(Data) \
    LCD_READDATA0(Data); \
    INCREMENT_CURSOR()

#endif

/*
        *****************************************
        *
        *           GotoXY
        *
        *****************************************
*/

void GotoXY(int x, int y, int Mode) {
  if ((CurrentX != x) || (CurrentY != y)) {
    CASET(x);
    PASET(y);
  }
  if (RAM_Mode != Mode) {
    SET_RAMMODE(Mode);
  }
}

#define GOTOXY(x, y, Mode) GotoXY(x, y, Mode)

/*
        *********************************************************
        *
        *           Drawing routines, internal
        *
        *********************************************************
*/

/*
        *****************************************
        *
        *           SET pixel
        *
        *****************************************
*/

static void SetPixel(int x, int y, U8 Color) {
  GOTOXY(x, y, RAM_WRITE);
  WRITEDATA(Color);
}

/*
        *****************************************
        *
        *           GET pixel
        *
        *****************************************
*/

static U8 GetPixel(int x, int y) {
  U8 Color;
  CASET(x);
  PASET(y);
  SET_RAMMODE(RAM_READ);
  DUMMYREAD(Color);
  READDATA(Color);
  return Color;
}

/*
        *****************************************
        *
        *           XOR pixel
        *
        *****************************************
*/

static void XorPixel(int x, int y) {
  U8 Color = GetPixel(x, y);
  Color ^= 0xff;
  SET_RAMMODE(RAM_WRITE);
  WRITEDATA(Color);
}

/*
        *********************************************************
        *
        *           Access macros for pixel access
        *
        *********************************************************

Use only this macros for pixel access

*/

#define XORPIXEL(x, y) \
  XorPixel(LOG2PHYS(x, y));

#define SETPIXEL(x, y, Color) \
  SetPixel(LOG2PHYS(x, y), Color);

#define GETPIXEL(x, y, Color) \
  Color = GetPixel(LOG2PHYS(x, y));

/*
        *********************************************************
        *
        *           Exported routines
        *
        *********************************************************
*/

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

unsigned int LCD_L0_GetPixelIndex(int x, int y) {
  U8 ColorIndex;
  GETPIXEL(x, y, ColorIndex);
  return ColorIndex;
}

/*
        *****************************************
        *
        *           LCD_L0_DrawPixel
        *
        *****************************************
*/

void LCD_L0_DrawPixel(int x, int y) {
  SETPIXEL(x, y, COLOR);
}

/*
        ****************************************
        *
        *           LCD_DrawHLine
        *
        ****************************************
*/

#if  (LCD_OPTIMIZE)  \
  && (!LCD_MIRROR_X) \
  && (!LCD_MIRROR_Y) \
  && (!LCD_SWAP_XY)

void LCD_L0_DrawHLine  (int x0, int y,  int x1) {
  if (GUI_Context.DrawMode & LCD_DRAWMODE_XOR) {
    while (x0 <= x1) {
      XORPIXEL(x0, y);
      x0++;
    }
  } else {
    SET_RECT(x0, y, x1, y);
    while (x0++ <= x1) {
      WRITEDATA_DIRECT(COLOR);
    }
  }
}

#else

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

#endif

/*
        ****************************************
        *
        *           LCD_DrawVLine
        *
        ****************************************
*/

#if  (LCD_OPTIMIZE)  \
  && (!LCD_MIRROR_X) \
  && (!LCD_MIRROR_Y) \
  && (!LCD_SWAP_XY)

void LCD_L0_DrawVLine  (int x, int y0,  int y1) {
  if (GUI_Context.DrawMode & LCD_DRAWMODE_XOR) {
    while (y0 <= y1) {
      XORPIXEL(x, y0);
      y0++;
    }
  } else {
    SET_RECT(x, y0, x, y1);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品视频在线看| 日韩免费在线观看| 国产激情视频一区二区在线观看| 亚洲一区二区在线免费观看视频| 国产亚洲精品免费| 日韩一级免费一区| 欧美性猛交xxxx乱大交退制版 | 欧美一级一区二区| 91麻豆免费视频| 成人免费视频app| 国产美女一区二区| 捆绑调教一区二区三区| 性做久久久久久久久| 亚洲天堂免费看| 国产精品国产三级国产| 国产欧美一区二区三区网站 | 午夜av一区二区| 亚洲男人的天堂在线aⅴ视频| 国产欧美日韩精品a在线观看| 日韩欧美一二三| 日韩亚洲欧美成人一区| 欧美精选午夜久久久乱码6080| 色哟哟日韩精品| 日本韩国精品在线| 色综合天天综合在线视频| 成人黄色国产精品网站大全在线免费观看| 激情图片小说一区| 国产一区二区三区在线观看精品 | 欧美高清视频www夜色资源网| 欧美在线你懂的| 色欧美片视频在线观看| 91极品视觉盛宴| 欧美日韩免费观看一区二区三区 | 久久综合九色欧美综合狠狠 | 欧美一区二区三区四区在线观看| 欧美熟乱第一页| 欧美日韩国产中文| 在线观看亚洲一区| 91麻豆自制传媒国产之光| 色婷婷av一区| 欧美挠脚心视频网站| 欧美一区二区视频在线观看2022| 欧美大片国产精品| 国产亚洲欧美在线| 国产精品私房写真福利视频| 国产精品美女一区二区在线观看| 亚洲一二三四区不卡| 成人性生交大片免费看中文| 色综合久久久久综合体桃花网| 91精品婷婷国产综合久久竹菊| 国产午夜亚洲精品理论片色戒| 日本一区二区电影| 粉嫩高潮美女一区二区三区| 一本色道久久综合亚洲aⅴ蜜桃| 亚洲色图制服诱惑 | 国产欧美一区二区精品性| 日韩欧美国产高清| 成人午夜精品在线| 97久久精品人人做人人爽| 欧美影院一区二区三区| 在线亚洲+欧美+日本专区| 2023国产精品自拍| 中文字幕久久午夜不卡| 日韩高清一区二区| 国产精品一品二品| 欧美日韩精品一区二区三区蜜桃| 亚洲精品一区二区三区影院| 亚洲尤物视频在线| 狠狠色丁香九九婷婷综合五月| 欧美影院一区二区三区| ww亚洲ww在线观看国产| 亚洲国产乱码最新视频 | 国产成人精品影视| 91.com视频| 亚洲国产成人午夜在线一区| 五月婷婷综合网| 粉嫩绯色av一区二区在线观看| 欧美年轻男男videosbes| 亚洲国产精华液网站w| 亚洲综合一区在线| 国产91精品一区二区麻豆网站| 日韩免费电影一区| 亚洲天堂成人在线观看| 国产91精品免费| 欧美一卡2卡3卡4卡| 亚洲成人精品一区| 国产成人免费在线视频| 精品福利一区二区三区| 亚洲人成网站在线| 懂色av一区二区夜夜嗨| 欧美一区二区不卡视频| 亚洲成人一区二区在线观看| jizz一区二区| 国产欧美一区二区在线| 蜜桃久久av一区| 欧美一级在线观看| 亚洲一区免费观看| 在线免费观看日本一区| 国产精品第四页| 99国内精品久久| 久久影音资源网| 久久国内精品自在自线400部| 欧美日韩国产综合视频在线观看| 亚洲成人av资源| 91论坛在线播放| 一区二区三区四区在线| aaa亚洲精品一二三区| 最新中文字幕一区二区三区| 国产精品影音先锋| 国产视频911| 精品一二线国产| 日韩一级黄色片| 奇米精品一区二区三区在线观看一| 在线一区二区观看| 亚洲二区视频在线| 91国模大尺度私拍在线视频| 亚洲精品久久久蜜桃| 99久久国产综合色|国产精品| 亚洲色欲色欲www| 91丨porny丨国产| 一区二区激情小说| 在线日韩一区二区| 日韩成人av影视| 制服视频三区第一页精品| 卡一卡二国产精品| 91精品久久久久久蜜臀| 久草这里只有精品视频| 久久九九久精品国产免费直播| 国产乱色国产精品免费视频| 国产精品区一区二区三| 色综合一区二区三区| 亚洲午夜一区二区| 制服丝袜亚洲色图| 国产伦精一区二区三区| 国产日韩一级二级三级| 99re66热这里只有精品3直播 | 午夜日韩在线电影| 日韩欧美精品在线视频| 欧美aaaaaa午夜精品| 精品美女在线播放| 成熟亚洲日本毛茸茸凸凹| 国产精品九色蝌蚪自拍| 欧美日韩在线综合| 亚洲超碰97人人做人人爱| 精品少妇一区二区三区在线视频| 国模大尺度一区二区三区| 中文字幕视频一区| 在线观看日韩毛片| 久久精品国产成人一区二区三区| 久久久噜噜噜久久人人看 | 欧美一区二区播放| 国产91在线|亚洲| 一区二区在线观看视频在线观看| 欧美一区二区三级| 国产精品69久久久久水密桃| 一区二区三区在线观看动漫 | 日韩精品一级中文字幕精品视频免费观看 | 国产精品久久久久久久久免费相片| 99精品国产一区二区三区不卡| 蜜臀久久久久久久| 国产区在线观看成人精品| 在线视频观看一区| 麻豆91在线播放免费| 亚洲欧美日韩人成在线播放| 91精品国产一区二区人妖| 国产99久久久国产精品潘金网站| 亚洲欧美一区二区不卡| 日韩区在线观看| k8久久久一区二区三区| 老司机午夜精品99久久| 国产精品久久久久久久久免费丝袜 | 一区二区三区免费看视频| 日韩一区二区在线观看视频| 91亚洲精品乱码久久久久久蜜桃| 午夜精品免费在线观看| 国产精品久久久久久久第一福利| 欧美美女bb生活片| 99re8在线精品视频免费播放| 亚洲综合小说图片| 国产精品短视频| 精品奇米国产一区二区三区| 91在线国产福利| 国产毛片精品视频| 亚洲第一搞黄网站| 亚洲人成网站在线| 2020国产成人综合网| 欧美日韩和欧美的一区二区| 丁香六月综合激情| 久久er精品视频| 亚洲一区二区三区小说| 1区2区3区国产精品| 精品日产卡一卡二卡麻豆| 欧美一区二区三区性视频| 91视频在线观看| 99久久国产综合精品女不卡| 青青草伊人久久| 天天av天天翘天天综合网色鬼国产| 国产日产亚洲精品系列| 欧美videofree性高清杂交| 在线电影一区二区三区|