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

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

?? osram96x16.c

?? freertosV4.40 是一種small的嵌入式系統。利于嵌入式開好者入門學習嵌入式操作系統。通過對于源碼的學習可以很好的掌握freertos的運行機制。
?? C
?? 第 1 頁 / 共 3 頁
字號:

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

        //
        // Advance to the next character.
        //
        pcStr++;

        //
        // Increment the X coordinate by the six columns that were just
        // written.
        //
        ulX += 6;
    }
}

//*****************************************************************************
//
//! Displays an image on the OLED display.
//!
//! \param pucImage is a pointer to the image data.
//! \param ulX is the horizontal position to display this image, specified in
//! columns from the left edge of the display.
//! \param ulY is the vertical position to display this image, specified in
//! eight scan line blocks from the top of the display (i.e. only 0 and 1 are
//! valid).
//! \param ulWidth is the width of the image, specified in columns.
//! \param ulHeight is the height of the image, specified in eight row blocks
//! (i.e. only 1 and 2 are valid).
//!
//! This function will display a bitmap graphic on the display.  The image to
//! be displayed must be a multiple of eight scan lines high (i.e. one row) and
//! will be drawn at a vertical position that is a multiple of eight scan lines
//! (i.e. scan line zero or scan line eight, corresponding to row zero or row
//! one).
//!
//! The image data is organized with the first row of image data appearing left
//! to right, followed immediately by the second row of image data.  Each byte
//! contains the data for the eight scan lines of the column, with the top scan
//! line being in the least significant bit of the byte and the bottom scan
//! line being in the most significant bit of the byte.
//!
//! For example, an image four columns wide and sixteen scan lines tall would
//! be arranged as follows (showing how the eight bytes of the image would
//! appear on the display):
//!
//! \verbatim
//!     +-------+  +-------+  +-------+  +-------+
//!     |   | 0 |  |   | 0 |  |   | 0 |  |   | 0 |
//!     | B | 1 |  | B | 1 |  | B | 1 |  | B | 1 |
//!     | y | 2 |  | y | 2 |  | y | 2 |  | y | 2 |
//!     | t | 3 |  | t | 3 |  | t | 3 |  | t | 3 |
//!     | e | 4 |  | e | 4 |  | e | 4 |  | e | 4 |
//!     |   | 5 |  |   | 5 |  |   | 5 |  |   | 5 |
//!     | 0 | 6 |  | 1 | 6 |  | 2 | 6 |  | 3 | 6 |
//!     |   | 7 |  |   | 7 |  |   | 7 |  |   | 7 |
//!     +-------+  +-------+  +-------+  +-------+
//!
//!     +-------+  +-------+  +-------+  +-------+
//!     |   | 0 |  |   | 0 |  |   | 0 |  |   | 0 |
//!     | B | 1 |  | B | 1 |  | B | 1 |  | B | 1 |
//!     | y | 2 |  | y | 2 |  | y | 2 |  | y | 2 |
//!     | t | 3 |  | t | 3 |  | t | 3 |  | t | 3 |
//!     | e | 4 |  | e | 4 |  | e | 4 |  | e | 4 |
//!     |   | 5 |  |   | 5 |  |   | 5 |  |   | 5 |
//!     | 4 | 6 |  | 5 | 6 |  | 6 | 6 |  | 7 | 6 |
//!     |   | 7 |  |   | 7 |  |   | 7 |  |   | 7 |
//!     +-------+  +-------+  +-------+  +-------+
//! \endverbatim
//!
//! 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
OSRAMImageDraw(const unsigned char *pucImage, unsigned long ulX,
               unsigned long ulY, unsigned long ulWidth,
               unsigned long ulHeight)
{
    //
    // Check the arguments.
    //
    ASSERT(ulX < 96);
    ASSERT(ulY < 2);
    ASSERT((ulX + ulWidth) <= 96);
    ASSERT((ulY + ulHeight) <= 2);

    //
    // The first 36 columns of the LCD buffer are not displayed, so increment
    // the X coorddinate by 36 to account for the non-displayed frame buffer
    // memory.
    //
    ulX += 36;

    //
    // Loop while there are more rows to display.
    //
    while(ulHeight--)
    {
        //
        // Write the starting address within this row.
        //
        OSRAMWriteFirst(0x80);
        OSRAMWriteByte((ulY == 0) ? 0xb0 : 0xb1);
        OSRAMWriteByte(0x80);
        OSRAMWriteByte(ulX & 0x0f);
        OSRAMWriteByte(0x80);
        OSRAMWriteByte(0x10 | ((ulX >> 4) & 0x0f));
        OSRAMWriteByte(0x40);

        //
        // Write this row of image data.
        //
        OSRAMWriteArray(pucImage, ulWidth - 1);
        OSRAMWriteFinal(pucImage[ulWidth - 1]);

        //
        // Advance to the next row of the image.
        //
        pucImage += ulWidth;
        ulY++;
    }
}

