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

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

?? osram128x64x4.c

?? 此源碼是在LM3S6000系列上的WEBSERVER源碼,歡迎測試...
?? C
?? 第 1 頁 / 共 2 頁
字號:
//*****************************************************************************
//
// osram128x64x4.c - Driver for the OSRAM 128x64x4 graphical OLED display.
//
// Copyright (c) 2006-2007 Luminary Micro, Inc.  All rights reserved.
// 
// Software License Agreement
// 
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
// exclusively on LMI's microcontroller products.
// 
// The software is owned by LMI and/or its suppliers, and is protected under
// applicable copyright laws.  All rights are reserved.  Any use in violation
// of the foregoing restrictions may subject the user to criminal sanctions
// under applicable laws, as well as to civil liability for the breach of the
// terms and conditions of this license.
// 
// THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
// 
// This is part of revision 1387 of the Stellaris Peripheral Driver Library.
//
//*****************************************************************************

//*****************************************************************************
//
//! \addtogroup ek_lm3sx965_api
//! @{
//
//*****************************************************************************

#include "hw_ssi.h"
#include "hw_memmap.h"
#include "hw_sysctl.h"
#include "hw_types.h"
#include "debug.h"
#include "gpio.h"
#include "ssi.h"
#include "sysctl.h"
#include "osram128x64x4.h"

//*****************************************************************************
//
// Define the OSRAM 128x64x4 Remap Setting(s).  This will be used in
// several places in the code to switch between vertical and horizontal
// address incrementing.
//
// The Remap Command (0xA0) takes one 8-bit parameter.  The parameter is
// defined as follows.
//
// Bit 7: Reserved
// Bit 6: Disable(0)/Enable(1) COM Split Odd Even
//        When enabled, the COM signals are split Odd on one side, even on
//        the other.  Otherwise, they are split 0-39 on one side, 40-79 on
//        the other.
// Bit 5: Reserved
// Bit 4: Disable(0)/Enable(1) COM Remap
//        When Enabled, ROW 0-79 map to COM 79-0 (i.e. reverse row order)
// Bit 3: Reserved
// Bit 2: Horizontal(0)/Vertical(1) Address Increment
//        When set, data RAM address will increment along the column rather
//        than along the row.
// Bit 1: Disable(0)/Enable(1) Nibble Remap
//        When enabled, the upper and lower nibbles in the DATA bus for access
//        to the data RAM are swapped.
// Bit 0: Disable(0)/Enable(1) Column Address Remap
//        When enabled, DATA RAM columns 0-63 are remapped to Segment Columns
//        127-0.
//
//*****************************************************************************
#define OSRAM_INIT_REMAP    0x52
#define OSRAM_INIT_OFFSET   0x4C
static const unsigned char g_pucOSRAM128x64x4VerticalInc[]   = { 0xA0, 0x56 };
static const unsigned char g_pucOSRAM128x64x4HorizontalInc[] = { 0xA0, 0x52 };

