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

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

?? kitronix320x240x16_ssd2119_8bit.c

?? 基于TI公司Cortex-M3的uart超級通信開發
?? C
?? 第 1 頁 / 共 3 頁
字號:
                        //
                        WriteData(DPYCOLORTRANSLATE(ulByte));

                        //
                        // Decrement the count of pixels to draw.
                        //
                        lCount--;

                        //
                        // See if there is another pixel to draw.
                        //
                        if(lCount)
                        {
                case 1:
                            //
                            // Get the lower nibble of the next byte of pixel
                            // data and extract the corresponding entry from
                            // the palette.
                            //
                            ulByte = (*pucData++ & 15) * 3;
                            ulByte = (*(unsigned long *)(pucPalette + ulByte) &
                                      0x00ffffff);

                            //
                            // Translate this palette entry and write it to the
                            // screen.
                            //
                            WriteData(DPYCOLORTRANSLATE(ulByte));

                            //
                            // Decrement the count of pixels to draw.
                            //
                            lCount--;
                        }
                    }
            }

            //
            // The image data has been drawn.
            //
            break;
        }

        //
        // The pixel data is in 8 bit per pixel format.
        //
        case 8:
        {
            //
            // Loop while there are more pixels to draw.
            //
            while(lCount--)
            {
                //
                // Get the next byte of pixel data and extract the
                // corresponding entry from the palette.
                //
                ulByte = *pucData++ * 3;
                ulByte = *(unsigned long *)(pucPalette + ulByte) & 0x00ffffff;

                //
                // Translate this palette entry and write it to the screen.
                //
                WriteData(DPYCOLORTRANSLATE(ulByte));
            }

            //
            // The image data has been drawn.
            //
            break;
        }

        //
        // We are being passed data in the display's native format.  Merely
        // write it directly to the display.  This is a special case which is
        // not used by the graphics library but which is helpful to
        // applications which may want to handle, for example, JPEG images.
        //
        case 16:
        {
            unsigned short usByte;

            //
            // Loop while there are more pixels to draw.
            //
            while(lCount--)
            {
                //
                // Get the next byte of pixel data and extract the
                // corresponding entry from the palette.
                //
                usByte = *((unsigned short *)pucData);
                pucData += 2;

                //
                // Translate this palette entry and write it to the screen.
                //
                WriteData(usByte);
            }
        }
    }
}

//*****************************************************************************
//
//! Draws a horizontal line.
//!
//! \param pvDisplayData is a pointer to the driver-specific data for this
//! display driver.
//! \param lX1 is the X coordinate of the start of the line.
//! \param lX2 is the X coordinate of the end of the line.
//! \param lY is the Y coordinate of the line.
//! \param ulValue is the color of the line.
//!
//! This function draws a horizontal line on the display.  The coordinates of
//! the line are assumed to be within the extents of the display.
//!
//! \return None.
//
//*****************************************************************************
static void
Kitronix240x320x16_SD60154LineDrawH(void *pvDisplayData, long lX1, long lX2,
                                   long lY, unsigned long ulValue)
{

    //
    // Set the cursor increment to left to right, followed by top to bottom.
    //
    WriteCommand(S6D0154_ENTRY_MODE_REG);
    WriteData(MAKE_ENTRY_MODE(HORIZ_DIRECTION));

    //
    // Set the starting X address of the display cursor.
    //
  
    WriteCommand(S6D0154_H_RAM_ADDR_REG);
    WriteData(MAPPED_X(lX1, lY));

    //
    // Set the Y address of the display cursor.
    //
    WriteCommand(S6D0154_V_RAM_ADDR_REG);
    WriteData(MAPPED_Y(lX1, lY));

    //
    // Write the data RAM write command.
    //
    WriteCommand(S6D0154_RAM_DATA_REG);

    //
    // Loop through the pixels of this horizontal line.
    //
    while(lX1++ <= lX2)
    {
        //
        // Write the pixel value.
        //
        WriteData(ulValue);
    }

}

