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

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

?? lcd.c

?? uC_OS_II_外圍接口程序源代碼.rar
?? C
?? 第 1 頁 / 共 2 頁
字號:
    }
    OSSemPost(DispSem);                     /* Release access to display                               */
}

/*$PAGE*/
/*
*********************************************************************************************************
*                                            DUMMY FUNCTION
*
* Description : This function doesn't do anything.  It is used to act like a NOP (i.e. No Operation) to
*               waste a few CPU cycles and thus, act as a short delay.
* Arguments   : none
* Returns     : none
*********************************************************************************************************
*/

void  DispDummy (void)
{
}

/*$PAGE*/
/*
*********************************************************************************************************
*                                       DISPLAY A HORIZONTAL BAR
*
* Description : This function allows you to display horizontal bars (bar graphs) on the LCD module.
* Arguments   : 'row'   is the row    position of the cursor in the LCD Display
*                       'row' can be a value from 0 to 'DispMaxRows - 1'
*               'val'   is the value of the horizontal bar.  This value cannot exceed:
*                           DispMaxCols * 5
* Returns     : none
* Notes       : To use this function, you must first call DispHorBarInit()
*********************************************************************************************************
*/

void  DispHorBar (INT8U row, INT8U col, INT8U val)
{
    INT8U i;
    INT8U full;
    INT8U fract;
    INT8U err;


    full  = val / 5;                        /* Find out how many 'full' blocks to turn ON              */
    fract = val % 5;                        /* Compute portion of block                                */
    if (row < DispMaxRows && (col + full - 1) < DispMaxCols) {
        OSSemPend(DispSem, 0, &err);        /* Obtain exclusive access to the display                  */
        i = 0;                              /* Set counter to limit column to maximum allowable column */
        DispCursorSet(row, col);            /* Position cursor at beginning of the bar graph           */
        DispSel(DISP_SEL_DATA_REG);
        while (full > 0) {                  /* Write all 'full' blocks                                 */
            DispDataWr(5);                  /* Send custom character #5 which is full block            */
            i++;                            /* Increment limit counter                                 */
            full--;
        }
        if (fract > 0) {
            DispDataWr(fract);              /* Send custom character # 'fract' (i.e. portion of block) */
        }
        OSSemPost(DispSem);                 /* Release access to display                               */
    }
}

/*$PAGE*/
/*
*********************************************************************************************************
*                                      INITIALIZE HORIZONTAL BAR
*
* Description : This function is used to initialize the bar graph capability of this module.  You must
*               call this function prior to calling DispHorBar().
* Arguments   : none
* Returns     : none
*********************************************************************************************************
*/

void  DispHorBarInit (void)
{
    DispDefChar(1, &DispBar1[0]);
    DispDefChar(2, &DispBar2[0]);
    DispDefChar(3, &DispBar3[0]);
    DispDefChar(4, &DispBar4[0]);
    DispDefChar(5, &DispBar5[0]);
}

/*$PAGE*/
/*
*********************************************************************************************************
*                                      DISPLAY DRIVER INITIALIZATION
*
* Description : This function initializes the display driver.
* Arguments   : maxrows      specifies the number of lines on the display (1 to 4)
*               maxcols      specified the number of characters per line
* Returns     : None.
* Notes       : - DispInit() MUST be called only when multitasking has started.  This is because
*                 DispInit() requires time delay services from the operating system.
*               - DispInit() MUST only be called once during initialization.
*********************************************************************************************************
*/

void  DispInit (INT8U maxrows, INT8U maxcols)
{
    DispInitPort();                    /* Initialize I/O ports used in display driver                  */
    DispMaxRows = maxrows;
    DispMaxCols = maxcols;
    DispSem     = OSSemCreate(1);      /* Create display access semaphore                              */

                                       /* INITIALIZE THE DISPLAY MODULE                                */
    DispSel(DISP_SEL_CMD_REG);         /* Select command register.                                     */
    OSTimeDlyHMSM(0, 0, 0, 50);        /* Delay more than 15 mS after power up (50 mS should be enough)*/
    DispDataWr(DISP_CMD_FNCT);         /* Function Set: Set 8 bit data length, 1/16 duty, 5x8 dots     */
    OSTimeDly(2);                      /* Busy flag cannot be checked yet!                             */
    DispDataWr(DISP_CMD_FNCT);         /* The above command is sent four times!                        */
    OSTimeDly(2);                      /*     This is recommended by Hitachi in the HD44780 data sheet */
    DispDataWr(DISP_CMD_FNCT);
    OSTimeDly(2);
    DispDataWr(DISP_CMD_FNCT);
    OSTimeDly(2);

    DispDataWr(DISP_CMD_ON_OFF);       /* Disp ON/OFF: Display ON, cursor OFF and no BLINK character   */
    DispDataWr(DISP_CMD_MODE);         /* Entry mode: Inc. display data address when writing           */
    DispDataWr(DISP_CMD_CLS);          /* Send command to LCD display to clear the display             */
    OSTimeDly(2);                      /* Delay at least  2 mS (2 ticks ensures at least this much)    */
}

