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

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

?? lcd.c

?? Samsung ARM7 s3c44b0 + uC-OSii + uC-GUI 完美的綜合到了一起
?? C
字號:
/*********************************************************************
*                SEGGER MICROCONTROLLER SYSTEME GmbH                 *
*        Solutions for real time microcontroller applications        *
**********************************************************************
*                                                                    *
*        (c) 2002         SEGGER Microcontroller Systeme GmbH        *
*                                                                    *
*        Internet: www.segger.com    Support:  support@segger.com    *
*                                                                    *
**********************************************************************

**** emWin/GSC Grafical user interface for embedded applications ****
emWin 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 re-
distributed in any way. We appreciate your understanding and fairness.
----------------------------------------------------------------------
File        : LCD.c
Purpose     : Link between GUI and LCD_L0
              Performs most of the clipping.
---------------------------END-OF-HEADER------------------------------
*/

#define LCD_C

#include <stdio.h>
#include "GUI_Private.H"
#include "LCD_Private.h"
#include "GUIDebug.h"

/*
        *********************************************************
        *                                                       *
        *       Macros for internal use                         *
        *                                                       *
        *********************************************************
*/

#define RETURN_IF_Y_OUT() \
  if (y < GUI_Context.ClipRect.y0) return;             \
  if (y > GUI_Context.ClipRect.y1) return;

#define RETURN_IF_X_OUT() \
  if (x < GUI_Context.ClipRect.x0) return;             \
  if (x > GUI_Context.ClipRect.x1) return;

#define CLIP_X() \
  if (x0 < GUI_Context.ClipRect.x0) { x0 = GUI_Context.ClipRect.x0; } \
  if (x1 > GUI_Context.ClipRect.x1) { x1 = GUI_Context.ClipRect.x1; }

#define CLIP_Y() \
  if (y0 < GUI_Context.ClipRect.y0) { y0 = GUI_Context.ClipRect.y0; } \
  if (y1 > GUI_Context.ClipRect.y1) { y1 = GUI_Context.ClipRect.y1; }


/*
        *********************************************************
        *                                                       *
        *       LCD_SetColorIndex                               *
        *       LCD_SetBkColorIndex                             *
        *                                                       *
        *********************************************************
*/
static int GetColorIndex(int i)  /* i is 0 or 1 */ {
  return  (GUI_Context.DrawMode & LCD_DRAWMODE_REV) ? i-1 : i;
}

void LCD_SetColorIndex(int Index)   { LCD_ACOLORINDEX[GetColorIndex(1)] = Index; }
void LCD_SetBkColorIndex(int Index) { LCD_ACOLORINDEX[GetColorIndex(0)] = Index; }

/*
        *********************************************************
        *                                                       *
        *       LCD_SetDrawMode                                 *
        *                                                       *
        *********************************************************

*/
LCD_DRAWMODE LCD_SetDrawMode  (LCD_DRAWMODE dm) {
  LCD_DRAWMODE OldDM = GUI_Context.DrawMode;
  if ((GUI_Context.DrawMode^dm) & LCD_DRAWMODE_REV) {
    LCD_PIXELINDEX temp = LCD_BKCOLORINDEX;
    LCD_BKCOLORINDEX    = LCD_COLORINDEX;
    LCD_COLORINDEX = temp;
  }
  GUI_Context.DrawMode = dm;
  return OldDM;
}


/*
        *********************************************************
        *                                                       *
        *       LCD_DrawPixel                                   *
        *                                                       *
        *********************************************************

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

*/


void LCD_DrawPixel(int x, int y) {
  RETURN_IF_Y_OUT();
  RETURN_IF_X_OUT();
  if (GUI_Context.DrawMode & LCD_DRAWMODE_XOR) {
    LCDDEV_L0_XorPixel(x, y);
  } else {
    LCDDEV_L0_SetPixelIndex(x, y, LCD_COLORINDEX);
  }
}

/*
        *********************************************************
        *                                                       *
        *          LCD_DrawLine  vertical/horizontal            *
        *          LCD_DrawRect                                 *
        *                                                       *
        *********************************************************
*/

void LCD_DrawHLine  (int x0, int y,  int x1) {
  /* Perform clipping and check if there is something to do */
  RETURN_IF_Y_OUT();
  CLIP_X();
  if (x1<x0)
    return;
  /* Call driver to draw */
  LCDDEV_L0_DrawHLine(x0, y, x1);
}