//*****************************************************************************
//
//! Draws a vertical line.
//!
//! \param pvDisplayData is a pointer to the driver-specific data for this
//! display driver.
//! \param lX is the X coordinate of the line.
//! \param lY1 is the Y coordinate of the start of the line.
//! \param lY2 is the Y coordinate of the end of the line.
//! \param ulValue is the color of the line.
//!
//! This function draws a vertical line on the display.  The coordinates of the
//! line are assumed to be within the extents of the display.
//!
//! \return None.
//
//*****************************************************************************
static void
Kitronix240x320x16_SD60154LineDrawV(void *pvDisplayData, long lX, long lY1,
                                   long lY2, unsigned long ulValue)
{
  
    //
    // Set the cursor increment to top to bottom, followed by left to right.
    //
    WriteCommand(S6D0154_ENTRY_MODE_REG);
    WriteData(MAKE_ENTRY_MODE(VERT_DIRECTION));

    //
    // Set the X address of the display cursor.
    //
    WriteCommand(S6D0154_H_RAM_ADDR_REG);
    WriteData(MAPPED_X(lX, lY1));

    //
    // Set the starting Y address of the display cursor.
    //
    WriteCommand(S6D0154_V_RAM_ADDR_REG);
    WriteData(MAPPED_Y(lX, lY1));

    //
    // Write the data RAM write command.
    //
    WriteCommand(S6D0154_RAM_DATA_REG);

    //
    // Loop through the pixels of this vertical line.
    //
    while(lY1++ <= lY2)
    {
        //
        // Write the pixel value.
        //
        WriteData(ulValue);
    }
  
}

//*****************************************************************************
//
//! Fills a rectangle.
//!
//! \param pvDisplayData is a pointer to the driver-specific data for this
//! display driver.
//! \param pRect is a pointer to the structure describing the rectangle.
//! \param ulValue is the color of the rectangle.
//!
//! This function fills a rectangle on the display.  The coordinates of the
//! rectangle are assumed to be within the extents of the display, and the
//! rectangle specification is fully inclusive (in other words, both sXMin and
//! sXMax are drawn, along with sYMin and sYMax).
//!
//! \return None.
//
//*****************************************************************************
static void
Kitronix240x320x16_SD60154RectFill(void *pvDisplayData, const tRectangle *pRect,
                                  unsigned long ulValue)
{
  
    long lCount;

    //
    // Write the Y extents of the rectangle.
    //
    WriteCommand(S6D0154_ENTRY_MODE_REG);
    WriteData(MAKE_ENTRY_MODE(HORIZ_DIRECTION));

    //
    // Write the X extents of the rectangle.
    //
    WriteCommand(S6D0154_H_WINDOW_START_REG);
#if (defined PORTRAIT) || (defined LANDSCAPE)
    WriteData(MAPPED_X(pRect->sXMax, pRect->sYMax));
#else
    WriteData(MAPPED_X(pRect->sXMin, pRect->sYMin));
#endif

    WriteCommand(S6D0154_H_WINDOW_END_REG);
#if (defined PORTRAIT) || (defined LANDSCAPE)
    WriteData(MAPPED_X(pRect->sXMin, pRect->sYMin));
#else
    WriteData(MAPPED_X(pRect->sXMax, pRect->sYMax));
#endif

    //
    // Write the Y extents of the rectangle
    //
    WriteCommand(S6D0154_V_WINDOW_START_REG);
#if (defined LANDSCAPE_FLIP) || (defined PORTRAIT)
    WriteData(MAPPED_Y(pRect->sXMin, pRect->sYMin));
#else
    WriteData(MAPPED_Y(pRect->sXMax, pRect->sYMax));
#endif
     WriteCommand(S6D0154_V_WINDOW_END_REG);
#if (defined LANDSCAPE_FLIP) || (defined PORTRAIT)
    WriteData(MAPPED_Y(pRect->sXMax, pRect->sYMax));
#else
    WriteData(MAPPED_Y(pRect->sXMin, pRect->sYMin));
#endif
    
    //
    // Set the display cursor to the upper left of the rectangle (in application
    // coordinate space).
    //
    WriteCommand(S6D0154_H_RAM_ADDR_REG);
    WriteData(MAPPED_X(pRect->sXMin, pRect->sYMin));

    WriteCommand(S6D0154_V_RAM_ADDR_REG);
    WriteData(MAPPED_Y(pRect->sXMin, pRect->sYMin));

    //
    // Tell the controller we are about to write data into its RAM.
    //
    WriteCommand(S6D0154_RAM_DATA_REG);

    //
    // Loop through the pixels of this filled rectangle.
    //
    for(lCount = ((pRect->sXMax - pRect->sXMin + 1) *
                  (pRect->sYMax - pRect->sYMin + 1)); lCount >= 0; lCount--)
    {
        //
        // Write the pixel value.
        //
        WriteData(ulValue);
    }

    //
    // Reset the X extents to the entire screen.
    //
    WriteCommand(S6D0154_H_WINDOW_END_REG);
    WriteData(0x00ef);
    WriteCommand(S6D0154_H_WINDOW_START_REG);
    WriteData(0x0000);

    //
    // Reset the Y extent to the full screen
    //
    WriteCommand(S6D0154_V_WINDOW_END_REG);
    WriteData(0x013f);
    WriteCommand(S6D0154_V_WINDOW_START_REG);
    WriteData(0x0000);

}