/*$PAGE*/
/*
*********************************************************************************************************
*                                         DISPLAY AN ASCII STRING
*
* Description : This function is used to display an ASCII string on a line of the LCD display
* Arguments   : 'row'   is the row    position of the cursor in the LCD Display
*                       'row' can be a value from 0 to 'DispMaxRows - 1'
*               'col'   is the column position of the cursor in the LCD Display
*                       'col' can be a value from 0 to 'DispMaxCols - 1'
*               's'     is a pointer to the string to write to the display at
*                       the desired row/col.
* Returns     : none
*********************************************************************************************************
*/

void  DispStr (INT8U row, INT8U col, char *s)
{
    INT8U i;
    INT8U err;


    if (row < DispMaxRows && col < DispMaxCols) {
        OSSemPend(DispSem, 0, &err);        /* Obtain exclusive access to the display                  */
        DispCursorSet(row, col);            /* Position cursor at ROW/COL                              */
        DispSel(DISP_SEL_DATA_REG);
        i = col;                            /* Set counter to limit column to maximum allowable column */
        while (i < DispMaxCols && *s) {     /* Write all chars within str + limit to DispMaxCols       */
            DispDataWr(*s++);               /* Send character to LCD display                           */
            i++;                            /* Increment limit counter                                 */
        }
        OSSemPost(DispSem);                 /* Release access to display                               */
    }
}

/*$PAGE*/
/*
*********************************************************************************************************
*                                      WRITE DATA TO DISPLAY DEVICE
*
* Description : This function sends a single BYTE to the display device.
* Arguments   : 'data'  is the BYTE to send to the display device
* Returns     : none
* Notes       : You will need to adjust the value of DISP_DLY_CNTS (LCD.H) to produce a delay between
*               writes of at least 40 uS.  The display I used for the test actually required a delay of
*               80 uS!  If characters seem to appear randomly on the screen, you might want to increase
*               the value of DISP_DLY_CNTS.
*********************************************************************************************************
*/

#ifndef CFG_C
void  DispDataWr (INT8U data)
{
    INT8U  dly;


    outp(DISP_PORT_DATA, data);                  /* Write data to display module                       */
    outp(DISP_PORT_CMD,  0x01);                  /* Set E   line HIGH                                  */
    DispDummy();                                 /* Delay about 1 uS                                   */
    outp(DISP_PORT_CMD,  0x00);                  /* Set E   line LOW                                   */
    for (dly = DISP_DLY_CNTS; dly > 0; dly--) {  /* Delay for at least 40 uS                           */
        DispDummy();
    }
}
#endif

/*
*********************************************************************************************************
*                                  INITIALIZE DISPLAY DRIVER I/O PORTS
*
* Description : This initializes the I/O ports used by the display driver.
* Arguments   : none
* Returns     : none
*********************************************************************************************************
*/

#ifndef CFG_C
void  DispInitPort (void)
{
    outp(DISP_PORT_CMD, 0x82);         /* Set to Mode 0: A are output, B are inputs, C are outputs     */
}
#endif

/*
*********************************************************************************************************
*                                   SELECT COMMAND OR DATA REGISTER
*
* Description : This function read a BYTE from the display device.
* Arguments   : none
*********************************************************************************************************
*/