//*****************************************************************************
//
// A 5x7 font (in a 6x8 cell, where the sixth column is omitted from this
// table) for displaying text on the OLED display.  The data is organized as
// bytes from the left column to the right column, with each byte containing
// the top row in the LSB and the bottom row in the MSB.
//
// Note:  This is the same font data that is used in the EK-LM3S811
// osram96x16x1 driver.  The single bit-per-pixel is expaned in the StringDraw
// function to the appropriate four bit-per-pixel gray scale format.
//
//*****************************************************************************
static const unsigned char g_pucFont[96][5] =
{
    { 0x00, 0x00, 0x00, 0x00, 0x00 }, // " "
    { 0x00, 0x00, 0x4f, 0x00, 0x00 }, // !
    { 0x00, 0x07, 0x00, 0x07, 0x00 }, // "
    { 0x14, 0x7f, 0x14, 0x7f, 0x14 }, // #
    { 0x24, 0x2a, 0x7f, 0x2a, 0x12 }, // $
    { 0x23, 0x13, 0x08, 0x64, 0x62 }, // %
    { 0x36, 0x49, 0x55, 0x22, 0x50 }, // &
    { 0x00, 0x05, 0x03, 0x00, 0x00 }, // '
    { 0x00, 0x1c, 0x22, 0x41, 0x00 }, // (
    { 0x00, 0x41, 0x22, 0x1c, 0x00 }, // )
    { 0x14, 0x08, 0x3e, 0x08, 0x14 }, // *
    { 0x08, 0x08, 0x3e, 0x08, 0x08 }, // +
    { 0x00, 0x50, 0x30, 0x00, 0x00 }, // ,
    { 0x08, 0x08, 0x08, 0x08, 0x08 }, // -
    { 0x00, 0x60, 0x60, 0x00, 0x00 }, // .
    { 0x20, 0x10, 0x08, 0x04, 0x02 }, // /
    { 0x3e, 0x51, 0x49, 0x45, 0x3e }, // 0
    { 0x00, 0x42, 0x7f, 0x40, 0x00 }, // 1
    { 0x42, 0x61, 0x51, 0x49, 0x46 }, // 2
    { 0x21, 0x41, 0x45, 0x4b, 0x31 }, // 3
    { 0x18, 0x14, 0x12, 0x7f, 0x10 }, // 4
    { 0x27, 0x45, 0x45, 0x45, 0x39 }, // 5
    { 0x3c, 0x4a, 0x49, 0x49, 0x30 }, // 6
    { 0x01, 0x71, 0x09, 0x05, 0x03 }, // 7
    { 0x36, 0x49, 0x49, 0x49, 0x36 }, // 8
    { 0x06, 0x49, 0x49, 0x29, 0x1e }, // 9
    { 0x00, 0x36, 0x36, 0x00, 0x00 }, // :
    { 0x00, 0x56, 0x36, 0x00, 0x00 }, // ;
    { 0x08, 0x14, 0x22, 0x41, 0x00 }, // <
    { 0x14, 0x14, 0x14, 0x14, 0x14 }, // =
    { 0x00, 0x41, 0x22, 0x14, 0x08 }, // >
    { 0x02, 0x01, 0x51, 0x09, 0x06 }, // ?
    { 0x32, 0x49, 0x79, 0x41, 0x3e }, // @
    { 0x7e, 0x11, 0x11, 0x11, 0x7e }, // A
    { 0x7f, 0x49, 0x49, 0x49, 0x36 }, // B
    { 0x3e, 0x41, 0x41, 0x41, 0x22 }, // C
    { 0x7f, 0x41, 0x41, 0x22, 0x1c }, // D
    { 0x7f, 0x49, 0x49, 0x49, 0x41 }, // E
    { 0x7f, 0x09, 0x09, 0x09, 0x01 }, // F
    { 0x3e, 0x41, 0x49, 0x49, 0x7a }, // G
    { 0x7f, 0x08, 0x08, 0x08, 0x7f }, // H
    { 0x00, 0x41, 0x7f, 0x41, 0x00 }, // I
    { 0x20, 0x40, 0x41, 0x3f, 0x01 }, // J
    { 0x7f, 0x08, 0x14, 0x22, 0x41 }, // K
    { 0x7f, 0x40, 0x40, 0x40, 0x40 }, // L
    { 0x7f, 0x02, 0x0c, 0x02, 0x7f }, // M
    { 0x7f, 0x04, 0x08, 0x10, 0x7f }, // N
    { 0x3e, 0x41, 0x41, 0x41, 0x3e }, // O
    { 0x7f, 0x09, 0x09, 0x09, 0x06 }, // P
    { 0x3e, 0x41, 0x51, 0x21, 0x5e }, // Q
    { 0x7f, 0x09, 0x19, 0x29, 0x46 }, // R
    { 0x46, 0x49, 0x49, 0x49, 0x31 }, // S
    { 0x01, 0x01, 0x7f, 0x01, 0x01 }, // T
    { 0x3f, 0x40, 0x40, 0x40, 0x3f }, // U
    { 0x1f, 0x20, 0x40, 0x20, 0x1f }, // V
    { 0x3f, 0x40, 0x38, 0x40, 0x3f }, // W
    { 0x63, 0x14, 0x08, 0x14, 0x63 }, // X
    { 0x07, 0x08, 0x70, 0x08, 0x07 }, // Y
    { 0x61, 0x51, 0x49, 0x45, 0x43 }, // Z
    { 0x00, 0x7f, 0x41, 0x41, 0x00 }, // [
    { 0x02, 0x04, 0x08, 0x10, 0x20 }, // "\"
    { 0x00, 0x41, 0x41, 0x7f, 0x00 }, // ]
    { 0x04, 0x02, 0x01, 0x02, 0x04 }, // ^
    { 0x40, 0x40, 0x40, 0x40, 0x40 }, // _
    { 0x00, 0x01, 0x02, 0x04, 0x00 }, // `
    { 0x20, 0x54, 0x54, 0x54, 0x78 }, // a
    { 0x7f, 0x48, 0x44, 0x44, 0x38 }, // b
    { 0x38, 0x44, 0x44, 0x44, 0x20 }, // c
    { 0x38, 0x44, 0x44, 0x48, 0x7f }, // d
    { 0x38, 0x54, 0x54, 0x54, 0x18 }, // e
    { 0x08, 0x7e, 0x09, 0x01, 0x02 }, // f
    { 0x0c, 0x52, 0x52, 0x52, 0x3e }, // g
    { 0x7f, 0x08, 0x04, 0x04, 0x78 }, // h
    { 0x00, 0x44, 0x7d, 0x40, 0x00 }, // i
    { 0x20, 0x40, 0x44, 0x3d, 0x00 }, // j
    { 0x7f, 0x10, 0x28, 0x44, 0x00 }, // k
    { 0x00, 0x41, 0x7f, 0x40, 0x00 }, // l
    { 0x7c, 0x04, 0x18, 0x04, 0x78 }, // m
    { 0x7c, 0x08, 0x04, 0x04, 0x78 }, // n
    { 0x38, 0x44, 0x44, 0x44, 0x38 }, // o
    { 0x7c, 0x14, 0x14, 0x14, 0x08 }, // p
    { 0x08, 0x14, 0x14, 0x18, 0x7c }, // q
    { 0x7c, 0x08, 0x04, 0x04, 0x08 }, // r
    { 0x48, 0x54, 0x54, 0x54, 0x20 }, // s
    { 0x04, 0x3f, 0x44, 0x40, 0x20 }, // t
    { 0x3c, 0x40, 0x40, 0x20, 0x7c }, // u
    { 0x1c, 0x20, 0x40, 0x20, 0x1c }, // v
    { 0x3c, 0x40, 0x30, 0x40, 0x3c }, // w
    { 0x44, 0x28, 0x10, 0x28, 0x44 }, // x
    { 0x0c, 0x50, 0x50, 0x50, 0x3c }, // y
    { 0x44, 0x64, 0x54, 0x4c, 0x44 }, // z
    { 0x00, 0x08, 0x36, 0x41, 0x00 }, // {
    { 0x00, 0x00, 0x7f, 0x00, 0x00 }, // |
    { 0x00, 0x41, 0x36, 0x08, 0x00 }, // }
    { 0x02, 0x01, 0x02, 0x04, 0x02 }, // ~
    { 0x02, 0x01, 0x02, 0x04, 0x02 }, // ~
};

