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

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

?? glcd_i2c_batron.c

?? this document is source code for arm9 of atmel
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*-----------------------------------------------------------------------------
            ATMEL Microcontroller Software Support  -  ROUSSET  -
-------------------------------------------------------------------------------
/ The software is delivered "AS IS" without warranty or condition of any
/ kind, either express, implied or statutory. This includes without
/ limitation any warranty or condition with respect to merchantability or
/ fitness for any particular purpose, or against the infringements of
/ intellectual property rights of others.
/-----------------------------------------------------------------------------
/ File Name           : glcd_i2c_batron.c
/ Object              : Graphic LCD routines for Chip-On-Glass LCD Module.
/                     :
/ Version | mm | dd | yy | author :
/   1.0     11   07   06    PFi   : Creation
/   1.1     11   04   07    PFi   : START / STOP bit clean up according to new
/                                   TWI doc.
/
/-----------------------------------------------------------------------------
 1)Description:

 The functions below show how to communicate with the 96 X 40 DOTS GLCD module,
 BT 96040AV-SRE-12-I2C-COG from BATRON is based on the Philips PCF8558 display
 controller.

 The registers of GLCD are write only.

 2)Configuration and pins used in this example:

 ------| AT91 / IO  | GLCD / IO
 CLOCK | TWCK / PA3 | SCL / 5
 DATA  | TWD / PA4  | SDA / 1

 3) Remarks:

 This example runs in polling mode and makes no use of IRQs. To have further
 details  and implementation example about using IRQs, refer to any Interrupt
 project examples, like AT91SAM7Sxx-Interrupt-IAR4_XX-X_X
 available on www.at91.com --> KIT --> AT91SAM7S-EK --> Software

-----------------------------------------------------------------------------*/
/* Include Standard LIB  files */
#include "project.h"
#include "..\common\lib_twi.h"
#include "glcd_i2c_batron.h"

extern void AT91F_Wait_MicroSecond (unsigned int MicroSecond);

#include "font\full_5_x_7_charset.h" /* This character set contains */
                                     /* standard and extended codes */


/*-----------------------------------------------------------------------------
 This Function writes one charactere in a lcd page (LcdPage) and at the specific
 column address (X_Address).
 This function uses the TWI in Master write mode with multiple data.
-----------------------------------------------------------------------------*/
void AT91F_Glcd_PutChar(unsigned char c,
                        unsigned char LcdPage,
                        unsigned char X_Address)
{
   int i;
   unsigned int status;

   /* Enable Master Mode of the TWI */
    AT91C_BASE_TWI->TWI_CR = AT91C_TWI_MSEN|AT91C_TWI_SVDIS ;

    /* Set the TWI Master Mode Register */
    AT91C_BASE_TWI->TWI_MMR =  AT91C_GLCD_I2C_ADDRESS & ~AT91C_TWI_MREAD;

    /* Send the command + the Page Address */
    AT91C_BASE_TWI->TWI_THR = Normal+LcdPage;

    /* Wait until TXRDY is high to transmit the next data */
    status = AT91C_BASE_TWI->TWI_SR;
       while (!(status & AT91C_TWI_TXRDY_MASTER))
        status = AT91C_BASE_TWI->TWI_SR;

      /* Send X address (column address) */
      AT91C_BASE_TWI->TWI_THR = X_START+X_Address;

   /* Send bit to display a character by using the charset table */
   for ( i=0; i<5; i++ )
   {
     /* Wait for the Transmit ready is set to send the next data */
     status = AT91C_BASE_TWI->TWI_SR;
      while (!(status & AT91C_TWI_TXRDY_MASTER))
        status = AT91C_BASE_TWI->TWI_SR;
     /* Send the data to turn on the right pixels to display the character */
     AT91C_BASE_TWI->TWI_THR = charset[(c-32)][i];
   }


   /* Wait for the Transmit complete is set */
   status = AT91C_BASE_TWI->TWI_SR;
   while (!(status & AT91C_TWI_TXCOMP_MASTER))
     status = AT91C_BASE_TWI->TWI_SR;

}

