亚洲欧美第一页_禁久久精品乱码_粉嫩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 頁
字號:
            //
            // 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.
    //
    I2CMasterInitExpClk(I2C_MASTER_BASE, SysCtlClockGet(), 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.
//! @}
//
//*****************************************************************************

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久亚洲一级片| 亚洲色欲色欲www| 欧美性做爰猛烈叫床潮| 国产风韵犹存在线视精品| 蜜臀av性久久久久蜜臀av麻豆| 亚洲国产精品天堂| 日韩欧美一区二区不卡| 这里只有精品电影| 日韩午夜在线观看| 精品国产免费视频| 精品va天堂亚洲国产| 国产欧美日本一区视频| 久久婷婷成人综合色| 日本一二三四高清不卡| 亚洲视频香蕉人妖| 亚洲国产成人精品视频| 日韩一区中文字幕| 1000精品久久久久久久久| 亚洲男帅同性gay1069| 亚洲美女屁股眼交| 精品一区二区三区影院在线午夜| 国产成人av电影在线| 不卡av在线免费观看| 欧美日韩精品欧美日韩精品| 精品久久一区二区| 国产精品理论片在线观看| 亚洲天堂成人网| 亚洲成a人片在线观看中文| 亚洲bdsm女犯bdsm网站| 高清不卡一区二区| 高清不卡在线观看| 在线播放中文字幕一区| 久久精品夜色噜噜亚洲a∨| 强制捆绑调教一区二区| 狠狠v欧美v日韩v亚洲ⅴ| 色综合久久中文综合久久牛| 日韩三级视频中文字幕| 一区二区视频在线看| 国产福利91精品一区二区三区| 99re6这里只有精品视频在线观看| 91精品在线一区二区| 一级日本不卡的影视| 免费三级欧美电影| 欧美亚洲综合久久| 国产精品欧美一级免费| 国产aⅴ综合色| 欧美大片一区二区| 亚洲综合成人网| 91在线观看美女| 国产欧美日韩三区| 国产在线精品视频| 精品免费视频.| 久久99精品久久久久婷婷| 欧美日韩免费电影| 亚洲永久免费av| 欧美伊人久久久久久久久影院| 国产精品你懂的在线欣赏| 久久99久久99| 337p亚洲精品色噜噜噜| 亚洲成人高清在线| 3d动漫精品啪啪一区二区竹菊| 亚洲伊人伊色伊影伊综合网| 91猫先生在线| 亚洲一线二线三线视频| 欧美性大战久久| 视频一区二区欧美| 久久综合精品国产一区二区三区| 国内精品久久久久影院一蜜桃| 337p日本欧洲亚洲大胆精品| 精品亚洲成a人| 中日韩av电影| 国产在线看一区| 国产精品免费丝袜| 欧美图区在线视频| 日韩av中文字幕一区二区三区| 欧美一级日韩不卡播放免费| 麻豆精品视频在线观看| 久久久www免费人成精品| 99久久精品费精品国产一区二区| 樱花草国产18久久久久| 日韩欧美高清在线| 日本乱人伦一区| 亚洲成人动漫一区| 国产女人18毛片水真多成人如厕| 成人国产一区二区三区精品| 日韩精品欧美精品| 亚洲黄色性网站| 久久久一区二区三区捆绑**| 欧美一区二区三区婷婷月色| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 日韩精品资源二区在线| 成人午夜看片网址| 国产精品亚洲成人| 美女国产一区二区| 亚洲一区二区在线播放相泽 | 国产麻豆午夜三级精品| 亚洲动漫第一页| 最新欧美精品一区二区三区| 精品国产百合女同互慰| 8v天堂国产在线一区二区| 欧美色图12p| 91久久国产最好的精华液| 91在线丨porny丨国产| 精品午夜一区二区三区在线观看| 亚洲综合一区二区精品导航| 国产精品国产三级国产普通话蜜臀| 精品国产一区二区三区忘忧草| 884aa四虎影成人精品一区| 欧洲精品一区二区| 一本大道av一区二区在线播放| 成人视屏免费看| 国产成人免费9x9x人网站视频| 国产综合色视频| 极品瑜伽女神91| 国产一区二区福利| 国产一区二区美女| 91啪亚洲精品| 日韩欧美中文字幕精品| 久久丝袜美腿综合| 亚洲欧美一区二区三区孕妇| 久久精工是国产品牌吗| 日韩va欧美va亚洲va久久| 日韩精品欧美成人高清一区二区| 亚洲成人资源在线| 日本午夜一本久久久综合| 国产最新精品精品你懂的| 成人精品在线视频观看| 色婷婷综合视频在线观看| 欧美老女人第四色| 精品日本一线二线三线不卡| 日韩一二三区视频| 中文字幕久久午夜不卡| 亚洲免费观看高清完整| 日韩av不卡一区二区| 国产成人免费视频| 欧美性xxxxx极品少妇| 7777女厕盗摄久久久| 国产精品久久毛片a| 日本不卡不码高清免费观看| 国产精品综合久久| 精品视频在线看| 国产片一区二区三区| 视频一区二区欧美| 成人的网站免费观看| 欧美一级日韩一级| 亚洲精品成a人| 国模少妇一区二区三区| 欧美手机在线视频| 中文字幕免费不卡| 老司机精品视频在线| 91久久香蕉国产日韩欧美9色| 亚洲精品在线免费观看视频| 一区二区在线免费| 99精品久久免费看蜜臀剧情介绍| 日韩三级精品电影久久久| 亚洲成人激情av| 色美美综合视频| 中文字幕第一区二区| 国产一区二区三区免费观看| 色屁屁一区二区| 日韩一区在线免费观看| 国产99久久久国产精品免费看| 777午夜精品免费视频| 一区二区三区四区在线| 91色乱码一区二区三区| 国内成+人亚洲+欧美+综合在线| 欧美电视剧免费观看| 捆绑变态av一区二区三区| 欧美一级二级三级乱码| 五月婷婷综合激情| 日韩欧美在线1卡| 麻豆91小视频| 26uuu久久综合| 国产精品影音先锋| 日本一区二区三区四区在线视频 | 国内精品伊人久久久久影院对白| 精品福利一二区| 国产精品亚洲午夜一区二区三区 | 国产主播一区二区三区| 久久久精品一品道一区| 成人精品视频.| 一区二区三区免费在线观看| 欧美老女人第四色| 极品尤物av久久免费看| 国产精品国产三级国产专播品爱网| 99精品在线观看视频| 午夜激情一区二区| 国产日韩综合av| 欧美日韩一区二区在线观看 | 国产精品欧美一级免费| 日本道色综合久久| 久久99热国产| 亚洲精品中文字幕乱码三区 | 国产亚洲一本大道中文在线| 日本高清不卡aⅴ免费网站| 精品一区二区在线视频| 一个色综合av| 国产日韩欧美在线一区| 91精品婷婷国产综合久久竹菊| av一二三不卡影片|