void LCD_FillRect(int x0, int y0, int x1, int y1) {
  /* Perform clipping and check if there is something to do */
  CLIP_X();
  if (x1<x0)
    return;
  CLIP_Y();
  if (y1<y0)
    return;
  /* Call driver to draw */
  LCDDEV_L0_FillRect(x0,y0,x1,y1);
}




/*
    **********************************************************************
    *                                                                    *
    *             Universal draw Bitmap routine                          *
    *                                                                    *
    **********************************************************************
*/
void LCD_DrawBitmap   (int x0, int y0,
                       int xsize, int ysize,
                       int xMul, int yMul,
                       int BitsPerPixel,
                       int BytesPerLine,
                       const U8* pPixel,
                       const LCD_LOGPALETTE* pLogPal) {
  U8  Data;
  int x1, y1;
  const LCD_PIXELINDEX* pTrans;
  /* Handle the optional Y-magnification */
  y1 = y0+ysize-1;
  x1 = x0+xsize-1;
  /* Handle color translation */
  if ((pLogPal) && (pLogPal->pPalEntries)) {
    if ((pTrans = LCD_GetpPalConvTable(pLogPal)) == NULL) {
      return;
    }
  } else {
		pTrans = (BitsPerPixel != 1) ? NULL : &LCD_BKCOLORINDEX;
  }
/*  Handle BITMAP without magnification */
  if ((xMul==1) && (yMul==1)) {
    int Diff;
    /*    Clip Y    */
    if (y0 < GUI_Context.ClipRect.y0) {
      Diff = GUI_Context.ClipRect.y0 -y0;
      y0     = GUI_Context.ClipRect.y0;
      pPixel += Diff*BytesPerLine;
      ysize -= Diff;
    }
    if (y1 > GUI_Context.ClipRect.y1) {
      int Diff = y1-GUI_Context.ClipRect.y1;
      ysize -= Diff;
    }
    if (ysize <=0)
		  return;
    /*        Clip right side    */
    if (x1 > GUI_Context.ClipRect.x1) {
      int Diff = x1-GUI_Context.ClipRect.x1;
      xsize -= Diff;
    }
    /*        Clip left side ... (The difficult side ...)    */
    Diff =0;
    if (x0 < GUI_Context.ClipRect.x0) {
      Diff = GUI_Context.ClipRect.x0-x0;
			xsize-=Diff;
			switch (BitsPerPixel) {
			case 1:
  			pPixel+= (Diff>>3); x0 += (Diff>>3)<<3; Diff &=7;
				break;
			case 2:
	  		pPixel+= (Diff>>2); x0 += (Diff>>2)<<2; Diff &=3;
				break;
			case 4:
				pPixel+= (Diff>>1); x0 += (Diff>>1)<<1; Diff &=1;
				break;
			case 8:
				pPixel+= Diff;      x0 += Diff; Diff=0;
				break;
			case 16:
				pPixel+= (Diff<<1); x0 += Diff; Diff=0;
				break;
			}
    }
    if (xsize <=0)
		  return;
    LCDDEV_L0_DrawBitmap   (x0,y0, xsize, ysize, BitsPerPixel, BytesPerLine, pPixel, Diff, pTrans);
  } else {
    /**** Handle BITMAP with magnification ***/
    int x,y;
    int yi;
    int Shift = 8-BitsPerPixel;
    for (y=y0, yi=0; yi<ysize; yi++, y+= yMul, pPixel+=BytesPerLine) {
      int yMax = y+yMul-1;
      /* Draw if within clip area (Optimization ... "if" is not required !) */
      if ((yMax >= GUI_Context.ClipRect.y0) && (y <= GUI_Context.ClipRect.y1)) {
        int BitsLeft =0;
        int xi;
        const U8* pDataLine = pPixel;
        for (x=x0, xi=0; xi<xsize; xi++, x+=xMul) {
          U8  Index;
          if (!BitsLeft) {
            Data = *pDataLine++;
            BitsLeft =8;
          }
          Index = Data>>Shift;
          Data    <<= BitsPerPixel;
          BitsLeft -= BitsPerPixel;
          if (Index | ((GUI_Context.DrawMode & LCD_DRAWMODE_TRANS) ==0)) {
            LCD_PIXELINDEX  OldColor = LCD_COLORINDEX;
            if (pTrans) {
              LCD_COLORINDEX = *(pTrans+Index);
            } else {
              LCD_COLORINDEX = Index;
            }
            LCD_FillRect(x,y, x+xMul-1, yMax);
            LCD_COLORINDEX = OldColor;
          }
        }
      }
    }
  }
}