/*-----------------------------------------------------------------------------
 This Function writes a string in a lcd page at the specific column (X_Address)
 Max 19 characters per line/string.
 Do not use /r/n if sprintf function is used before calling AT91_Glcd_PutString
-----------------------------------------------------------------------------*/
void AT91F_Glcd_PutString(char *s,
                          unsigned char LcdPage,
                          unsigned char X_Address)
{
  while ( *s != 0 )
  {
     AT91F_Glcd_PutChar(*s++, LcdPage,X_Address);
     X_Address+=LCD_CHAR_WIDTH;
  }
}

/*-----------------------------------------------------------------------------
* This Function configure the video Mode the LCD.
* - Normal: Blank background and black characters.
* - Inverse : Blank characters black background.
-----------------------------------------------------------------------------*/
void AT91F_Glcd_VideoMode(char VideoMode)
{

  AT91F_TWI_WriteSingle(AT91C_GLCD_I2C_ADDRESS, &VideoMode);

}

/*-----------------------------------------------------------------------------
* This Function clears a column (X_ADDRES) in a LCD page.
* This function uses the TWI in Master write mode with one data.
-----------------------------------------------------------------------------*/
void AT91F_Glcd_ClearLcdColumn(unsigned char Column, unsigned char LcdPage)
{
    unsigned int status;

    /*  Enable Master Mode */
    AT91C_BASE_TWI->TWI_CR = AT91C_TWI_MSEN|AT91C_TWI_SVDIS ;

    /* Set the TWI Master Mode Register */
    AT91C_BASE_TWI->TWI_MMR =  AT91C_GLCD_I2C_ADDRESS & ~AT91C_TWI_MREAD;

    /* Send the LCD mode and the page to address */
    AT91C_BASE_TWI->TWI_THR = Normal+LcdPage;

    /*  Wait for the Transmit ready is set to send the data */
    status = AT91C_BASE_TWI->TWI_SR;
    while (!(status & AT91C_TWI_TXRDY_MASTER))
      status = AT91C_BASE_TWI->TWI_SR;

    /* Send column address to access */
     AT91C_BASE_TWI->TWI_THR = Column;

    /* Wait for the Transmit ready is set to send the data */
    status = AT91C_BASE_TWI->TWI_SR;
    while (!(status & AT91C_TWI_TXRDY_MASTER))
      status = AT91C_BASE_TWI->TWI_SR;

    /* Send 0 to clear it */
    AT91C_BASE_TWI->TWI_THR = 0x0;

    /* Wait for the Transmit complete is set */
    status = AT91C_BASE_TWI->TWI_SR;
    while (!(status & AT91C_TWI_TXCOMP_MASTER))
      status = AT91C_BASE_TWI->TWI_SR;

}

/*-----------------------------------------------------------------------------
* This Function clears a char in a page @ location X.
* This function uses the TWI in Master write mode with multiple data.
-----------------------------------------------------------------------------*/
void AT91F_Glcd_ClearChar(unsigned char Column, unsigned char LcdPage)
{
    unsigned int status,i;

    /* Enable Master Mode */
    AT91C_BASE_TWI->TWI_CR = AT91C_TWI_MSEN|AT91C_TWI_SVDIS ;

    /* Set the TWI Master Mode Register */
    AT91C_BASE_TWI->TWI_MMR =  AT91C_GLCD_I2C_ADDRESS & ~AT91C_TWI_MREAD;

    /* Send the LCD mode and the page to address */
    AT91C_BASE_TWI->TWI_THR = Normal+LcdPage;

    /* Wait for the Transmit ready is set to send the data */
    status = AT91C_BASE_TWI->TWI_SR;
    while (!(status & AT91C_TWI_TXRDY_MASTER))
      status = AT91C_BASE_TWI->TWI_SR;

    /* Send column address to access */
     AT91C_BASE_TWI->TWI_THR = Column;

    /* Wait for the Transmit ready is set to send the data */
    status = AT91C_BASE_TWI->TWI_SR;
    while (!(status & AT91C_TWI_TXRDY_MASTER))
      status = AT91C_BASE_TWI->TWI_SR;

    /* Send 0 to clear each lcd colum for a 5 x 7 char */
    for ( i=0; i<5; i++ )
    {
      /*  Wait for the Transmit ready is set to send the next data */
      status = AT91C_BASE_TWI->TWI_SR;
        while (!(status & AT91C_TWI_TXRDY_MASTER))
          status = AT91C_BASE_TWI->TWI_SR;
      /* Send the data to turn on the right pixel to display the character */
      AT91C_BASE_TWI->TWI_THR = 0x0 ;
    }

    /* Wait for the Transmit complete is set */
    status = AT91C_BASE_TWI->TWI_SR;
    while (!(status & AT91C_TWI_TXCOMP_MASTER))
      status = AT91C_BASE_TWI->TWI_SR;

}

