亚洲欧美第一页_禁久久精品乱码_粉嫩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 頁 / 共 2 頁
字號:
//*****************************************************************************
//
// osram96x16.c - Driver for the OSRAM 96x16 graphical OLED display.
//
// Copyright (c) 2006 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 Stellaris Family of 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 816 of the Stellaris Driver Library.
//
//*****************************************************************************

//*****************************************************************************
//
//! \addtogroup ev_lm3s811_api
//! @{
//
//*****************************************************************************

#include "hw_i2c.h"
#include "hw_memmap.h"
#include "hw_sysctl.h"
#include "hw_types.h"
#include "src/debug.h"
#include "src/gpio.h"
#include "src/i2c.h"
#include "src/sysctl.h"
#include "osram96x16.h"

extern void I2CMasterInitExpClk(unsigned long ulBase, unsigned long ulI2CClk,  tBoolean bFast);
//*****************************************************************************
//
// The I2C slave address of the SSD0303 controller on the OLED display.
//
//*****************************************************************************
#define SSD0303_ADDR            0x3d

//*****************************************************************************
//
// 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.
//
//*****************************************************************************
static const unsigned char g_pucFont[95][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 }, // ~
};

//*****************************************************************************
//
// 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 I2C transfer, followed by that many bytes of command data.
//
//*****************************************************************************
static const unsigned char g_pucOSRAMInit[] =
{
    //
    // Turn off the panel
    //
    0x02, 0x80, 0xae,

    //
    // Set lower column address
    //
    0x02, 0x80, 0x04,

    //
    // Set higher column address
    //
    0x02, 0x80, 0x12,

    //
    // Set contrast control register
    //
    0x04, 0x80, 0x81, 0x80, 0x2b,

    //
    // Set segment re-map
    //
    0x02, 0x80, 0xa1,

    //
    // Set display start line
    //
    0x02, 0x80, 0x40,

    //
    // Set display offset
    //
    0x04, 0x80, 0xd3, 0x80, 0x00,

    //
    // Set multiplex ratio
    //
    0x04, 0x80, 0xa8, 0x80, 0x0f,

    //
    // Set the display to normal mode
    //
    0x02, 0x80, 0xa4,

    //
    // Non-inverted display
    //
    0x02, 0x80, 0xa6,

    //
    // Set the page address
    //
    0x02, 0x80, 0xb0,

    //
    // Set COM output scan direction
    //
    0x02, 0x80, 0xc8,

    //
    // Set display clock divide ratio/oscillator frequency
    //
    0x04, 0x80, 0xd5, 0x80, 0x72,

    //
    // Enable mono mode
    //
    0x04, 0x80, 0xd8, 0x80, 0x00,

    //
    // Set pre-charge period
    //
    0x04, 0x80, 0xd9, 0x80, 0x22,

    //
    // Set COM pins hardware configuration
    //
    0x04, 0x80, 0xda, 0x80, 0x12,

    //
    // Set VCOM deslect level
    //
    0x04, 0x80, 0xdb, 0x80, 0x0f,

    //
    // Set DC-DC on
    //
    0x04, 0x80, 0xad, 0x80, 0x8b,

    //
    // Turn on the panel
    //
    0x02, 0x80, 0xaf,
};

//*****************************************************************************
//
// The inter-byte delay required by the SSD0303 OLED controller.
//
//*****************************************************************************
static unsigned long g_ulDelay;

//*****************************************************************************
//
//! \internal
//!
//! Provide a small delay.
//!
//! \param ulCount is the number of delay loop iterations to perform.
//!
//! Since the SSD0303 controller needs a delay between bytes written to it over
//! the I2C bus, this function provides a means of generating that delay.  It
//! is written in assembly to keep the delay consistent across tool chains,
//! avoiding the need to tune the delay based on the tool chain in use.
//!
//! \return None.
//
//*****************************************************************************
#if defined(ewarm)
static void
OSRAMDelay(unsigned long ulCount)
{
    __asm("    subs    r0, #1\n"
          "    bne     OSRAMDelay\n"
          "    bx      lr");
}
#endif
#if defined(gcc)
static void __attribute__((naked))
OSRAMDelay(unsigned long ulCount)
{
    __asm("    subs    r0, #1\n"
          "    bne     OSRAMDelay\n"
          "    bx      lr");
}
#endif
#if defined(rvmdk) || defined(__ARMCC_VERSION)
__asm void
OSRAMDelay(unsigned long ulCount)
{
    subs    r0, #1;
    bne     OSRAMDelay;
    bx      lr;
}
#endif

