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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? osram96x16.c

?? FreeRTOS is a portable, open source, mini Real Time Kernel - a free to download and royalty free RTO
?? C
?? 第 1 頁 / 共 3 頁
字號(hào):
//*****************************************************************************
static void
OSRAMWriteFirst(unsigned char ucChar)
{
    //
    // Set the slave address.
    //
    I2CMasterSlaveAddrSet(I2C_MASTER_BASE, SSD0303_ADDR, false);

    //
    // Write the first byte to the controller.
    //
    I2CMasterDataPut(I2C_MASTER_BASE, ucChar);

    //
    // Start the transfer.
    //
    I2CMasterControl(I2C_MASTER_BASE, I2C_MASTER_CMD_BURST_SEND_START);
}

//*****************************************************************************
//
//! \internal
//!
//! Write a byte to the SSD0303 controller.
//!
//! \param ucChar is the byte to be transmitted to the controller.
//!
//! This function continues a transfer to the SSD0303 controller by writing
//! another byte over the I2C bus.  This must only be called after calling
//! OSRAMWriteFirst(), but before calling OSRAMWriteFinal().
//!
//! The data is written in a polled faashion; this function will not return
//! until the byte has been written to the controller.
//!
//! \return None.
//
//*****************************************************************************
static void
OSRAMWriteByte(unsigned char ucChar)
{
    //
    // Wait until the current byte has been transferred.
    //
    while(I2CMasterIntStatus(I2C_MASTER_BASE, false) == 0)
    {
    }

    //
    // Provide the required inter-byte delay.
    //
    OSRAMDelay(g_ulDelay);

    //
    // Write the next byte to the controller.
    //
    I2CMasterDataPut(I2C_MASTER_BASE, ucChar);

    //
    // Continue the transfer.
    //
    I2CMasterControl(I2C_MASTER_BASE, I2C_MASTER_CMD_BURST_SEND_CONT);
}

//*****************************************************************************
//
//! \internal
//!
//! Write a sequence of bytes to the SSD0303 controller.
//!
//! This function continues a transfer to the SSD0303 controller by writing a
//! sequence of bytes over the I2C bus.  This must only be called after calling
//! OSRAMWriteFirst(), but before calling OSRAMWriteFinal().
//!
//! The data is written in a polled fashion; this function will not return
//! until the entire byte sequence has been written to the controller.
//!
//! \return None.
//
//*****************************************************************************
static void
OSRAMWriteArray(const unsigned char *pucBuffer, unsigned long ulCount)
{
    //
    // Loop while there are more bytes left to be transferred.
    //
    while(ulCount != 0)
    {
        //
        // Wait until the current byte has been transferred.
        //
        while(I2CMasterIntStatus(I2C_MASTER_BASE, false) == 0)
        {
        }

        //
        // Provide the required inter-byte delay.
        //
        OSRAMDelay(g_ulDelay);

        //
        // Write the next byte to the controller.
        //
        I2CMasterDataPut(I2C_MASTER_BASE, *pucBuffer++);
        ulCount--;

        //
        // Continue the transfer.
        //
        I2CMasterControl(I2C_MASTER_BASE, I2C_MASTER_CMD_BURST_SEND_CONT);
    }
}

