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

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

?? gdi_main.c

?? Gui of OSD programming
?? C
?? 第 1 頁 / 共 4 頁
字號:
/******************************************************************************/
/**
 * @file    gdi_main.c
 *
 * @brief   This module contains the low level functions of the Graphic Device
 *          Interface (GDI)
 *
 * @note    (c) 2001 - 2003 Micronas GmbH. All rights reserved.
 *          Any use of the Software is permitted only in accordance
 *          with the terms set forth in the Disclaimer text file.
 *
 * @author  ACOM software team
 ******************************************************************************/

#define _SOURCE_GDI_MAIN_



/******************************************************************************
 *
 *  INCLUDE FILES
 ******************************************************************************/

#include <system.h>

#include <ctrl_main.h>
#include <api_i2c.h>
#include <core_main.h>
#ifdef __DEMO_LOOP__
#include <demo_loop.h>
#endif

#include <mnu_main.h>
#include <gdi_main.h>
#include <ctrl_msgparse.h>
#include <pref_main.h>

#ifdef __RADIO_MODE__
#include <radio_main.h>
#endif

#include <core_ramset.h>
#include <main_special.h>
#include <gdi_strings.h>

#if ( __TTX_CONFIG__ != NO_TTX )
#include <ttxfirmware.h>
#include <text_main.h>
#endif

#include <api_vid.h>
#include <mnu_view.h>

#ifdef __CAPTION__
#include <CC_Decoder_Config.h>
#include <CC_Decoder_Interface.h>
#endif

#ifdef __VCHIP__
#include <vchip_main.h>
#endif

#if defined __ENABLE_BITMAP_ICONS__
#include <vctp_vid_init.h>
#endif


/******************************************************************************
 *
 * LOCAL FUNCTION PROTOTYPES:
 ******************************************************************************/

static uint16_t BufferPosition(void);



/******************************************************************************
 *
 * LOCAL VARIABLES:
 ******************************************************************************/

static uint8_t linesPerCharacter;
static bool_t prevEditMode;
#ifdef __X_RAM__
static uint8_t language;
static uint8_t activeXRamFont;
#endif


/******************************************************************************
 *
 * GLOBAL FUNCTIONS:
 ******************************************************************************/

/******************************************************************************/
/**
 * @brief   Sets default attributes to struct cdw_g (no modification
 *          of activeCol_g/activeRow_g)
 *
 * @param   mode  [in]  OSD_TV, OSD_SERVICE, OSD_TELETEXT, CLEAR_SCREEN
 *
 * @return  --
 ******************************************************************************/

void GDI_SetCdwAttrDefaults(const uint8_t mode)
{
   cdw_g.bFlash = SYS_FALSE;
   cdw_g.bUpperHalf = SYS_FALSE;
   cdw_g.bDoubleHeight = SYS_FALSE;
   cdw_g.bDoubleWidth = SYS_FALSE;
   cdw_g.bBoxControl = BOX0;
   cdw_g.bBgColor = 0;

   switch (mode)
   {
      case OSD_TV:
         cdw_g.bClutSelect = SUBCLUT2;
         cdw_g.bFgColor = 3;
         break;

      case OSD_SERVICE:
         cdw_g.bClutSelect = 0;
         cdw_g.bFgColor = 7;
         break;

      case OSD_TELETEXT:
         cdw_g.bClutSelect = 0;
         cdw_g.bFgColor = 1;
         break;

      case CLEAR_SCREEN:
         cdw_g.bClutSelect = 2;
         cdw_g.bFgColor = 0;
         break;
    }
}



/******************************************************************************/
/**
 * @brief   Writes attributes to position activeRow_g, activeCol_g in
 *          DisplayBuffer (no modification of activeRow_g/activeCol_g).
 *
 * @param   --
 *
 * @return  --
 ******************************************************************************/