//*****************************************************************************
//
// The sequence of commands used to initialize the SSD0303 controller.  Each
// command is described as follows:  there is a byte specifying the number of
// bytes in the command sequence, followed by that many bytes of command data.
// Note:  This initialization sequence is derived from OSRAM App Note AN018.
//
//*****************************************************************************
static const unsigned char g_pucOSRAM128x64x4Init[] =
{
    //
    // Column Address
    //
    4, 0x15, 0, 63, 0xe3,

    //
    // Row Address
    //
    4, 0x75, 0, 63, 0xe3,

    //
    // Contrast Control
    //
    3, 0x81, 50, 0xe3,

    //
    // Half Current Range
    //
    2, 0x85, 0xe3,

    //
    // Display Re-map
    //
    3, 0xA0, OSRAM_INIT_REMAP, 0xe3,

    //
    // Display Start Line
    //
    3, 0xA1, 0, 0xe3,

    //
    // Display Offset
    //
    3, 0xA2, OSRAM_INIT_OFFSET, 0xe3,

    //
    // Display Mode Normal
    //
    2, 0xA4, 0xe3,

    //
    // Multiplex Ratio
    //
    3, 0xA8, 63, 0xe3,

    //
    // Phase Length
    //
    3, 0xB1, 0x22, 0xe3,

    //
    // Row Period
    //
    3, 0xB2, 70, 0xe3,

    //
    // Display Clock Divide
    //
    3, 0xB3, 0xF1, 0xe3,

    //
    // VSL
    //
    3, 0xBF, 0x0D, 0xe3,

    //
    // VCOMH
    //
    3, 0xBE, 0x02, 0xe3,

    //
    // VP
    //
    3, 0xBC, 0x10, 0xe3,

    //
    // Gamma
    //
    10, 0xB8, 0x01, 0x11, 0x22, 0x32, 0x43, 0x54, 0x65, 0x76, 0xe3,

    //
    // Set DC-DC
    3, 0xAD, 0x03, 0xe3,

    //
    // Display ON/OFF
    //
    2, 0xAF, 0xe3,
};