//*****************************************************************************
//
//! Translates a 24-bit RGB color to a display driver-specific color.
//!將顏色轉換成RGB的值
//! \param pvDisplayData is a pointer to the driver-specific data for this
//! display driver.
//! \param ulValue is the 24-bit RGB color.  The least-significant byte is the
//! blue channel, the next byte is the green channel, and the third byte is the
//! red channel.
//!最低位為
//! This function translates a 24-bit RGB color into a value that can be
//! written into the display's frame buffer in order to reproduce that color,
//! or the closest possible approximation of that color.
//!
//! \return Returns the display-driver specific color.
//
//*****************************************************************************
static unsigned long
Kitronix240x320x16_SD60154ColorTranslate(void *pvDisplayData,
                                        unsigned long ulValue)
{
    //
    // Translate from a 24-bit RGB color to a 5-6-5 RGB color.
    //
    return(DPYCOLORTRANSLATE(ulValue));
}

//*****************************************************************************
//
//! Flushes any cached drawing operations.
//!
//! \param pvDisplayData is a pointer to the driver-specific data for this
//! display driver.
//!
//! This functions flushes any cached drawing operations to the display.  This
//! is useful when a local frame buffer is used for drawing operations, and the
//! flush would copy the local frame buffer to the display.  For the SSD2119
//! driver, the flush is a no operation.
//!
//! \return None.
//刷新
//*****************************************************************************
static void
Kitronix240x320x16_SD60154Flush(void *pvDisplayData)
{
    //
    // There is nothing to be done.
    //
}

//*****************************************************************************
//
//! The display structure that describes the driver for the Kitronix
//! K350QVG-V1-F TFT panel with an SSD2119 controller.
//
//*****************************************************************************
const tDisplay g_sKitronix320x240x16_SSD2119 =
{
    sizeof(tDisplay),
    0,
#if defined(PORTRAIT) || defined(PORTRAIT_FLIP)
    320,
    240,
#else
    240,
    320,
#endif
    Kitronix240x320x16_SD60154PixelDraw,
    Kitronix240x320x16_SD60154PixelDrawMultiple,
    Kitronix240x320x16_SD60154LineDrawH,
    Kitronix240x320x16_SD60154LineDrawV,
    Kitronix240x320x16_SD60154RectFill,
    Kitronix240x320x16_SD60154ColorTranslate,
    Kitronix240x320x16_SD60154Flush
};