//*****************************************************************************
//
//! Initialize the OLED display.
//!
//! \param bFast is a boolean that is \e true if the I2C interface should be
//! run at 400 kbps and \e false if it should be run at 100 kbps.
//!
//! This function initializes the I2C interface to the OLED display and
//! configures the SSD0303 controller on the panel.
//!
//! 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
OSRAMInit(tBoolean bFast)
{
    unsigned long ulIdx;

    //
    // Enable the I2C and GPIO port B blocks as they are needed by this driver.
    //
    SysCtlPeripheralEnable(SYSCTL_PERIPH_I2C);
    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);

    //
    // Configure the I2C SCL and SDA pins for I2C operation.
    //
    GPIOPinTypeI2C(GPIO_PORTB_BASE, GPIO_PIN_2 | GPIO_PIN_3);

    //
    // Initialize the I2C master.
    //
    I2CMasterInit(I2C_MASTER_BASE, bFast);

    //
    // Compute the inter-byte delay for the SSD0303 controller.  This delay is
    // dependent upon the I2C bus clock rate; the slower the clock the longer
    // the delay required.
    //
    // The derivation of this formula is based on a measured delay of
    // OSRAMDelay(1700) for a 100 kHz I2C bus with the CPU running at 50 MHz
    // (referred to as C).  To scale this to the delay for a different CPU
    // speed (since this is just a CPU-based delay loop) is:
    //
    //           f(CPU)
    //     C * ----------
    //         50,000,000
    //
    // To then scale this to the actual I2C rate (since it won't always be
    // precisely 100 kHz):
    //
    //           f(CPU)     100,000
    //     C * ---------- * -------
    //         50,000,000    f(I2C)
    //
    // This equation will give the inter-byte delay required for any
    // configuration of the I2C master.  But, as arranged it is impossible to
    // directly compute in 32-bit arithmetic (without loosing a lot of
    // accuracy).  So, the equation is simplified.
    //
    // Since f(I2C) is generated by dividing down from f(CPU), replace it with
    // the equivalent (where TPR is the value programmed into the Master Timer
    // Period Register of the I2C master, with the 1 added back):
    //
    //                        100,000
    //           f(CPU)       -------
    //     C * ---------- *    f(CPU)
    //         50,000,000   ------------
    //                      2 * 10 * TPR
    //
    // Inverting the dividend in the last term:
    //
    //           f(CPU)     100,000 * 2 * 10 * TPR
    //     C * ---------- * ----------------------
    //         50,000,000          f(CPU)
    //
    // The f(CPU) now cancels out.
    //
    //         100,000 * 2 * 10 * TPR
    //     C * ----------------------
    //               50,000,000
    //
    // Since there are no clock frequencies left in the equation, this equation
    // also works for 400 kHz bus operation as well, since the 100,000 in the
    // numerator becomes 400,000 but C is 1/4, which cancel out each other.
    // Reducing the constants gives:
    //
    //         TPR              TPR             TPR
    //     C * ---   =   1700 * ---   =   340 * ---   = 68 * TPR
    //         25               25               5
    //
    // Note that the constant C is actually a bit larger than it needs to be in
    // order to provide some safety margin.
    //
    g_ulDelay = 68 * (HWREG(I2C_MASTER_BASE + I2C_MASTER_O_TPR) + 1);

    //
    // Initialize the SSD0303 controller.  Loop through the initialization
    // sequence doing a single I2C transfer for each command.
    //
    for(ulIdx = 0; ulIdx < sizeof(g_pucOSRAMInit);
        ulIdx += g_pucOSRAMInit[ulIdx] + 1)
    {
        //
        // Send this command.
        //
        OSRAMWriteFirst(g_pucOSRAMInit[ulIdx + 1]);
        OSRAMWriteArray(g_pucOSRAMInit + ulIdx + 2, g_pucOSRAMInit[ulIdx] - 2);
        OSRAMWriteFinal(g_pucOSRAMInit[ulIdx + g_pucOSRAMInit[ulIdx]]);
    }

    //
    // Clear the frame buffer.
    //
    OSRAMClear();
}