//*****************************************************************************
//
//! \internal
//!
//! Write a sequence of command bytes to the SSD0323 controller.
//!
//! 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
OSRAMWriteCommand(const unsigned char *pucBuffer, unsigned long ulCount)
{
    unsigned long ulTemp;

    //
    // Clear the command/control bit to enable command mode.
    //
    GPIOPinWrite(GPIO_PORTC_BASE, GPIO_PIN_7, 0);

    //
    // Loop while there are more bytes left to be transferred.
    //
    while(ulCount != 0)
    {
        //
        // Write the next byte to the controller.
        //
        SSIDataPut(SSI0_BASE, *pucBuffer++);

        //
        // Dummy read to drain the fifo and time the GPIO signal.
        //
        SSIDataGet(SSI0_BASE, &ulTemp);

        //
        // Decrement the BYTE counter.
        //
        ulCount--;
    }
}

//*****************************************************************************
//
//! \internal
//!
//! Write a sequence of data bytes to the SSD0323 controller.
//!
//! 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
OSRAMWriteData(const unsigned char *pucBuffer, unsigned long ulCount)
{
    unsigned long ulTemp;

    //
    // Set the command/control bit to enable data mode.
    //
    GPIOPinWrite(GPIO_PORTC_BASE, GPIO_PIN_7, GPIO_PIN_7);

    //
    // Loop while there are more bytes left to be transferred.
    //
    while(ulCount != 0)
    {
        //
        // Write the next byte to the controller.
        //
        SSIDataPut(SSI0_BASE, *pucBuffer++);

        //
        // Dummy read to drain the fifo and time the GPIO signal.
        //
        SSIDataGet(SSI0_BASE, &ulTemp);

        //
        // Decrement the BYTE counter.
        //
        ulCount--;
    }
}