//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美综合一区二区| 久久爱www久久做| 亚洲精品在线观看视频| 欧美一区二区视频在线观看2022| 日本高清不卡在线观看| 色综合久久88色综合天天6| 成人a级免费电影| 成人午夜视频福利| 99精品热视频| 欧美中文字幕一区| 日本一区二区不卡视频| 中文字幕乱码久久午夜不卡 | 国产精品伦一区| 欧美激情自拍偷拍| 有码一区二区三区| 亚洲成人自拍一区| 美女被吸乳得到大胸91| 国模大尺度一区二区三区| 国产福利精品导航| 色素色在线综合| 欧美精品久久99| 久久久影视传媒| 亚洲乱码一区二区三区在线观看| 亚洲图片有声小说| 国产精品一区二区久久不卡| 99久久99久久综合| 欧美乱妇20p| 久久精品人人做人人爽人人| 亚洲免费av观看| 蜜臀av性久久久久蜜臀aⅴ流畅| 国产精品99久久久久久久vr | 亚洲欧美经典视频| 亚洲超丰满肉感bbw| 国产美女一区二区| 一道本成人在线| 日韩欧美三级在线| 成人欧美一区二区三区1314 | 久久久久久9999| 亚洲黄色小说网站| 国产在线一区观看| 色视频一区二区| 久久女同性恋中文字幕| 亚洲自拍另类综合| 国产精品99久久久久久久vr| 欧美日韩国产首页在线观看| 国产视频一区在线观看| 婷婷综合另类小说色区| 不卡一卡二卡三乱码免费网站 | 久久精品国产久精国产| 99久久99久久久精品齐齐| 欧美一区日韩一区| 一区二区高清视频在线观看| 国产一区二区导航在线播放| 在线视频国内自拍亚洲视频| 国产日韩精品久久久| 蜜臀99久久精品久久久久久软件| 日本成人在线视频网站| 色美美综合视频| 国产精品国产三级国产| 精品亚洲免费视频| 91精品欧美福利在线观看| 亚洲精品高清视频在线观看| 成av人片一区二区| 中文字幕精品三区| 国产精品一区二区黑丝| 日韩欧美精品在线视频| 日韩影院在线观看| 欧美日韩www| 亚洲国产精品欧美一二99| 成人91在线观看| 国产精品女主播在线观看| 国产麻豆成人传媒免费观看| 精品久久人人做人人爽| 久久99精品久久久久久| 日韩视频永久免费| 极品少妇xxxx精品少妇| 欧美成人aa大片| 精品一区二区三区影院在线午夜| 欧美一级二级三级乱码| 美日韩黄色大片| 日韩视频一区二区| 激情综合色综合久久| 精品99一区二区三区| 精品无人码麻豆乱码1区2区| 久久女同互慰一区二区三区| 国产成人夜色高潮福利影视| 中文字幕的久久| 99久久国产综合色|国产精品| 亚洲人成影院在线观看| 欧美三级欧美一级| 麻豆精品久久精品色综合| 久久综合成人精品亚洲另类欧美 | 日韩一区二区三区免费观看| 五月天激情综合| 日韩一级视频免费观看在线| 精品一区二区在线观看| 中文字幕第一区二区| 在线观看日韩av先锋影音电影院| 丝袜诱惑制服诱惑色一区在线观看| 欧美一区二区三区视频在线| 久久99精品国产麻豆不卡| 国产日韩精品视频一区| 欧美在线你懂得| 精品一区二区在线观看| 亚洲欧美在线视频观看| 欧美优质美女网站| 精品一区二区三区久久久| 国产精品电影院| 欧美另类z0zxhd电影| 国产一区二区三区av电影| 亚洲日本韩国一区| 日韩亚洲欧美一区二区三区| 国产成人免费视频精品含羞草妖精| 亚洲日本青草视频在线怡红院| 欧美一区二区三区在线电影| 国产91在线|亚洲| 午夜激情久久久| 亚洲欧美在线高清| 欧美草草影院在线视频| 日本韩国视频一区二区| 国产麻豆91精品| 日韩专区一卡二卡| 国产精品对白交换视频 | aaa国产一区| 蜜臀99久久精品久久久久久软件| 亚洲欧美怡红院| 欧美精品一区视频| 欧美日韩一区二区欧美激情| 成人毛片在线观看| 日本在线不卡一区| 亚洲综合久久久| 中文字幕日韩一区二区| 精品蜜桃在线看| 884aa四虎影成人精品一区| 一本一本大道香蕉久在线精品 | 中文字幕欧美激情| 精品国产一区二区三区av性色 | 国产ts人妖一区二区| 日本91福利区| 亚洲国产欧美一区二区三区丁香婷| 国产清纯美女被跳蛋高潮一区二区久久w| 欧美日韩国产综合久久 | 日日嗨av一区二区三区四区| 一区二区三区在线视频免费观看| 国产日韩综合av| 久久精品夜色噜噜亚洲a∨| 日韩一级免费一区| 欧美老肥妇做.爰bbww| 欧美视频在线观看一区| 91国偷自产一区二区使用方法| 成人福利在线看| 成年人网站91| 91美女福利视频| 色综合久久天天| 欧美优质美女网站| 欧美日韩久久不卡| 欧美精品 日韩| 欧美精品 国产精品| 制服丝袜亚洲播放| 欧美一级片免费看| 精品sm捆绑视频| 国产亲近乱来精品视频| 国产精品视频在线看| 欧美经典三级视频一区二区三区| 久久久久88色偷偷免费| 国产农村妇女毛片精品久久麻豆| 国产清纯美女被跳蛋高潮一区二区久久w| 国产亚洲欧美激情| 国产精品久久久久影院亚瑟 | 亚洲国产岛国毛片在线| 亚洲丝袜自拍清纯另类| 亚洲免费在线看| 日韩国产成人精品| 国产成人精品免费一区二区| 风间由美中文字幕在线看视频国产欧美| 国产成人免费在线视频| 99久久久久久| 91精品国产综合久久久久| 欧美成人欧美edvon| 中文字幕乱码日本亚洲一区二区| 依依成人综合视频| 卡一卡二国产精品 | 久久综合久久综合久久| 日本一区二区视频在线观看| 亚洲精品视频在线观看免费| 爽爽淫人综合网网站| 国产精品1区2区3区| 色噜噜偷拍精品综合在线| 日韩欧美一区中文| 国产精品高潮久久久久无| 视频在线观看一区二区三区| 国产高清视频一区| 欧美日韩综合在线免费观看| 精品国产乱码久久久久久图片| 国产精品国产三级国产aⅴ原创 | 奇米影视一区二区三区小说| 成人高清伦理免费影院在线观看| 欧美一区二区国产| 中文字幕在线不卡| 久久99精品国产.久久久久|