#ifndef CFG_C
void  DispSel (INT8U sel)
{
    if (sel == DISP_SEL_CMD_REG) {
        outp(DISP_PORT_CMD, 0x02);     /* Select the command register (RS low)                         */
    } else {
        outp(DISP_PORT_CMD, 0x03);     /* Select the data    register (RS high)                        */
    }
}
#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久二区二区| 国产成人av自拍| 欧美日韩高清一区| 日韩国产在线一| 91麻豆精品国产91久久久久 | 亚洲综合激情另类小说区| 色视频成人在线观看免| 亚洲777理论| 欧美videofree性高清杂交| 激情小说亚洲一区| 国产精品沙发午睡系列990531| 国产激情一区二区三区桃花岛亚洲| 中文字幕巨乱亚洲| 91麻豆产精品久久久久久| 亚洲激情图片qvod| 欧美不卡视频一区| 国产成人高清在线| 亚洲一区二区精品3399| 3d成人动漫网站| 国产电影一区二区三区| 亚洲伦理在线精品| 欧美一级理论片| 成人综合在线视频| 亚洲女爱视频在线| 日韩精品一区二区三区四区| 国产成人午夜99999| 一区二区视频免费在线观看| 欧美片在线播放| 国产福利一区二区三区在线视频| 亚洲日本韩国一区| 欧美电视剧免费全集观看| 成人在线综合网| 午夜视频一区在线观看| 26uuu色噜噜精品一区二区| 91免费观看在线| 男人的天堂久久精品| 亚洲欧洲日产国码二区| 欧美一区二区三区系列电影| 99久久精品一区二区| 美女mm1313爽爽久久久蜜臀| 亚洲免费观看高清完整版在线观看 | 欧美亚洲尤物久久| 国产美女在线观看一区| 亚洲va欧美va国产va天堂影院| 国产丝袜欧美中文另类| 777欧美精品| 色综合久久中文综合久久牛| 国产精品538一区二区在线| 亚洲成人第一页| 亚洲免费毛片网站| 国产精品美女久久久久久久久久久| 欧美精品日韩综合在线| 99久久久久久| 成人午夜在线视频| 久久不见久久见中文字幕免费| 亚洲精品中文字幕在线观看| 亚洲精品一线二线三线无人区| 日韩av不卡在线观看| 久久久久久久电影| 91精品国产一区二区三区蜜臀| 91在线免费视频观看| 国产精品996| 国产乱码字幕精品高清av | 亚洲国产成人av好男人在线观看| 日韩精品一区二区三区老鸭窝| 欧美日韩一区二区欧美激情| 国产成人午夜视频| 国产一区二区三区四| 水野朝阳av一区二区三区| 亚洲欧美日韩在线播放| 国产三级欧美三级| 欧美片在线播放| 在线视频国内一区二区| 成人v精品蜜桃久久一区| 日本中文一区二区三区| 亚洲国产成人av| 三级亚洲高清视频| 亚洲自拍欧美精品| 亚洲成人精品影院| 亚洲品质自拍视频| 一片黄亚洲嫩模| 亚洲欧洲精品天堂一级| 亚洲男人都懂的| 中文字幕一区二区三区在线不卡| 国产精品美女久久久久aⅴ| 久久久久97国产精华液好用吗| 久久一夜天堂av一区二区三区 | 99v久久综合狠狠综合久久| 国产精品小仙女| 懂色中文一区二区在线播放| 国产激情91久久精品导航| 成人综合婷婷国产精品久久蜜臀 | 亚洲自拍都市欧美小说| 日韩毛片精品高清免费| 国产日韩成人精品| 国产女主播视频一区二区| 久久亚洲一区二区三区四区| 欧美大白屁股肥臀xxxxxx| 91精品国产一区二区| 日韩一卡二卡三卡| 国产欧美日本一区视频| 国产精品视频看| 亚洲精品欧美激情| 一区二区三区四区亚洲| 午夜视频久久久久久| 午夜欧美视频在线观看| 国产丶欧美丶日本不卡视频| 国产精品1024久久| 99久免费精品视频在线观看| 一本大道av一区二区在线播放| 欧美老女人在线| 日韩欧美不卡一区| 1024成人网| 亚洲一区二区三区美女| 日韩激情视频在线观看| 国内外成人在线| 成人禁用看黄a在线| av在线综合网| 欧美天天综合网| 欧美v日韩v国产v| 亚洲手机成人高清视频| 亚洲成人资源网| 成人激情黄色小说| 欧美性生活影院| 日本一区二区三级电影在线观看 | 青椒成人免费视频| 成人中文字幕电影| 欧美在线观看18| 国产欧美一区二区三区网站| 亚洲视频一区在线| 国产一区激情在线| 91香蕉视频污| 国产亚洲污的网站| 亚洲国产日韩精品| 99久久99久久久精品齐齐| 欧美日韩一区视频| 亚洲欧美激情小说另类| 免费成人在线影院| 日本久久电影网| 精品久久久久久无| 天天综合天天综合色| 国产成人综合在线观看| 日韩一区二区免费在线电影| 国产精品欧美久久久久无广告| 免费在线成人网| av影院午夜一区| 国产清纯白嫩初高生在线观看91 | 欧美日韩国产高清一区二区| 欧美成人a视频| 日韩一区欧美二区| 成人h动漫精品一区二| 精品国产第一区二区三区观看体验 | 欧美日韩国产免费| 欧美高清在线精品一区| 久久电影网站中文字幕| 成人av午夜影院| 国产喷白浆一区二区三区| 国产精品欧美久久久久无广告 | 久久福利资源站| 欧美日韩免费高清一区色橹橹| 1000精品久久久久久久久| 精品午夜一区二区三区在线观看| 欧美精品色综合| 亚洲综合无码一区二区| 91久久线看在观草草青青| 自拍偷自拍亚洲精品播放| 国产91精品一区二区麻豆亚洲| 久久九九全国免费| 久久99精品国产麻豆婷婷| 精品少妇一区二区三区免费观看| 亚洲一区二区三区免费视频| 欧美日韩一区不卡| 一区二区激情小说| 欧美日韩一区高清| 一区二区三区免费在线观看| 在线看一区二区| 一区二区三区在线高清| 欧美三级在线看| 亚洲天堂精品在线观看| 99视频超级精品| 国产日韩精品一区| 免费观看日韩av| 日韩午夜av电影| 国产成人免费视频网站高清观看视频 | 不卡影院免费观看| 日本一区二区三区四区| 日本成人在线电影网| 在线观看日韩高清av| 亚洲一区二区三区自拍| 欧美三级中文字| 视频在线在亚洲| www激情久久| 老司机午夜精品| 国产精品久久久久精k8| 在线观看中文字幕不卡| 亚洲成人久久影院| 国产片一区二区| 色综合久久久久综合99| 日本亚洲欧美天堂免费| 制服.丝袜.亚洲.另类.中文|