//*****************************************************************************
//
//! \internal
//!
//! Finish a transfer to the SSD0303 controller.
//!
//! \param ucChar is the final byte to be written to the controller.
//!
//! This function will finish a transfer to the SSD0303 controller via the I2C
//! bus.  This must only be called after calling OSRAMWriteFirst().
//!
//! The data is written in a polled fashion; this function will not return
//! until the byte has been written to the controller.
//!
//! \return None.
//
//*****************************************************************************
static void
OSRAMWriteFinal(unsigned char ucChar)
{
    //
    // Wait until the current byte has been transferred.
    //
    while(I2CMasterIntStatus(I2C_MASTER_BASE, false) == 0)
    {
    }

    //
    // Provide the required inter-byte delay.
    //
    OSRAMDelay(g_ulDelay);

    //
    // Write the final byte to the controller.
    //
    I2CMasterDataPut(I2C_MASTER_BASE, ucChar);

    //
    // Finish the transfer.
    //
    I2CMasterControl(I2C_MASTER_BASE, I2C_MASTER_CMD_BURST_SEND_FINISH);

    //
    // Wait until the final byte has been transferred.
    //
    while(I2CMasterIntStatus(I2C_MASTER_BASE, false) == 0)
    {
    }

    //
    // Provide the required inter-byte delay.
    //
    OSRAMDelay(g_ulDelay);
}

//*****************************************************************************
//
//! Clears the OLED display.
//!
//! This function will clear the display.  All pixels in the display will be
//! turned off.
//!
//! This function is contained in <tt>osram96x16.c</tt>, with
//! <tt>osram96x16.h</tt> containing the API definition for use by
//! applications.
//!
//! \return None.
//
//*****************************************************************************
void
OSRAMClear(void)
{
    static const unsigned char pucRow1[] =
    {
        0xb0, 0x80, 0x04, 0x80, 0x12, 0x40
    };
    static const unsigned char pucRow2[] =
    {
        0xb1, 0x80, 0x04, 0x80, 0x12, 0x40
    };
    unsigned long ulIdx;

    //
    // Move the display cursor to the first column of the first row.
    //
    OSRAMWriteFirst(0x80);
    OSRAMWriteArray(pucRow1, sizeof(pucRow1));

    //
    // Fill this row with zeros.
    //
    for(ulIdx = 0; ulIdx < 95; ulIdx++)
    {
        OSRAMWriteByte(0x00);
    }
    OSRAMWriteFinal(0x00);

    //
    // Move the display cursor to the first column of the second row.
    //
    OSRAMWriteFirst(0x80);
    OSRAMWriteArray(pucRow2, sizeof(pucRow2));

    //
    // Fill this row with zeros.
    //
    for(ulIdx = 0; ulIdx < 95; ulIdx++)
    {
        OSRAMWriteByte(0x00);
    }
    OSRAMWriteFinal(0x00);
}