//*****************************************************************************
//
//! Clears the OLED display.
//!
//! This function will clear the display RAM.  All pixels in the display will
//! be turned off.
//!
//! \return None.
//
//*****************************************************************************
void
OSRAM128x64x4Clear(void)
{
    static const unsigned char pucCommand1[] = { 0x15, 0, 63 };
    static const unsigned char pucCommand2[] = { 0x75, 0, 79 };
    unsigned long ulRow, ulColumn;
    static unsigned char pucZeroBuffer[8] = { 0, 0, 0, 0, 0, 0, 0, 0};

    //
    // Set the window to fill the entire display.
    //
    OSRAMWriteCommand(pucCommand1, sizeof(pucCommand1));
    OSRAMWriteCommand(pucCommand2, sizeof(pucCommand2));
    OSRAMWriteCommand(g_pucOSRAM128x64x4VerticalInc,
                      sizeof(g_pucOSRAM128x64x4VerticalInc));

    //
    // In vertical address increment mode, loop through each column, filling
    // each row with 0.
    //
    for(ulColumn = 0; ulColumn < (128/2); ulColumn++)
    {
        //
        // 8 rows (bytes) per row of text.
        //
        for(ulRow = 0; ulRow < 80; ulRow += 8)
        {
            OSRAMWriteData(pucZeroBuffer, sizeof(pucZeroBuffer));

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人黄色软件下载| 春色校园综合激情亚洲| 日本一区二区成人| 欧美网站一区二区| 成人av在线播放网址| 久色婷婷小香蕉久久| 一区二区三区欧美日韩| 久久精品综合网| 欧美一级搡bbbb搡bbbb| 91黄色激情网站| 成人毛片视频在线观看| 久久精品国产一区二区三区免费看 | 狠狠色伊人亚洲综合成人| 亚洲黄色小视频| 国产精品久久夜| 久久精品亚洲精品国产欧美| 欧美一三区三区四区免费在线看| 色婷婷一区二区三区四区| 成人免费看黄yyy456| 精品一区二区在线免费观看| 亚洲成人精品一区| 亚洲卡通动漫在线| 日韩码欧中文字| 中文字幕在线不卡一区二区三区 | 欧美三级日本三级少妇99| 成人午夜激情视频| 国产精品538一区二区在线| 久久99久久精品| 人人狠狠综合久久亚洲| 婷婷丁香久久五月婷婷| 亚洲第一狼人社区| 午夜精品福利一区二区三区蜜桃| 亚洲精品视频在线看| 亚洲人成精品久久久久| 中文字幕一区二区三区在线观看| 国产欧美日韩不卡免费| 国产午夜三级一区二区三| 久久综合九色综合97婷婷| 亚洲444eee在线观看| 一区二区欧美精品| 亚洲国产精品精华液网站| 亚洲在线视频免费观看| 亚洲一二三区在线观看| 亚洲成av人在线观看| 天堂成人国产精品一区| 婷婷久久综合九色综合绿巨人 | 成人h动漫精品一区二区| 国产激情偷乱视频一区二区三区| 国产一区二区三区在线观看精品 | 精品免费视频.| 久久久久亚洲蜜桃| 国产日韩成人精品| 亚洲欧洲成人精品av97| 亚洲制服丝袜av| 人禽交欧美网站| 国产一二三精品| 白白色亚洲国产精品| 色吊一区二区三区 | 国产精品视频观看| 日韩伦理av电影| 亚洲成a人片综合在线| 美女一区二区视频| 丰满亚洲少妇av| 欧美综合久久久| 日韩亚洲电影在线| 中文字幕免费观看一区| 一区二区三区在线视频观看| 日本在线播放一区二区三区| 狠狠色狠狠色综合系列| 9色porny自拍视频一区二区| 欧美制服丝袜第一页| 日韩一级大片在线观看| 中文字幕免费不卡| 亚洲v中文字幕| 国产精品资源网| 欧美性猛交xxxx乱大交退制版| 欧美一区三区二区| 国产精品麻豆视频| 五月综合激情网| 丁香婷婷综合五月| 欧美精品日韩综合在线| 久久久久久久综合色一本| 亚洲乱码国产乱码精品精可以看| 日韩av不卡一区二区| 成人免费高清在线| 制服丝袜亚洲网站| 国产精品久久久久久久岛一牛影视| 亚洲国产精品久久久久秋霞影院 | 国产精品一级黄| 在线免费亚洲电影| 国产午夜精品一区二区三区视频 | 亚洲乱码国产乱码精品精小说| 美女视频黄a大片欧美| 99久久精品99国产精品| 日韩欧美中文字幕公布| 亚洲码国产岛国毛片在线| 国产一区二区在线视频| 欧美系列一区二区| 国产精品动漫网站| 欧美区在线观看| 亚洲色图视频网| 国产美女在线精品| 欧美一区二区三区思思人| 亚洲人成伊人成综合网小说| 蜜桃精品在线观看| 欧美视频精品在线观看| 国产精品麻豆网站| 国产一区中文字幕| 日韩亚洲国产中文字幕欧美| 一区二区三区欧美| 91麻豆精品在线观看| 国产色产综合色产在线视频| 久久精品国产色蜜蜜麻豆| 欧美日韩国产bt| 亚洲黄色尤物视频| 色伊人久久综合中文字幕| 欧美经典一区二区| 国产在线不卡一区| www成人在线观看| 蜜桃av噜噜一区| 欧美电影在哪看比较好| 亚洲国产毛片aaaaa无费看| 91色.com| 亚洲情趣在线观看| 97精品国产露脸对白| 中文字幕一区二区不卡| 国产成人av电影在线观看| 欧美mv和日韩mv的网站| 男女男精品视频| 日韩女优电影在线观看| 蜜桃视频在线观看一区二区| 91.com视频| 美女视频黄久久| 精品免费日韩av| 国内外成人在线视频| 久久一区二区三区国产精品| 久久99久久99| 国产午夜精品理论片a级大结局 | 国产精品入口麻豆原神| 国产成人午夜片在线观看高清观看| 久久久综合视频| 国产成人精品免费视频网站| 欧美韩国一区二区| 97久久精品人人做人人爽| 亚洲精品成人在线| 91久久人澡人人添人人爽欧美| 夜夜精品视频一区二区 | 欧美亚洲愉拍一区二区| 亚洲va中文字幕| 日韩一区二区三区视频在线| 美女一区二区三区| 久久精品人人做人人爽人人| 国产69精品久久777的优势| 中文字幕色av一区二区三区| 色婷婷av一区二区三区软件 | 国产成人精品免费视频网站| 国产精品色在线| 色哦色哦哦色天天综合| 亚洲第一电影网| 日韩精品一区国产麻豆| 国产精华液一区二区三区| |精品福利一区二区三区| 欧美日韩黄色一区二区| 精品一区二区三区在线播放| 国产日产精品一区| 日本乱人伦aⅴ精品| 日韩精品一级中文字幕精品视频免费观看 | 国产成人精品一区二区三区网站观看| 国产精品免费久久久久| 欧美系列亚洲系列| 激情综合网天天干| 亚洲免费观看高清完整版在线观看| 欧美三级电影在线看| 精品一区二区三区av| 中文字幕日韩欧美一区二区三区| 在线观看三级视频欧美| 韩国成人精品a∨在线观看| 亚洲男帅同性gay1069| 日韩视频永久免费| 91视频国产观看| 久久91精品国产91久久小草| 中文字幕中文字幕在线一区| 91精品国产一区二区人妖| 99久久精品费精品国产一区二区| 午夜一区二区三区视频| 国产精品视频你懂的| 91精品国产综合久久蜜臀| www.99精品| 国产一区视频导航| 亚洲1区2区3区4区| 国产成人免费视频一区| 亚洲国产另类av| 国产精品乱人伦中文| 日韩一区二区三区四区五区六区| 色综合一个色综合| 国产精品综合一区二区| 三级成人在线视频| 亚洲精品国久久99热| 国产亚洲欧美日韩俺去了| 日韩一区二区三区免费看 |