/*********************************************************************
*
*           Set Max Clip Rect
*
**********************************************************************
*/

void LCD_SetClipRectMax(void) {
  LCDDEV_L0_GetRect(&GUI_Context.ClipRect);
}



/*
        *********************************************************
        *                                                       *
        *       LCD_Init : Init the display                     *
        *                                                       *
        *********************************************************
*/

int  LCD_Init(void) {
  int r;
  GUI_DEBUG_LOG("\nLCD_Init...");
  LCD_SetClipRectMax();
  if ((r = LCD_L0_Init()) != 0)
    return r;
#if LCD_NUM_DISPLAYS > 1
  if ((r = LCD_L0_1_Init()) != 0)
    return r;
#endif
  LCD_InitLUT();
/* Clear video memory */
  LCD_SetDrawMode(GUI_DRAWMODE_REV);
  LCD_FillRect(0,0, GUI_XMAX, GUI_YMAX);
  LCD_SetDrawMode(0);
/* Switch LCD on */
  LCD_On();
  return 0;
}


/*********************************************************************
*
*           LCD_Index2Color
*           LCD_Color2Index
*
**********************************************************************
*/

int LCD_Color2Index     (LCD_COLOR Color) {
  return LCDDEV_L0_Color2Index(Color);
}

LCD_COLOR LCD_Index2Color (int Index) {
  return LCDDEV_L0_Index2Color(Index);
}



/*********************************************************************
*
*           LCD_SetBkColor
*           LCD_SetColor
*
**********************************************************************

Purpose:  Assign color/index to foreground/ background
*/


void LCD_SetBkColor(GUI_COLOR color) {
  LCD_SetBkColorIndex(LCD_Color2Index(color));
}