/*-----------------------------------------------------------------------------
* This Function clears a LCD page by sending 0 to all pixels address.
-----------------------------------------------------------------------------*/
void AT91F_Glcd_ClearLcdPage(unsigned char LcdPage)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜桃av噜噜一区| 偷窥少妇高潮呻吟av久久免费| 91精品在线免费观看| 在线观看91精品国产入口| 欧美亚洲日本一区| 欧美视频三区在线播放| 884aa四虎影成人精品一区| 91精品国产91久久久久久最新毛片| 欧美中文字幕一区二区三区| 欧美日韩免费一区二区三区| 日韩三级中文字幕| 国产欧美日韩另类视频免费观看| 欧美激情中文不卡| 亚洲九九爱视频| 日韩av电影一区| 国产精品18久久久久久久久久久久| 丁香婷婷综合网| 欧美性三三影院| 精品国产露脸精彩对白| 国产精品丝袜在线| 亚洲成人自拍偷拍| 狠狠久久亚洲欧美| 色综合天天综合网天天看片 | 久久久久国色av免费看影院| 国产片一区二区三区| 亚洲乱码国产乱码精品精98午夜| 亚洲午夜免费福利视频| 激情小说亚洲一区| 91亚洲男人天堂| 91精品国产91久久久久久一区二区| 久久久国产精品不卡| 亚洲欧美乱综合| 蜜臀av性久久久久蜜臀aⅴ| 岛国av在线一区| 欧美一级在线免费| 亚洲婷婷国产精品电影人久久| 日韩福利视频导航| 99re热这里只有精品免费视频| 欧美嫩在线观看| 国产精品久久久久国产精品日日| 亚洲电影第三页| 不卡一区二区在线| 精品伦理精品一区| 午夜精品福利一区二区三区蜜桃| 国产精品一二三区| 欧美一级高清片在线观看| 亚洲天堂a在线| 国产91在线观看丝袜| 欧美巨大另类极品videosbest| 国产精品国产三级国产普通话三级| 免费看黄色91| 欧美三级日韩三级| 亚洲精品你懂的| youjizz久久| 国产欧美一区二区精品婷婷| 青青草精品视频| 欧美另类高清zo欧美| 亚洲激情男女视频| www.66久久| 国产精品成人一区二区艾草 | 色综合久久久久| 中日韩免费视频中文字幕| 极品尤物av久久免费看| 欧美情侣在线播放| 视频一区二区中文字幕| 欧美吞精做爰啪啪高潮| 国产精品国产a级| bt7086福利一区国产| 国产精品私人影院| 成人午夜免费视频| 亚洲欧洲美洲综合色网| 99久久久无码国产精品| 亚洲欧洲另类国产综合| a级高清视频欧美日韩| 亚洲欧洲国产日韩| 97se狠狠狠综合亚洲狠狠| 亚洲色图欧美激情| 欧美在线高清视频| 日韩国产精品大片| 精品国产精品网麻豆系列| 久久精品国产精品亚洲红杏| 精品国产欧美一区二区| 国产一区二区三区| 国产精品不卡在线| 欧美午夜影院一区| 日韩电影在线观看电影| 欧美videofree性高清杂交| 韩国毛片一区二区三区| 国产欧美一二三区| 在线精品视频免费播放| 午夜精品久久久久久久99水蜜桃| 欧美精品vⅰdeose4hd| 美女视频免费一区| 国产欧美日韩在线| 91久久精品网| 免费成人你懂的| 欧美激情一区在线| 精品视频在线免费| 国内精品免费**视频| 中国av一区二区三区| 在线观看国产精品网站| 九一九一国产精品| 国产精品久久久久久久久久免费看| av激情成人网| 日韩高清一区在线| 欧美韩国一区二区| 制服丝袜亚洲色图| youjizz久久| 久久精品理论片| 国产精品国产a| 欧美电视剧在线观看完整版| 99久久精品国产一区二区三区| 日韩黄色小视频| 国产精品第13页| 亚洲精品一区二区三区99| 色哟哟亚洲精品| 国产精品99久久久久久宅男| 亚洲国产乱码最新视频| 日本一区二区三区四区| 欧美一卡2卡三卡4卡5免费| 99久久精品国产导航| 国产一区二区三区精品视频| 亚洲大尺度视频在线观看| 成人欧美一区二区三区| 久久综合久久综合亚洲| 制服.丝袜.亚洲.中文.综合| 一本久久综合亚洲鲁鲁五月天| 国产精品99久久久久久有的能看| 日韩精品欧美精品| 亚洲综合丁香婷婷六月香| 国产精品亲子乱子伦xxxx裸| 精品成人在线观看| 欧美精品粉嫩高潮一区二区| 日本精品视频一区二区三区| 成人免费视频app| 国产精品亚洲一区二区三区在线| 日韩国产成人精品| 亚洲综合一二区| 一区二区不卡在线播放 | 中文字幕一区二区日韩精品绯色| 日韩一级成人av| 欧美精品久久一区二区三区| 在线看日韩精品电影| 色婷婷亚洲精品| www.欧美日韩国产在线| caoporn国产一区二区| 成人午夜av在线| 国产91对白在线观看九色| 国产一区二区三区免费在线观看| 久久成人精品无人区| 秋霞电影一区二区| 久久电影网站中文字幕| 激情综合色播五月| 国产精品99精品久久免费| 国产a精品视频| av不卡在线播放| 在线观看亚洲成人| 欧美少妇bbb| 欧美乱妇23p| 精品国产一区二区三区久久影院 | 国产欧美综合在线| 亚洲欧洲色图综合| 亚洲男帅同性gay1069| 亚洲国产精品一区二区久久| 日产欧产美韩系列久久99| 看片网站欧美日韩| 国产成a人无v码亚洲福利| 9色porny自拍视频一区二区| 色偷偷成人一区二区三区91| 欧美综合一区二区| 日韩午夜激情av| 国产日产欧美一区| 一区二区三区四区中文字幕| 日韩黄色一级片| 高清久久久久久| 日本乱码高清不卡字幕| 欧美v国产在线一区二区三区| 国产精品色呦呦| 亚洲成人av资源| 国产盗摄一区二区| 欧美午夜免费电影| 26uuu色噜噜精品一区二区| 国产精品高潮呻吟久久| 日本成人在线电影网| 国产高清在线精品| 欧美日韩在线播放| 国产精品视频一二| 日本系列欧美系列| 91视频观看免费| 精品国产三级电影在线观看| 亚洲欧洲综合另类在线| 韩国v欧美v亚洲v日本v| 91久久奴性调教| 欧美激情中文字幕| 麻豆精品一区二区三区| 色综合色狠狠天天综合色| 久久亚洲精品小早川怜子| 亚洲高清免费一级二级三级| 成人丝袜视频网| 日韩亚洲电影在线|