//*****************************************************************************
//
//! Turns on the OLED display.
//!
//! This function will turn on the OLED display, causing it to display the
//! contents of its internal frame buffer.
//!
//! 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
OSRAMDisplayOn(void)
{
    unsigned long ulIdx;

    //
    // Re-initialize the SSD0303 controller.  Loop through the initialization
    // sequence doing a single I2C transfer for each command.
    //
    for(ulIdx = 0; ulIdx < sizeof(g_pucOSRAMInit);
        ulIdx += g_pucOSRAMInit[ulIdx] + 1)
    {
        //
        // Send this command.
        //
        OSRAMWriteFirst(g_pucOSRAMInit[ulIdx + 1]);
        OSRAMWriteArray(g_pucOSRAMInit + ulIdx + 2, g_pucOSRAMInit[ulIdx] - 2);
        OSRAMWriteFinal(g_pucOSRAMInit[ulIdx + g_pucOSRAMInit[ulIdx]]);
    }
}

//*****************************************************************************
//
//! Turns off the OLED display.
//!
//! This function will turn off the OLED display.  This will stop the scanning
//! of the panel and turn off the on-chip DC-DC converter, preventing damage to
//! the panel due to burn-in (it has similar characters to a CRT in this
//! respect).
//!
//! 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
OSRAMDisplayOff(void)
{
    //
    // Turn off the DC-DC converter and the display.
    //
    OSRAMWriteFirst(0x80);
    OSRAMWriteByte(0xae);
    OSRAMWriteByte(0x80);
    OSRAMWriteByte(0xad);
    OSRAMWriteByte(0x80);
    OSRAMWriteFinal(0x8a);
}

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人av集中营| 天天色图综合网| 一区二区三区不卡视频在线观看 | 成人精品视频网站| 91啦中文在线观看| 91精品国产全国免费观看| 国产视频一区在线播放| 亚洲免费观看高清完整| 青青草97国产精品免费观看无弹窗版| 国产麻豆午夜三级精品| 色婷婷综合久久久中文字幕| 2020国产成人综合网| 亚洲免费伊人电影| 久久99久久久久久久久久久| 99国产麻豆精品| 欧美一区二区观看视频| 亚洲视频1区2区| 蓝色福利精品导航| 色拍拍在线精品视频8848| 欧美不卡在线视频| 亚洲精品久久7777| 国产精品一区二区果冻传媒| 欧美视频一区二区三区| 中文字幕不卡在线播放| 青娱乐精品视频| 色哦色哦哦色天天综合| 久久蜜桃香蕉精品一区二区三区| 亚洲综合一区二区| 国产成人av电影在线观看| 在线不卡免费av| 最近日韩中文字幕| 国产乱码字幕精品高清av| 69堂成人精品免费视频| 国产精品精品国产色婷婷| 激情综合网最新| 欧美日韩激情一区二区| 中文字幕亚洲欧美在线不卡| 国产在线精品一区二区三区不卡 | 日日摸夜夜添夜夜添亚洲女人| 成人午夜电影网站| 欧美一级黄色大片| 夜夜爽夜夜爽精品视频| 成人精品一区二区三区四区 | 国产一区二区三区日韩| 精品视频在线视频| 中文字幕在线不卡一区| 国产一区二区视频在线| 91精品国产色综合久久ai换脸| 亚洲男人电影天堂| 成人伦理片在线| 中文字幕第一区二区| 国产精品一色哟哟哟| 欧美成人在线直播| 日韩精品一二区| 欧美在线制服丝袜| 亚洲乱码国产乱码精品精的特点 | 亚洲人午夜精品天堂一二香蕉| 国产aⅴ综合色| 日韩女优电影在线观看| 天天色天天操综合| 欧美伦理影视网| 亚洲成av人片在线观看无码| 在线看国产日韩| 一区二区欧美视频| 色综合久久久久综合| 日韩久久一区二区| 99久久婷婷国产| 亚洲日本免费电影| 在线免费av一区| 亚洲国产日产av| 宅男在线国产精品| 视频一区在线视频| 欧美一区欧美二区| 免费一级片91| 精品国产区一区| 精品一区二区三区影院在线午夜 | 国产在线不卡一卡二卡三卡四卡| 日韩一区二区三区精品视频 | 久久精品夜色噜噜亚洲aⅴ| 国产精品影视网| 国产女人18水真多18精品一级做| 国产成人午夜高潮毛片| 国产精品日日摸夜夜摸av| 成人黄色在线视频| 中文字幕在线一区| 色婷婷av久久久久久久| 午夜日韩在线电影| 日韩一区二区三区四区| 国产精品一区二区在线播放 | 色婷婷国产精品综合在线观看| 亚洲天堂a在线| 欧美在线观看一区二区| 日本在线不卡视频| 精品国产凹凸成av人网站| 国产高清在线精品| 国产精品灌醉下药二区| 色狠狠综合天天综合综合| 亚洲一区免费视频| 日韩一级精品视频在线观看| 国产在线精品一区在线观看麻豆| 国产精品私人自拍| 在线观看欧美黄色| 免费观看日韩电影| 欧美国产精品v| 欧美午夜精品一区二区三区| 另类调教123区 | 91福利国产成人精品照片| 五月婷婷欧美视频| 久久综合久色欧美综合狠狠| 成人av资源站| 亚洲第一福利视频在线| 欧美精品一区二区三区四区| av不卡一区二区三区| 午夜欧美视频在线观看| 久久久久99精品一区| 在线免费视频一区二区| 韩国理伦片一区二区三区在线播放| 国产精品欧美一级免费| 欧美日韩国产成人在线免费| 国产在线日韩欧美| 亚洲综合在线五月| 精品福利视频一区二区三区| 91无套直看片红桃| 久久99国产精品尤物| 亚洲精品成人精品456| 日韩精品中文字幕一区| 99re在线视频这里只有精品| 美女视频黄a大片欧美| 亚洲精品国产无天堂网2021| 精品99999| 在线观看亚洲a| 国产白丝精品91爽爽久久| 午夜激情一区二区| 国产精品系列在线| 欧美一区二区三区啪啪| 不卡大黄网站免费看| 久久国产视频网| 性欧美疯狂xxxxbbbb| 国产精品丝袜91| 日韩欧美在线观看一区二区三区| 色婷婷久久久综合中文字幕 | 亚洲欧美激情在线| 精品国产区一区| 欧美疯狂做受xxxx富婆| 色婷婷综合久久久中文一区二区| 韩国三级中文字幕hd久久精品| 一区二区三区av电影| 国产日韩v精品一区二区| 欧美一区二区三区视频| 欧美三级日韩三级国产三级| 不卡的av在线播放| 国产成人亚洲综合a∨猫咪| 日本欧美在线观看| 亚洲成人精品在线观看| 中文字幕一区二区三区不卡在线| 26uuu国产一区二区三区| 欧美一区二区三区视频免费 | 日韩av一区二区三区四区| 亚洲激情综合网| 中文字幕中文字幕一区二区| 久久美女艺术照精彩视频福利播放| 日韩一区二区三区高清免费看看| 欧美体内she精高潮| 色综合久久久久综合体桃花网| 丁香六月综合激情| 国产精品一卡二| 久久精品国产一区二区| 日本欧洲一区二区| 青青青爽久久午夜综合久久午夜| 亚洲va国产天堂va久久en| 亚洲精品精品亚洲| 一区二区三区中文字幕电影 | 91黄色免费看| av在线不卡网| 91在线视频在线| av在线不卡观看免费观看| 成人午夜av在线| www.在线欧美| 91在线观看下载| 91麻豆精品秘密| 色猫猫国产区一区二在线视频| 99久久精品国产导航| 99久久精品99国产精品| 91麻豆免费在线观看| 94-欧美-setu| 色婷婷激情一区二区三区| 91蝌蚪porny九色| 欧美中文字幕一区| 欧美三级电影在线看| 欧美精品第1页| 欧美一区二区视频在线观看2022| 欧美一区二区三区免费大片| 欧美一区日本一区韩国一区| 日韩视频在线一区二区| www成人在线观看| 国产清纯白嫩初高生在线观看91 | 97久久久精品综合88久久| 在线观看中文字幕不卡| 欧美日韩你懂的| 精品少妇一区二区三区在线播放 |