void LCD_SetColor(GUI_COLOR color) {
  LCD_SetColorIndex(LCD_Color2Index(color));
}


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久欧美中文字幕| 99久久精品费精品国产一区二区| 精品视频免费看| 亚洲与欧洲av电影| 在线观看视频91| 视频一区二区三区中文字幕| 日韩女优电影在线观看| 激情五月激情综合网| 中文字幕av一区 二区| 91偷拍与自偷拍精品| 亚洲成人av电影在线| 欧美r级电影在线观看| 国产福利91精品一区二区三区| 国产精品久久99| 3751色影院一区二区三区| 九色porny丨国产精品| 自拍偷拍亚洲激情| 91麻豆精品国产91久久久久 | 欧美性一区二区| 精品国产乱码久久久久久闺蜜| 麻豆一区二区在线| 久久久99久久| 91网站视频在线观看| 亚洲国产精品影院| 日韩天堂在线观看| 五月综合激情婷婷六月色窝| 色婷婷亚洲精品| 日韩成人午夜电影| 国产日本亚洲高清| 在线观看日韩精品| 久草精品在线观看| 亚洲欧美中日韩| 8x福利精品第一导航| 国产黄人亚洲片| 亚洲综合清纯丝袜自拍| 日韩丝袜美女视频| 99麻豆久久久国产精品免费优播| 一区二区三区四区激情| 日韩欧美三级在线| av成人老司机| 日韩二区三区在线观看| 欧美激情综合五月色丁香| 欧美亚洲国产一区在线观看网站| 美女精品自拍一二三四| 久久品道一品道久久精品| 91在线免费看| 久草热8精品视频在线观看| 亚洲乱码精品一二三四区日韩在线| 欧美乱妇23p| 成人一区在线观看| 日韩激情中文字幕| 日韩伦理av电影| 日韩精品最新网址| 色94色欧美sute亚洲13| 国产一区二区免费看| 亚洲成人精品一区| 自拍av一区二区三区| 26uuu色噜噜精品一区二区| 在线一区二区观看| 不卡一二三区首页| 国产精品一级片在线观看| 亚洲18女电影在线观看| 国产精品区一区二区三区| 欧美日韩视频在线第一区| 国产成人精品免费一区二区| 麻豆精品视频在线观看视频| 夜夜精品浪潮av一区二区三区| 精品国一区二区三区| 欧美午夜精品久久久| 99精品视频在线观看| 国产传媒久久文化传媒| 日韩电影在线一区二区三区| 亚洲精品国产无天堂网2021 | 在线观看www91| av在线播放成人| 国产精品一区二区在线看| 蜜乳av一区二区| 午夜视频在线观看一区| **性色生活片久久毛片| 中文字幕的久久| 67194成人在线观看| 欧美三级一区二区| 欧美三级中文字幕| 欧美浪妇xxxx高跟鞋交| 欧洲精品视频在线观看| 色综合中文字幕国产 | 不卡在线观看av| 国产精品中文字幕日韩精品| 国产在线观看一区二区| 卡一卡二国产精品 | 1区2区3区欧美| 亚洲国产精品黑人久久久| 久久精品综合网| 国产区在线观看成人精品| 精品国产乱码久久久久久图片 | 精品日韩一区二区| 日韩精品中文字幕在线不卡尤物 | 亚洲图片一区二区| 一区二区三区在线高清| 亚洲综合在线五月| 亚洲国产成人porn| 五月婷婷激情综合网| 三级久久三级久久| 蜜桃av一区二区在线观看| 蜜桃精品在线观看| 国产一区二区视频在线播放| 国产精品一区专区| 成人午夜免费av| 91同城在线观看| 欧美精选一区二区| 精品粉嫩超白一线天av| 日本一区二区视频在线| 亚洲欧美偷拍卡通变态| 亚洲成年人网站在线观看| 日韩黄色片在线观看| 国产综合色产在线精品| 99天天综合性| 欧美日韩五月天| 久久久精品天堂| 亚洲另类春色国产| 首页国产丝袜综合| 久久精品国产亚洲高清剧情介绍| 成人小视频免费在线观看| 欧美最猛性xxxxx直播| 日韩女优电影在线观看| 中文字幕综合网| 青青国产91久久久久久| 成人aa视频在线观看| 欧美日韩国产电影| 久久久九九九九| 亚洲chinese男男1069| 国产成人高清在线| 欧美四级电影网| 欧美不卡一区二区三区四区| 国产精品私人影院| 天堂成人免费av电影一区| 国产精品一区一区三区| 欧美视频在线观看一区| 欧美国产激情二区三区| 天堂av在线一区| 成人小视频在线| 欧美成人乱码一区二区三区| 亚洲欧洲日韩在线| 五月婷婷综合在线| 99re热这里只有精品视频| 欧美一区二区不卡视频| 亚洲欧洲99久久| 国产精品一区三区| 欧美一区日韩一区| 亚洲视频免费在线观看| 久久成人免费网站| 91久久精品一区二区| 亚洲国产精品av| 精一区二区三区| 91精品欧美久久久久久动漫| 中文字幕一区二区三区在线播放| 九九九久久久精品| 日韩一区二区三区在线| 亚洲国产综合人成综合网站| 成人丝袜18视频在线观看| 久久综合久久鬼色中文字| 五月婷婷综合激情| 在线观看国产日韩| 亚洲精品伦理在线| av亚洲产国偷v产偷v自拍| 3d动漫精品啪啪1区2区免费 | 精品成人一区二区| 麻豆91免费观看| 欧美精品色综合| 亚洲成人av福利| 欧美三级三级三级爽爽爽| 亚洲精品菠萝久久久久久久| 国产成人精品免费在线| 久久这里只有精品视频网| 免费成人在线网站| 欧美一区二区女人| 青娱乐精品视频| 欧美一二三四在线| 奇米精品一区二区三区在线观看| 欧美久久久久久久久| 亚洲一二三四久久| 欧美日韩一区在线| 亚瑟在线精品视频| 精品视频全国免费看| 热久久久久久久| 精品国产三级a在线观看| 日韩精品电影在线观看| 日韩欧美在线不卡| 久久国产精品72免费观看| 欧美岛国在线观看| 国产精品影视天天线| 中文成人综合网| 91免费看`日韩一区二区| 国产精品成人网| 欧美三级日本三级少妇99| 午夜电影网一区| 精品久久久影院| 岛国av在线一区| 亚洲欧美一区二区三区久本道91| 91成人免费在线视频|