void GDI_WriteCdwAttributes(void)
{
   uint8_t abCdw[3];      /* Cdw bytes 0-2, byte 0 not used in this function */
   /* write only if position in display range: */
   if (activeRow_g < 25 && activeCol_g < 40)
   {
      /*  Cdw byte 1 */
      abCdw[1] = DisplayBuffer[(uint16_t)(BufferPosition() + 1)];
      abCdw[1] &= 0x03;
      abCdw[1] |= (uint8_t)cdw_g.bFlash << 2;
      abCdw[1] |= (uint8_t)cdw_g.bUpperHalf << 3;
      abCdw[1] |= (uint8_t)cdw_g.bDoubleHeight << 4;
      abCdw[1] |= (uint8_t)cdw_g.bDoubleWidth << 5;
      abCdw[1] |= cdw_g.bBoxControl << 6;
      abCdw[1] |= cdw_g.bClutSelect << 7;

      /*  Cdw byte 2 */
      abCdw[2] = 0;
      abCdw[2] |= cdw_g.bClutSelect >> 1;
      abCdw[2] |= cdw_g.bFgColor << 2;
      abCdw[2] |= cdw_g.bBgColor << 5;

      /* if double height or width, then set upper half.
         Lower half is done later: */
      if (cdw_g.bDoubleHeight == SYS_TRUE)
         abCdw[1] |= 0x18;                 /*  set double hight + upper half */

      if (cdw_g.bDoubleWidth == SYS_TRUE)
         abCdw[1] |= 0x20;                              /*  set double width */

      /*  write Cdw byte 1+2 */
      DisplayBuffer[(uint16_t)(BufferPosition() + 1)] = abCdw[1];
      DisplayBuffer[(uint16_t)(BufferPosition() + 2)] = abCdw[2];

      /* check if double hight, if yes:  write character twice one row below */
      if (cdw_g.bDoubleHeight == SYS_TRUE)
      {
         activeRow_g++;
         abCdw[1] &= 0xF7;                         /*  delete upper half bit */

         if (cdw_g.bDoubleWidth == SYS_TRUE)
            abCdw[1] |= 0x20;                           /*  set double width */
         DisplayBuffer[(uint16_t)(BufferPosition() + 1)] = abCdw[1];
         DisplayBuffer[(uint16_t)(BufferPosition() + 2)] = abCdw[2];
         activeRow_g--;
      }
   }
}




/******************************************************************************/
/**
 * @brief   Reads attributes at position activeRow_g, activeCol_g and fills
 *          gstCharDipsAttr (no modification of activeRow_g/activeCol_g).
 *
 * @param   --
 *
 * @return  --
 ******************************************************************************/

#ifdef __X_RAM__
void GDI_ReadCdwAttributes(void)
{
   uint8_t cdw[2];        /* Cdw bytes 0-2, byte 0 not used in this function */

   /* read only if position is in display range: */
   if (activeRow_g < 25 && activeCol_g < 40)
   {
      /*  Cdw byte 1 */
      cdw[0] = DisplayBuffer[(uint16_t)(BufferPosition() + 1)];
      cdw_g.bFlash = (cdw[0] >> 2) & 1;
      cdw_g.bUpperHalf = (cdw[0] >> 3) & 1;
      cdw_g.bDoubleHeight = (cdw[0] >> 4) & 1;
      cdw_g.bDoubleWidth = (cdw[0] >> 5) & 1;
      cdw_g.bBoxControl = (cdw[0] >> 6) & 1;
      cdw_g.bClutSelect = (cdw[0] >> 7) & 1;

      /*  Cdw byte 2 */
      cdw[1] = DisplayBuffer[(uint16_t)(BufferPosition() + 2)];
      cdw_g.bClutSelect |= (cdw[1] << 1) & 7;
      cdw_g.bFgColor = (cdw[1] >> 2) & 7;
      cdw_g.bBgColor = (cdw[1] >> 5) & 7;
   }
}
#endif



/******************************************************************************/
/**
 * @brief   Writes foreground attributes into the DisplayBuffer beginning with
 *          position activeRow_g, activeCol_g for a defined number.
 *          No change of activeCol_g/activeRow_g considering values at the end
 *          of function.
 *
 * @param   length [in]
 *
 * @return  --
 ******************************************************************************/

void GDI_WriteCdwFgColorLength(const uint8_t length)
{
   uint8_t cdwByte2;
   uint8_t colStart = activeCol_g;

   /* write only if position is in display range: */
   if (activeRow_g < 25 && activeCol_g < 40)
   {
      for (; activeCol_g < (colStart + length); activeCol_g++)
      {
         cdwByte2 = DisplayBuffer[(uint16_t)(BufferPosition() + 2)];
         cdwByte2 &= 0xE3;
         cdwByte2 |= cdw_g.bFgColor << 2;
         DisplayBuffer[(uint16_t)(BufferPosition() + 2)] = cdwByte2;
      }
      activeCol_g = colStart;
   }
}



