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

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

?? lcd_driver.c

?? butterfly MP3源代碼
?? C
字號:
//*****************************************************************************////  File........: LCD_driver.c////  Author(s)...: ATMEL Norway////  Target(s)...: ATmega169////  Compiler....: AVR-GCC 3.3.1; avr-libc 1.0////  Description.: Functions used to control the AVR Butterfly LCD////  Revisions...: 1.0////  YYYYMMDD - VER. - COMMENT                                       - SIGN.////  20021015 - 1.0  - Written for STK502                            - JLL//  20030116 - 2.0  - Code adapted to AVR Butterfly                 - KS//  20031009          port to avr-gcc/avr-libc                      - M.Thomas////*****************************************************************************// Include files.#include <avr/io.h>#include <avr/pgmspace.h>#include <inttypes.h>#include <avr/signal.h>// mt - only for AUTO:#include "main.h"// mt - for gButtonTimeout#include "button.h"#include "LCD_driver.h"#include "avrfat16.h"#define BOOL    char#define FALSE   0#define TRUE    (!FALSE)// Variable from "button.c" to prevent button-bouncingextern unsigned char gButtonTimeout;    extern BOOL gAutoPressJoystick;// Used to indicate when the LCD interrupt handler should update the LCD// mt jw char gLCD_Update_Required = FALSE;volatile char gLCD_Update_Required = FALSE;// LCD display buffer (for double buffering).char LCD_Data[LCD_REGISTER_COUNT];// Buffer that contains the text to be displayed// Note: Bit 7 indicates that this character is flashingchar gTextBuffer[TEXTBUFFER_SIZE];// Only six letters can be shown on the LCD.// With the gScroll and gScrollMode variables,// one can select which part of the buffer to showvolatile signed char gScroll;volatile char gScrollMode;////Start-up delay before scrolling a string over the LCDchar gLCD_Start_Scroll_Timer = 0;// The gFlashTimer is used to determine the on/off// timing of flashing characterschar gFlashTimer = 0;// Turns on/off the colons on the LCDchar gColon = 0;// switch to filename rather than standard bufferchar gShowFilename;// Look-up table used when converting ASCII to// LCD display data (segment control)// mt __flash unsigned int LCD_character_table[] =unsigned int LCD_character_table[] PROGMEM ={    0x0A51,     // '*' Degree sign    0x2A80,     // '+'    0x4000,     // ',' (Not defined)    0x0A00,     // '-'    0x8000,     // '.'     0x4008,     // '/' (Not defined)    0x5559,     // '0'    0x0118,     // '1'    0x1e11,     // '2    0x1b11,     // '3    0x0b50,     // '4    0x1b41,     // '5    0x1f41,     // '6    0x0111,     // '7    0x1f51,     // '8    0x1b51,     // '9'    0x1f00,     // ':' (Not defined)    0x0000,     // ';' (Not defined)    0x0000,     // '<' (Not defined)    0x0000,     // '=' (Not defined)    0x0000,     // '>' (Not defined)    0x0000,     // '?' (Not defined)    0x0000,     // '@' (Not defined)    0x0f51,     // 'A' (+ 'a')    0x3991,     // 'B' (+ 'b')    0x1441,     // 'C' (+ 'c')    0x3191,     // 'D' (+ 'd')    0x1e41,     // 'E' (+ 'e')    0x0e41,     // 'F' (+ 'f')    0x1d41,     // 'G' (+ 'g')    0x0f50,     // 'H' (+ 'h')    0x2080,     // 'I' (+ 'i')    0x1510,     // 'J' (+ 'j')    0x8648,     // 'K' (+ 'k')    0x1440,     // 'L' (+ 'l')    0x0578,     // 'M' (+ 'm')    0x8570,     // 'N' (+ 'n')    0x1551,     // 'O' (+ 'o')    0x0e51,     // 'P' (+ 'p')    0x9551,     // 'Q' (+ 'q')    0x8e51,     // 'R' (+ 'r')    0x9021,     // 'S' (+ 's')    0x2081,     // 'T' (+ 't')    0x1550,     // 'U' (+ 'u')    0x4448,     // 'V' (+ 'v')    0xc550,     // 'W' (+ 'w')    0xc028,     // 'X' (+ 'x')    0x2028,     // 'Y' (+ 'y')    0x5009,     // 'Z' (+ 'z')    0x0000,     // '[' (Not defined)    0x8020,     // '\' (Not defined)    0x0000,     // ']' (Not defined)    0x0000,     // '^' (Not defined)    0x1000      // '_'};/*******************************************************************************   Function name : LCD_Init**   Returns :       None**   Parameters :    None**   Purpose :       Initialize LCD_displayData buffer.*                   Set up the LCD (timing, contrast, etc.)******************************************************************************/void LCD_Init (void){    LCD_AllSegments(FALSE);                     // Clear segment buffer.    LCD_CONTRAST_LEVEL(LCD_INITIAL_CONTRAST);    //Set the LCD contrast level    // Select asynchronous clock source, enable all COM pins and enable all    // segment pins.    LCDCRB = (1<<LCDCS) | (3<<LCDMUX0) | (7<<LCDPM0);    // Set LCD prescaler to give a framerate of 32,0 Hz    LCDFRR = (0<<LCDPS0) | (7<<LCDCD0);        LCDCRA = (1<<LCDEN) | (1<<LCDAB);           // Enable LCD and set low power waveform    //Enable LCD start of frame interrupt    LCDCRA |= (1<<LCDIE);	    gLCD_Update_Required = FALSE;}/*******************************************************************************   Function name : LCD_WriteDigit(char c, char digit)**   Returns :       None**   Parameters :    Inputs*                   c: The symbol to be displayed in a LCD digit*                   digit: In which digit (0-5) the symbol should be displayed*                   Note: Digit 0 is the first used digit on the LCD,*                   i.e LCD digit 2**   Purpose :       Stores LCD control data in the LCD_displayData buffer.*                   (The LCD_displayData is latched in the LCD_SOF interrupt.)******************************************************************************/void LCD_WriteDigit(char c, char digit){    unsigned int seg = 0x0000;                  // Holds the segment pattern    char mask, nibble;    char *ptr;    char i;    if (digit > 5)                              // Skip if digit is illegal        return;    //Lookup character table for segmet data    if ((c >= '*') && (c <= 'z'))    {        // c is a letter        if (c >= 'a')                           // Convert to upper case            c &= ~0x20;                         // if necessarry        c -= '*';		//mt seg = LCD_character_table[c];		seg = (unsigned int) pgm_read_word(&LCD_character_table[(uint8_t)c]); 	}    // Adjust mask according to LCD segment mapping    if (digit & 0x01)        mask = 0x0F;                // Digit 1, 3, 5    else        mask = 0xF0;                // Digit 0, 2, 4    ptr = LCD_Data + (digit >> 1);  // digit = {0,0,1,1,2,2}    for (i = 0; i < 4; i++)    {        nibble = seg & 0x000F;        seg >>= 4;        if (digit & 0x01)            nibble <<= 4;        *ptr = (*ptr & mask) | nibble;        ptr += 5;    }}/*******************************************************************************   Function name : LCD_AllSegments(unsigned char input)**   Returns :       None**   Parameters :    show -  [TRUE;FALSE]**   Purpose :       shows or hide all all LCD segments on the LCD******************************************************************************/void LCD_AllSegments(char show){    unsigned char i;    if (show)        show = 0xFF;    // Set/clear all bits in all LCD registers    for (i=0; i < LCD_REGISTER_COUNT; i++)        *(LCD_Data + i) = show;}/*******************************************************************************   LCD Interrupt Routine**   Returns :       None**   Parameters :    None**   Purpose: Latch the LCD_displayData and Set LCD_status.updateComplete******************************************************************************/SIGNAL(SIG_LCD){    static char LCD_timer = LCD_TIMER_SEED;    char c;    char c_flash;    char flash;    char EOL;    unsigned char i;//    static char timeout_count;//    static char auto_joystick_count;		c_flash=0; // mt// NAL-  theese sections have been removed as they are now implemented in button.c///**************** Button timeout for the button.c, START ****************/ /*   if(!gButtonTimeout)    {        timeout_count++;                if(timeout_count > 3)        {            gButtonTimeout = TRUE;            timeout_count = 0;        }    }*//**************** Button timeout for the button.c, END ******************//**************** Auto press joystick for the main.c, START *************//*    if(gAutoPressJoystick == AUTO)    {        auto_joystick_count++;                if(auto_joystick_count > 16)        {            gAutoPressJoystick = TRUE;            auto_joystick_count = 15;        }    }    else        auto_joystick_count = 0;*//**************** Auto press joystick for the main.c, END ***************/        LCD_timer--;                    // Decreased every LCD frame    if (gScrollMode)    {        // If we are in scroll mode, and the timer has expired,        // we will update the LCD        if (LCD_timer == 0)        {            if (gLCD_Start_Scroll_Timer == 0)            {                gLCD_Update_Required = TRUE;            }            else                gLCD_Start_Scroll_Timer--;        }    }    else        {   // if not scrolling,        // disble LCD start of frame interrupt//        cbi(LCDCRA, LCDIE);   //DEBUG        gScroll = 0;    }    EOL = FALSE;    if (gLCD_Update_Required == TRUE)    {        // Duty cycle of flashing characters        if (gFlashTimer < (LCD_FLASH_SEED >> 1))            flash = 0;        else            flash = 1;        // Repeat for the six LCD characters        for (i = 0; i < 6; i++)        {            if ((gScroll+i) >= 0 && (!EOL))            {                // We have some visible characters				if (gShowFilename){					c = FAT16_longfilename[i + gScroll];				}else{					c = gTextBuffer[i + gScroll];				}                c_flash = c & 0x80 ? 1 : 0;                c = c & 0x7F;                if (c == '\0')                    EOL = i+1;      // End of character data            }            else                c = ' ';            // Check if this character is flashing            if (c_flash && flash)                LCD_WriteDigit(' ', i);            else                LCD_WriteDigit(c, i);        }        // Copy the segment buffer to the real segments        for (i = 0; i < LCD_REGISTER_COUNT; i++)            *(pLCDREG + i) = *(LCD_Data+i);        // Handle colon        if (gColon)            *(pLCDREG + 8) = 0x01;        else            *(pLCDREG + 8) = 0x00;        // If the text scrolled off the display,        // we have to start over again.        if (EOL == 1)            gScroll = -6;        else            gScroll++;        // No need to update anymore        gLCD_Update_Required = FALSE;    }    // LCD_timer is used when scrolling text    if (LCD_timer == 0)    {/*        if ((gScroll <= 0) || EOL)            LCD_timer = LCD_TIMER_SEED/2;        else*/            LCD_timer = LCD_TIMER_SEED;    }    // gFlashTimer is used when flashing characters    if (gFlashTimer == LCD_FLASH_SEED)        gFlashTimer= 0;    else        gFlashTimer++;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品福利一区二区三区| 手机精品视频在线观看| 亚洲一级二级三级在线免费观看| 男男视频亚洲欧美| hitomi一区二区三区精品| 午夜欧美视频在线观看| 欧美久久久一区| 国产色产综合产在线视频| 亚洲一区二区三区四区在线观看 | 日本成人在线一区| 久久99最新地址| 色婷婷久久久久swag精品 | 国产精品自拍在线| 8x8x8国产精品| 亚洲精品高清在线| 成人黄色777网| 久久久av毛片精品| 老司机精品视频一区二区三区| 色视频成人在线观看免| 中文字幕av不卡| 国产成人综合亚洲91猫咪| 日韩午夜在线播放| 日韩和欧美的一区| 欧美日韩情趣电影| 亚洲最色的网站| 一本大道久久a久久精二百| 日韩理论片网站| www.色综合.com| 中文字幕日韩av资源站| 成人av电影在线| 欧美国产激情一区二区三区蜜月| 风间由美性色一区二区三区| 国产亚洲午夜高清国产拍精品| 激情小说欧美图片| 精品乱人伦小说| 国产一区二区美女诱惑| 久久综合精品国产一区二区三区| 精品一区二区三区在线播放视频| 精品国产一区二区精华| 国产伦理精品不卡| 国产欧美精品国产国产专区| 国产宾馆实践打屁股91| 国产精品色哟哟| 色哟哟欧美精品| 午夜成人免费电影| 欧美变态口味重另类| 国产在线国偷精品免费看| 国产亚洲欧美日韩在线一区| zzijzzij亚洲日本少妇熟睡| 最近日韩中文字幕| 欧美性猛交xxxx乱大交退制版| 日韩国产精品久久久| 精品剧情在线观看| 国产a区久久久| 亚洲一卡二卡三卡四卡无卡久久| 777午夜精品视频在线播放| 麻豆精品一区二区av白丝在线| 久久久噜噜噜久久人人看 | 亚洲国产综合人成综合网站| 在线综合亚洲欧美在线视频| 国模无码大尺度一区二区三区| 欧美国产激情一区二区三区蜜月| 91麻豆免费看片| 秋霞国产午夜精品免费视频| 久久免费偷拍视频| 在线一区二区三区四区五区| 蜜臀av一级做a爰片久久| 国产精品美女久久福利网站 | 视频一区免费在线观看| 久久亚洲一区二区三区明星换脸 | 日韩国产一二三区| 国产精品成人一区二区艾草| 欧美区一区二区三区| 成人国产亚洲欧美成人综合网| 亚洲大片精品永久免费| 国产亚洲欧美在线| 日韩一级片网站| 91亚洲精品乱码久久久久久蜜桃| 蜜桃av一区二区| 亚洲综合色自拍一区| 国产嫩草影院久久久久| 678五月天丁香亚洲综合网| 97成人超碰视| 国产一区二区不卡老阿姨| 午夜欧美视频在线观看| 亚洲免费在线播放| 国产肉丝袜一区二区| 欧美一区二区黄| 91国模大尺度私拍在线视频| 成人午夜大片免费观看| 青青草精品视频| 亚洲高清三级视频| 国产精品久久久久国产精品日日| 日韩欧美的一区| 欧美一区二区三区四区高清| 日本特黄久久久高潮| 99久久精品免费看国产| 日韩一区二区三区三四区视频在线观看 | 日韩电影免费在线| 成人福利视频在线看| 欧美一区二区精品久久911| 国产精品一级片在线观看| 中文字幕欧美区| 国产一区二区三区四区在线观看| 久久久久久久综合色一本| 欧美精品一区男女天堂| 蜜臀av性久久久久蜜臀aⅴ流畅| 91高清视频在线| 中文字幕在线不卡一区二区三区| 成人久久18免费网站麻豆 | 成人网在线免费视频| 亚洲黄色免费电影| 色老汉av一区二区三区| 一区二区三区在线视频免费观看| 91精品国产综合久久精品图片 | 国产精品嫩草影院com| 大尺度一区二区| 中文字幕欧美三区| 视频一区中文字幕| 国产欧美在线观看一区| 国产精品一区二区三区乱码| 7777精品伊人久久久大香线蕉超级流畅| 国产精品电影一区二区| 91国偷自产一区二区三区观看| 亚洲一区二区三区四区中文字幕| 欧美日韩亚洲综合一区 | 99精品视频在线观看| 综合久久一区二区三区| 欧美少妇bbb| 蜜臀精品久久久久久蜜臀| 91精品婷婷国产综合久久性色| 蜜桃在线一区二区三区| 国产三级精品三级在线专区| 99久久精品免费看| 天天av天天翘天天综合网色鬼国产 | 亚洲欧美日韩国产一区二区三区| 在线精品观看国产| 精品制服美女久久| 国产日韩亚洲欧美综合| 一本到不卡免费一区二区| 三级成人在线视频| 国产欧美日韩视频在线观看| 91成人在线免费观看| 麻豆精品蜜桃视频网站| 亚洲欧洲精品一区二区三区| 欧美精品久久天天躁| 成人黄色在线视频| 亚洲成人激情综合网| 欧美色中文字幕| 亚洲欧美精品午睡沙发| 91麻豆精品久久久久蜜臀| 久久久国产一区二区三区四区小说| 亚洲福利国产精品| 成人av片在线观看| 美女在线一区二区| 亚洲欧美日韩国产另类专区| 久久精品夜色噜噜亚洲aⅴ| 欧美专区亚洲专区| 国产伦精一区二区三区| 三级一区在线视频先锋| 综合激情网...| 久久免费精品国产久精品久久久久| 色综合久久88色综合天天| 国产精品 日产精品 欧美精品| 亚洲一区免费视频| 国产精品久久久久影院老司 | 亚洲免费在线观看| 国产日产欧美一区二区视频| 4438x亚洲最大成人网| 日本高清无吗v一区| 亚洲一区二区欧美日韩| 日韩视频免费观看高清完整版| 欧美色电影在线| 99久久伊人网影院| 成人一区二区在线观看| 国产一区二区三区av电影| 免费的成人av| 麻豆高清免费国产一区| 日韩高清在线观看| 午夜在线成人av| 伊人色综合久久天天| 自拍偷拍国产亚洲| 国产精品久久久久久久久免费桃花| 精品日本一线二线三线不卡| 制服.丝袜.亚洲.另类.中文| 欧美亚洲综合另类| 欧美丝袜自拍制服另类| 精彩视频一区二区| 国产精品私房写真福利视频| 日韩视频一区在线观看| 日本欧美在线看| 一区二区高清免费观看影视大全 | 中文字幕一区二区三区精华液 | 国产91精品一区二区| 国产福利91精品一区| 粉嫩绯色av一区二区在线观看| 韩国av一区二区三区| 日产国产欧美视频一区精品| 国模一区二区三区白浆| 国产a区久久久|