//*****************************************************************************
//
//! \internal
//!
//! Start a transfer to the SSD0303 controller.
//!
//! \param ucChar is the first byte to be written to the controller.
//!
//! This function will start a transfer to the SSD0303 controller via the I2C
//! bus.
//!
//! 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
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);

    //

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久久久久久久电影| 国产九色sp调教91| 国产精品国产三级国产普通话99| 欧美sm美女调教| 欧美一区二区三区在线电影| 欧美人与禽zozo性伦| 日本二三区不卡| 91丨九色丨国产丨porny| yourporn久久国产精品| 成人av资源站| 91一区二区在线| 欧美在线观看视频在线| 欧美色区777第一页| 欧美色网站导航| 88在线观看91蜜桃国自产| 欧美一区二区三区免费观看视频| 日韩一区二区三区四区| 欧美xxxxxxxx| 久久精品水蜜桃av综合天堂| 中文一区在线播放| 亚洲一二三四区| 美女网站在线免费欧美精品| 国模大尺度一区二区三区| caoporen国产精品视频| 欧美亚洲综合久久| 精品国产凹凸成av人导航| 国产日韩精品一区二区三区| 中文字幕一区二区三区av| 亚洲丶国产丶欧美一区二区三区| 美女网站一区二区| 成人激情校园春色| 精品婷婷伊人一区三区三| 日韩美女视频在线| 亚洲色图欧美偷拍| 蜜桃视频一区二区三区在线观看| 国产精品亚洲人在线观看| 色综合久久久久网| 日韩免费观看高清完整版在线观看| 久久在线观看免费| 亚洲综合999| 国产麻豆视频一区二区| 欧美性色综合网| 国产欧美日韩中文久久| 香蕉加勒比综合久久| 国产综合久久久久影院| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 日韩三级.com| 亚洲福中文字幕伊人影院| 国产成人午夜精品5599| 91精品婷婷国产综合久久 | 亚洲精品乱码久久久久久黑人| 亚洲成人在线网站| 成人免费看黄yyy456| 欧美大片顶级少妇| 亚洲成a人在线观看| 99在线热播精品免费| 精品久久久久久久久久久久久久久 | 国产亚洲综合性久久久影院| 午夜精品久久久久久久久久久| 丰满少妇久久久久久久| 日韩精品一区二区三区中文不卡| 亚洲免费观看高清| 不卡的av电影在线观看| 久久蜜桃一区二区| 精久久久久久久久久久| 88在线观看91蜜桃国自产| 亚洲小说欧美激情另类| 色欧美片视频在线观看 | 成人av免费在线播放| 精品国产a毛片| 麻豆精品一区二区三区| 欧美一区二区成人6969| 日韩成人dvd| 欧美精品精品一区| 日日夜夜精品视频免费| 欧美日韩色综合| 亚洲成人自拍网| 6080国产精品一区二区| 日本少妇一区二区| 日韩精品一区二区三区视频播放| 丝袜a∨在线一区二区三区不卡| 欧美影院精品一区| 午夜精品福利一区二区三区av| 欧洲精品中文字幕| 亚洲va天堂va国产va久| 欧美三级三级三级| 蜜臀av亚洲一区中文字幕| 欧美mv日韩mv亚洲| 国产白丝网站精品污在线入口| 亚洲国产精品高清| 日本高清不卡视频| 日韩av在线播放中文字幕| 欧美电视剧免费全集观看| 国产综合成人久久大片91| 久久久久久久久久看片| 成人av网站免费| 亚洲高清免费在线| xnxx国产精品| 91在线精品秘密一区二区| 亚洲国产精品人人做人人爽| 欧美一区二区在线免费播放 | 久久精品在这里| 色综合一区二区| 亚洲福利视频三区| 久久久av毛片精品| 在线欧美日韩精品| 狠狠久久亚洲欧美| 伊人性伊人情综合网| 日韩一级黄色大片| 99re亚洲国产精品| 久久se这里有精品| 亚洲精品免费电影| 久久久91精品国产一区二区三区| 91亚洲国产成人精品一区二区三| 秋霞国产午夜精品免费视频| 欧美激情一区不卡| 欧美成人乱码一区二区三区| 99久久久久久| 久久精品72免费观看| 亚洲精品免费视频| 国产亚洲精久久久久久| 欧美日本在线一区| 91色在线porny| 国产精品中文字幕日韩精品| 亚洲与欧洲av电影| 国产精品嫩草影院av蜜臀| 欧美猛男超大videosgay| 成人免费高清在线| 国产综合色产在线精品| 日韩av高清在线观看| 亚洲图片激情小说| 中文乱码免费一区二区| 日韩精品在线网站| 日韩丝袜美女视频| 宅男噜噜噜66一区二区66| 色网站国产精品| 不卡的av网站| 国产a级毛片一区| 老司机午夜精品| 日本特黄久久久高潮| 亚洲bt欧美bt精品| 亚洲国产一区二区在线播放| 成人免费在线播放视频| 中文字幕第一页久久| 久久亚洲影视婷婷| 精品福利一区二区三区免费视频| 91麻豆精品91久久久久久清纯| 在线观看亚洲成人| 在线看国产一区| 在线观看网站黄不卡| 色呦呦一区二区三区| 97超碰欧美中文字幕| 91免费看`日韩一区二区| 不卡一二三区首页| 91视视频在线直接观看在线看网页在线看 | 日本一二三四高清不卡| 国产欧美日韩在线观看| 欧美激情一区二区| 日韩美女视频19| 亚洲手机成人高清视频| 亚洲男人的天堂在线观看| 亚洲人快播电影网| 亚洲激情在线播放| 亚洲一区二区黄色| 奇米综合一区二区三区精品视频| 日韩精品91亚洲二区在线观看| 日本中文字幕不卡| 国产一区二区精品久久99| 国产成人在线视频播放| 不卡的av在线播放| 欧美日韩国产123区| 欧美午夜精品久久久| 欧美人妇做爰xxxⅹ性高电影| 91精品免费在线观看| 亚洲精品一区二区三区四区高清 | 日本一区二区高清| 亚洲黄色录像片| 午夜精品一区二区三区三上悠亚| 日本不卡一二三区黄网| 极品美女销魂一区二区三区免费| 国内精品国产成人国产三级粉色| 粉嫩高潮美女一区二区三区| 91久久国产最好的精华液| 欧美肥妇bbw| 国产日产欧美一区二区三区| 亚洲私人影院在线观看| 日韩精品亚洲专区| 丰满白嫩尤物一区二区| 欧美老女人第四色| 欧美激情一区在线| 手机精品视频在线观看| 懂色av中文一区二区三区| 日本久久一区二区| 亚洲精品一区二区三区蜜桃下载| 综合久久久久综合| 九九视频精品免费| 欧美综合天天夜夜久久| 国产欧美日韩综合精品一区二区| 亚洲第一成人在线| aaa国产一区|