/******************************************************************************/
/**
 * @brief   Writes background attributes into the display-buffer beginning with
 *          position activeRow_g, activeCol_g for a defined number.
 *          No change of activeCol_g/activeRow_g considering values at the end
 *          of function.
 *
 * @param   length [in]
 *
 * @return  --
 ******************************************************************************/

void GDI_WriteCdwBgColorLength(const uint8_t length)
{
   uint8_t cdwByte2;
   uint8_t colStart = activeCol_g;

   /* write only if position is in display range: */
   if (activeRow_g < 25 && activeCol_g < 40)
   {
      for (; activeCol_g < (colStart + length); activeCol_g++)
      {
         cdwByte2 = DisplayBuffer[(uint16_t)(BufferPosition() + 2)];
         cdwByte2 &= 0x1F;
         cdwByte2 |= cdw_g.bBgColor << 5;
         DisplayBuffer[(uint16_t)(BufferPosition() + 2)] = cdwByte2;
      }
      activeCol_g = colStart;
   }
}



/******************************************************************************/
/**
 * @brief   Writes colour attributes (foreground, background and sub-clut)
 *          into the DisplayBuffer beginning with position activeRow_g,
 *          activeCol_g for a defined number (input-parameter).
 *          No change of activeCol_g/activeRow_g considering values at the end
 *          of function.
 *
 * @param   length [in]
 *
 * @return  --
 ******************************************************************************/

void GDI_WriteCdwColourLength(const uint8_t length)
{
   uint8_t cdwByte;
   uint8_t colStart = activeCol_g;

   /* write only if position is in display range: */
   if (activeRow_g < 25 && activeCol_g < 40)
   {
      for (; activeCol_g < (colStart + length); activeCol_g++)
      {
         cdwByte = DisplayBuffer[(uint16_t)(BufferPosition() + 1)];
         cdwByte &= 0x7F;
         /* set lower part of sub-clut: */
         cdwByte |= cdw_g.bClutSelect << 7;
         DisplayBuffer[(uint16_t)(BufferPosition() + 1)] = cdwByte;
         cdwByte = 0;
         /* set higher part of sub-clut: */
         cdwByte |= cdw_g.bClutSelect >> 1;
         cdwByte |= cdw_g.bFgColor << 2;   /* set foreground colour */
         cdwByte |= cdw_g.bBgColor << 5;   /* set background colour */
         DisplayBuffer[(uint16_t)(BufferPosition() + 2)] = cdwByte;
      }
      activeCol_g = colStart;
   }
}



/******************************************************************************/
/**
 * @brief   Writes all attributes into the DisplayBuffer beginning with
 *          position activeRow_g, activeCol_g for a defined number.
 *          No change of activeCol_g/activeRow_g considering values at the end
 *          of function.
 *
 * @param   length [in]
 *
 * @return  --
 ******************************************************************************/

void GDI_WriteCdwAttrLength(const uint8_t length)
{
   uint8_t colStart = activeCol_g;

   /* write only if position is in display range: */
   if (activeRow_g < 25 && activeCol_g < 40)
   {
      for (; activeCol_g < (colStart + length); activeCol_g++)
      {
         GDI_WriteCdwAttributes();
      }
      activeCol_g = colStart;
   }
}


/******************************************************************************/
/**
 * @brief   Writes one character to the position activeRow_g, activeCol_g into
 *          the DisplayBuffer. No change of activeCol_g/activeRow_g.
 *
 * @param   outChar [in]
 *
 * @return  --
 ******************************************************************************/