//*****************************************************************************
//
//! Displays a string on the OLED display.
//!
//! \param pcStr is a pointer to the string to display.
//! \param ulX is the horizontal position to display the string, specified in
//! columns from the left edge of the display.
//! \param ulY is the vertical position to display the string, specified in
//! eight scan line blocks from the top of the display (i.e. only 0 and 1 are
//! valid).
//!
//! This function will draw a string on the display.  Only the ASCII characters
//! between 32 (space) and 126 (tilde) are supported; other characters will
//! result in random data being draw on the display (based on whatever appears
//! before/after the font in memory).  The font is mono-spaced, so characters
//! such as "i" and "l" have more white space around them than characters such
//! as "m" or "w".
//!
//! If the drawing of the string reaches the right edge of the display, no more
//! characters will be drawn.  Therefore, special care is not required to avoid
//! supplying a string that is "too long" to display.
//!
//! This function is contained in <tt>osram96x16.c</tt>, with
//! <tt>osram96x16.h</tt> containing the API definition for use by
//! applications.
//!
//! \return None.
//
//*****************************************************************************
void
OSRAMStringDraw(const char *pcStr, unsigned long ulX, unsigned long ulY)
{
    //
    // Check the arguments.
    //
    ASSERT(ulX < 96);
    ASSERT(ulY < 2);

    //
    // Move the display cursor to the requested position on the display.
    //
    OSRAMWriteFirst(0x80);
    OSRAMWriteByte((ulY == 0) ? 0xb0 : 0xb1);
    OSRAMWriteByte(0x80);
    OSRAMWriteByte((ulX + 36) & 0x0f);
    OSRAMWriteByte(0x80);
    OSRAMWriteByte(0x10 | (((ulX + 36) >> 4) & 0x0f));
    OSRAMWriteByte(0x40);

    //
    // Loop while there are more characters in the string.
    //
    while(*pcStr != 0)
    {
        //
        // See if there is enough space on the display for this entire
        // character.
        //
        if(ulX <= 90)
        {
            //
            // Write the contents of this character to the display.
            //
            OSRAMWriteArray(g_pucFont[*pcStr - ' '], 5);

            //
            // See if this is the last character to display (either because the
            // right edge has been reached or because there are no more
            // characters).
            //
            if((ulX == 90) || (pcStr[1] == 0))
            {
                //
                // Write the final column of the display.
                //
                OSRAMWriteFinal(0x00);

                //
                // The string has been displayed.
                //
                return;
            }

            //
            // Write the inter-character padding column.
            //
            OSRAMWriteByte(0x00);
        }
        else
        {
            //
            // Write the portion of the character that will fit onto the
            // display.
            //
            OSRAMWriteArray(g_pucFont[*pcStr - ' '], 95 - ulX);
            OSRAMWriteFinal(g_pucFont[*pcStr - ' '][95 - ulX]);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久亚洲一区二区三区明星换脸| 亚洲另类中文字| 国产精品嫩草久久久久| 亚洲精品第1页| 国产盗摄视频一区二区三区| 欧美视频一二三区| 中文字幕一区视频| 久久99精品一区二区三区三区| 色哟哟一区二区| 亚洲欧洲国产专区| 国产suv精品一区二区883| 91精品视频网| 亚洲一区在线观看免费观看电影高清 | 亚洲国产经典视频| 蜜臀精品一区二区三区在线观看| 91成人在线免费观看| 中文字幕精品综合| 国产suv精品一区二区6| 久久久久99精品一区| 美国毛片一区二区三区| 91精品国产一区二区三区| 亚洲欧美日本在线| 色综合久久久久久久| 国产精品网友自拍| 成人永久aaa| 国产精品你懂的在线欣赏| 国产在线播放一区二区三区| 337p粉嫩大胆噜噜噜噜噜91av| 日韩精品成人一区二区在线| 欧美色电影在线| 午夜视频一区二区三区| 欧美日韩高清一区| 婷婷综合在线观看| 欧美一卡2卡三卡4卡5免费| 成人自拍视频在线| 国产亚洲一二三区| 成人动漫一区二区在线| 中文字幕不卡的av| yourporn久久国产精品| 日韩一区日韩二区| 欧美性大战久久| 日韩电影网1区2区| 久久久久久久久一| 成人性色生活片免费看爆迷你毛片| 久久久久一区二区三区四区| 韩国精品久久久| 国产日产精品一区| 成人福利视频网站| 亚洲夂夂婷婷色拍ww47| 91精品国产91久久久久久一区二区| 男人的j进女人的j一区| wwwwww.欧美系列| 成人免费高清视频| 亚洲福利视频一区二区| 欧美一区二区免费| 成人综合在线视频| 亚洲成人资源网| ww亚洲ww在线观看国产| 99麻豆久久久国产精品免费| 亚洲一区二区视频在线观看| 日韩一级片在线播放| 粉嫩久久99精品久久久久久夜| 亚洲男人的天堂av| 日韩精品一区二区三区视频| 国产高清精品在线| 亚洲h在线观看| 国产精品视频一二三区| 欧美日韩欧美一区二区| 国产麻豆日韩欧美久久| 一区二区三区在线观看视频| 日韩欧美的一区| 色天天综合久久久久综合片| 麻豆精品久久精品色综合| 18欧美亚洲精品| 欧美哺乳videos| 欧美最猛性xxxxx直播| 经典三级一区二区| 亚洲自拍偷拍综合| 国产亚洲成av人在线观看导航| 欧美性色黄大片| 成人国产在线观看| 亚洲综合在线视频| 久久久亚洲高清| 欧美日韩大陆一区二区| 国产宾馆实践打屁股91| 91精彩视频在线观看| 亚洲国产视频网站| 欧美国产一区在线| 日韩欧美国产电影| 精品国产露脸精彩对白| 在线国产电影不卡| 99视频一区二区| 国产成人日日夜夜| 久久精品国产精品亚洲精品| 亚洲国产精品久久久久秋霞影院| 国产无人区一区二区三区| 在线视频欧美精品| 国产成人亚洲综合色影视| 亚洲福中文字幕伊人影院| 日本欧美韩国一区三区| 亚洲综合在线观看视频| 亚洲女女做受ⅹxx高潮| 亚洲人成亚洲人成在线观看图片| 亚洲欧美乱综合| 午夜伊人狠狠久久| 国产九九视频一区二区三区| 99视频一区二区三区| 欧美日本在线观看| 26uuu国产日韩综合| 成人免费在线观看入口| 日日夜夜免费精品| 国产精一区二区三区| 色综合久久九月婷婷色综合| 欧美日本高清视频在线观看| 欧美成人欧美edvon| 亚洲欧洲日韩一区二区三区| 亚洲最大的成人av| 久久精品久久综合| 99精品黄色片免费大全| 日韩午夜三级在线| 国产精品久久久久一区二区三区| 亚洲与欧洲av电影| 国产成人在线免费观看| av亚洲精华国产精华精华| 日韩一区二区免费高清| 中文字幕一区二区不卡| 亚洲电影一级黄| 成人永久aaa| 日韩女同互慰一区二区| 国产精品久久久久久久第一福利| 视频在线在亚洲| 91色视频在线| 国产日产精品1区| 久久精品国产精品亚洲综合| 日本道在线观看一区二区| 久久人人爽爽爽人久久久| 无码av免费一区二区三区试看 | 九一久久久久久| 欧洲av在线精品| 国产精品久久久一本精品| 久久精品噜噜噜成人av农村| 欧美日韩另类一区| 亚洲视频在线一区二区| 狠狠色丁香九九婷婷综合五月| 色哟哟一区二区在线观看| 国产欧美视频一区二区| 蜜桃av一区二区在线观看| 欧美色图免费看| 国产精品天天看| 激情五月激情综合网| 欧美美女网站色| 亚洲专区一二三| 色婷婷久久久久swag精品 | 色综合天天在线| 国产精品女同互慰在线看| 国产一区二区三区在线观看免费| 67194成人在线观看| 亚洲成av人片| 欧美日韩亚州综合| 亚洲va在线va天堂| 欧美性生活久久| 五月天一区二区三区| 欧美日韩性生活| 日韩不卡免费视频| 91精品国产入口在线| 免费久久99精品国产| 51精品国自产在线| 热久久国产精品| 欧美不卡激情三级在线观看| 久久精品国产亚洲a| 日韩精品中文字幕一区| 国产一区二区毛片| 国产日韩欧美a| 菠萝蜜视频在线观看一区| 综合久久一区二区三区| 色婷婷av一区二区三区软件 | 日韩午夜小视频| 国产综合色视频| 国产精品久久久久久久久快鸭| 成人免费黄色在线| 亚洲三级在线播放| 欧美日韩亚洲另类| 麻豆精品在线视频| 久久久影视传媒| 一本色道综合亚洲| 午夜一区二区三区视频| 日韩欧美一区在线观看| 国产在线不卡一区| 17c精品麻豆一区二区免费| 在线视频你懂得一区二区三区| 水野朝阳av一区二区三区| 精品对白一区国产伦| 国产成人高清在线| 夜夜精品视频一区二区| 91精品国产色综合久久ai换脸| 国产福利91精品| 亚洲国产精品一区二区www| 日韩午夜激情视频| hitomi一区二区三区精品| 亚洲国产婷婷综合在线精品|