void GDI_WriteCdwCharacter(uint16_t outChar)
{
   uint8_t cdw[2];                           /* Cdw bytes 0+1, bits 0-9 used */

#ifdef __X_RAM__
   if (xRamLanguage_g && outChar >= DRCS1_BORDER && outChar < DRCS2_BORDER)
   {
      outChar -= DRCS1_OFFSET;
      cdw_g.bDoubleHeight = SYS_FALSE;    /* draw DRCS1 always as single high chars */
   }
#endif

   /* write only if position is in display range */
   if (activeRow_g < 25 && activeCol_g < 40)
   {
      cdw[0] = LOBYTE(outChar);                                /* Cdw byte 0 */
      cdw[1] = DisplayBuffer[(uint16_t)(BufferPosition() + 1)];            /* Cdw byte 1 */
      cdw[1] = cdw[1] & 0xFC | (HIBYTE(outChar) & 0x03);

#ifdef __X_RAM__
      /* latin character inside of XRAM string and not yet DH */
      if (trueXRam_g && outChar > 0 && outChar < 0x60 && ((cdw[1] & 0x18) == 0))
      {
         /* draw latin characters inside XRAM as DH */
         cdw_g.bDoubleHeight = SYS_TRUE;
      }
#endif
      /* if double height or double width, then set upper half.
         Lower half is done later */
      if (cdw_g.bDoubleHeight == SYS_TRUE)
         cdw[1] |= 0x18;                   /* set double height + upper half */

      if (cdw_g.bDoubleWidth == SYS_TRUE)
         cdw[1] |= 0x20;                                 /* set double width */
      DisplayBuffer[(uint16_t)(BufferPosition())] = cdw[0];       /* write Cdw bytes 0+1 */
      DisplayBuffer[(uint16_t)(BufferPosition() + 1)] = cdw[1];

      /* check if double height, if yes, write character twice one row below */
      if (cdw_g.bDoubleHeight == SYS_TRUE)
      {
         activeRow_g++;
         cdw[1] &= 0xF7;                            /* delete upper half bit */
         if (cdw_g.bDoubleWidth == SYS_TRUE)
            cdw[1] |= 0x20;                              /* set double width */
         DisplayBuffer[(uint16_t)(BufferPosition())] = cdw[0];    /* write Cdw bytes 0+1 */
         DisplayBuffer[(uint16_t)(BufferPosition() + 1)] = cdw[1];
         activeRow_g--;
      }
      else
      {
         /*  write space following character for double width */
         if (cdw_g.bDoubleWidth == SYS_TRUE)
         {
            activeCol_g++;
            DisplayBuffer[(uint16_t)(BufferPosition())] = 0;      /* write Cdw bytes 0+1 */
            /* reset address + DH,UH */
            DisplayBuffer[(uint16_t)(BufferPosition() + 1)] = cdw[1] & 0xC4;
         }
      }
   }
}



?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产又粗又猛又爽又黄91精品| 成人免费一区二区三区视频| 天天色天天爱天天射综合| 色偷偷88欧美精品久久久| 亚洲欧美区自拍先锋| 91在线免费看| 亚洲专区一二三| 欧美日韩视频在线观看一区二区三区 | 成人av动漫网站| 国产精品久久久久7777按摩| 97久久精品人人澡人人爽| 亚洲一区二区欧美日韩| 日韩亚洲欧美综合| 久热成人在线视频| 亚洲国产精品成人综合| 色诱视频网站一区| 日本成人超碰在线观看| 久久一区二区视频| 91蜜桃在线免费视频| 亚洲第一主播视频| 久久婷婷一区二区三区| 99国产麻豆精品| 日韩av一区二区三区| 精品999久久久| 色综合天天综合网国产成人综合天| 亚洲高清免费在线| 久久综合色一综合色88| 91丨九色丨尤物| 免费久久99精品国产| 亚洲国产成人午夜在线一区| 欧美性一二三区| 国产一区二三区好的| 亚洲黄色录像片| 精品噜噜噜噜久久久久久久久试看| 成人开心网精品视频| 天天综合色天天| 国产精品免费视频观看| 欧美日韩成人综合在线一区二区| 激情深爱一区二区| 亚洲国产成人高清精品| 中文av字幕一区| 欧美区一区二区三区| 懂色av一区二区三区免费观看| 亚洲一区二区三区四区在线观看| 精品国产制服丝袜高跟| 欧洲另类一二三四区| 看电影不卡的网站| 亚洲黄色尤物视频| 欧美高清在线一区| 日韩一区二区三区电影 | 亚洲成av人片一区二区梦乃| 精品国产乱码久久久久久久久| av一二三不卡影片| 久热成人在线视频| 性久久久久久久久久久久 | 亚洲图片激情小说| 精品福利一区二区三区免费视频| 色欧美乱欧美15图片| 国产成人8x视频一区二区| 日本成人中文字幕在线视频 | 99久久久国产精品免费蜜臀| 精品综合免费视频观看| 午夜视频在线观看一区二区三区| 国产精品久久久久aaaa| 中文字幕精品三区| 精品国产免费视频| 欧美哺乳videos| 欧美一卡2卡3卡4卡| 在线观看网站黄不卡| 91美女片黄在线观看91美女| 国产成人精品免费视频网站| 国产在线播放一区三区四| 日韩国产欧美在线播放| 日韩综合一区二区| 五月婷婷综合在线| 亚洲1区2区3区视频| 丝袜国产日韩另类美女| 亚洲国产sm捆绑调教视频| 亚洲最大成人网4388xx| 一区二区三区免费观看| 一区av在线播放| 亚洲一区影音先锋| 亚洲一区二区在线视频| 亚洲综合男人的天堂| 亚洲一区二区三区四区在线免费观看 | 久久综合网色—综合色88| 精品久久久三级丝袜| 日韩精品一区二区三区视频在线观看| 欧美综合在线视频| 欧美精选午夜久久久乱码6080| 欧美日韩国产不卡| 欧美精品aⅴ在线视频| 欧美一级二级在线观看| 欧美大片免费久久精品三p| 欧美不卡一区二区三区| 国产区在线观看成人精品| 日本一区二区三区四区 | 亚洲精品你懂的| 亚洲午夜精品在线| 日本中文在线一区| 国产在线日韩欧美| jiyouzz国产精品久久| 欧美中文字幕一区| 欧美一区二视频| 久久久一区二区三区捆绑**| 中文字幕的久久| 一区二区久久久| 日本中文字幕一区二区有限公司| 国产一区二区三区四| www.激情成人| 欧美日韩视频一区二区| 久久综合色鬼综合色| 亚洲欧美日韩久久精品| 免费在线成人网| 成人av网站在线| 欧美日韩情趣电影| 久久九九久久九九| 亚洲综合免费观看高清在线观看| 免费久久精品视频| 91亚洲精品一区二区乱码| 精品视频免费在线| 国产喂奶挤奶一区二区三区| 亚洲综合色噜噜狠狠| 国产一区二区三区黄视频 | 久久99精品国产麻豆婷婷洗澡| 国产成人精品影视| 欧美日本一道本在线视频| 国产天堂亚洲国产碰碰| 亚洲大尺度视频在线观看| 高清不卡在线观看| 欧美一区二区三区在线电影| 日本一区二区三区四区| 青娱乐精品视频在线| 91片黄在线观看| 精品国产亚洲在线| 性久久久久久久久| eeuss国产一区二区三区| 日韩欧美一区二区久久婷婷| 亚洲精品国久久99热| 国产福利一区二区三区视频 | 国产精华液一区二区三区| 欧美日韩成人一区二区| 最新热久久免费视频| 久久激情五月激情| 56国语精品自产拍在线观看| 亚洲啪啪综合av一区二区三区| 九九精品一区二区| 欧美一二三区在线观看| 亚洲国产日产av| 91麻豆免费视频| 国产精品热久久久久夜色精品三区| 免费成人在线观看视频| 欧美日韩和欧美的一区二区| 亚洲欧美成人一区二区三区| 国产成人在线视频网址| 精品成人在线观看| 免费久久99精品国产| 777欧美精品| 亚洲午夜免费电影| 欧美亚洲一区二区三区四区| 日韩久久一区二区| eeuss鲁片一区二区三区在线观看| 国产亚洲人成网站| 国产乱色国产精品免费视频| 精品美女在线播放| 麻豆精品在线视频| 欧美一区二区三区在线| 日韩不卡一二三区| 日韩三级视频在线看| 蜜桃视频在线观看一区二区| 欧美精品少妇一区二区三区| 亚洲小少妇裸体bbw| 欧美综合在线视频| 午夜精彩视频在线观看不卡| 欧美日韩国产精品成人| 日韩成人免费电影| 91精品国产品国语在线不卡| 日本欧美大码aⅴ在线播放| 日韩午夜精品电影| 狠狠狠色丁香婷婷综合久久五月| 精品国产乱码久久久久久图片| 久国产精品韩国三级视频| 日韩精品一区二区在线| 国内精品嫩模私拍在线| 久久久久久久性| 成人久久18免费网站麻豆| 国产精品家庭影院| 91久久精品国产91性色tv| 亚洲美女免费视频| 欧美人狂配大交3d怪物一区| 久久国产免费看| 久久精品欧美一区二区三区不卡 | 国产69精品久久久久777| 国产欧美日韩精品a在线观看| 成人福利视频在线| 一区二区三区加勒比av| 91精品国产综合久久蜜臀| 国产一区二区主播在线| 亚洲婷婷在线视频| 在线成人av影院|