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

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

?? sevensegment.c

?? 飛思卡爾HCS12的OS移植(ucosII),實現了三個任務,IDE:CODEWARRIOR
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*
*********************************************************************************************************
*                        Wytec Dragon12 Board Support Package
* File : SevenSegDisp_BSP.c
* By   : Eric Shufro
*
* Notes: This file provides thread safe software support for driving the 7-Segment 
*        LED display blocks on a Wytec Dragon12.
*********************************************************************************************************
*/

/*
*********************************************************************************************************
*                                        INCLUDES
*********************************************************************************************************
*/

#include <includes.h>

/*
*********************************************************************************************************
*                                 7-SEGMENT DISPLAY CONSTANT DATA
*********************************************************************************************************
*/

#define  SSD_0  0x3F	                                                /* Seven segment display, character '0'                     */
#define  SSD_1  0x06                                                    /* Seven segment display, character '1'                     */  
#define  SSD_2  0x5B                                                    /* Seven segment display, character '2'                     */
#define  SSD_3  0x4F                                                    /* Seven segment display, character '3'                     */
#define  SSD_4  0x66                                                    /* Seven segment display, character '4'                     */
#define  SSD_5  0x6D                                                    /* Seven segment display, character '5'                     */
#define  SSD_6  0x7D                                                    /* Seven segment display, character '6'                     */
#define  SSD_7  0x07                                                    /* Seven segment display, character '7'                     */
#define  SSD_8  0x7F                                                    /* Seven segment display, character '8'                     */
#define  SSD_9  0x6F                                                    /* Seven segment display, character '9'                     */
#define  SSD_A  0x77                                                    /* Seven segment display, character 'A'                     */
#define  SSD_B  0x7F                                                    /* Seven segment display, character 'B'                     */
#define  SSD_C  0x39                                                    /* Seven segment display, character 'C'                     */
#define  SSD_D  0x5E                                                    /* Seven segment display, character 'D'                     */
#define  SSD_E  0x59                                                    /* Seven segment display, character 'E'                     */
#define  SSD_F  0x71                                                    /* Seven segment display, character 'F'                     */

/*
*********************************************************************************************************
*                                         GLOBALS
*********************************************************************************************************
*/

static  INT16U  nbrCnts;                                                /* Holds the number of timer increments for the 7-Seg Disp  */
static  INT16U  outputNum;                                              /* Holds the number between 0000 and 9999 to be displayed   */
static  INT8U   actBlockNum;                                            /* Holds the number of the active 7-Segment LED Block (0-3) */


/*
*********************************************************************************************************
*                                        PROTOTYPES
*********************************************************************************************************
*/

static  void     SevenSegOut(INT8U digit);                              /* Internal function for writing to the 7-Seg Disp data bus */


/*
*********************************************************************************************************
*                                        SEVEN SEGMENT DISPLAY INIT
*
* Description : This function initializes the 7-Segment Enable I/O pins as Outputs, and
*               configures one of the ECT Output Compare channels to create a periodic
*               interrupt that is used to switch the active 7-Segment LED block and
*               the corresponding number to be displayed.
*
* Arguments   : None
*
* Returns     : None
*
* Notes       : THE CORRECT ECT CHANNEL ISR VECTOR MUST BE SET WITHIN VECTORS.C. 
*               This involves plugging the right vector number with the name of
*               the ISR function below. A prototype at the top of vectors.c must
*               also be created.
*********************************************************************************************************
*/

void  SevenSegDisp_Init (void) 
{
    INT32U cpu_frq;
    INT32U bus_frq;
    INT8U  ECT_Prescaler;    


    DDRP         |= 0x0F;                                               /* Set the 7-Segment Enable I/O pins to output              */
    actBlockNum   = 0;                                                  /* Set display 0 as the first active LED display block      */

    cpu_frq = BSP_CPU_ClkFreq();                                        /* Get the current CPU frequency                            */
    bus_frq = cpu_frq / 2;                                              /* Derive the BUS frequency from the CPU frequency          */
      
    ECT_Prescaler = TSCR2 & 0x07;                                       /* Get the prescaler value in the control register          */
    ECT_Prescaler = (1 << ECT_Prescaler);                               /* Calculate the correct prescaler value from the reg val   */
    
                                                                        /* Calculate the # of ticks for an interrupt period of 1ms  */                                                                        
    nbrCnts       = (INT16U)((bus_frq / (ECT_Prescaler * 225)) - 1);    /* 225 represents 225 ticks in 1 second, each tick ~4ms     */ 

#if SEVEN_SEG_OC == 0
    TIOS  |= 0x01;                                                      /* Make channel an output compare                           */
    TC0    = TCNT + nbrCnts;                                            /* Set TC0 to present time + nbrCnts                        */
    TIE |= 0x01;                                                        /* Enable OC0 interrupt.                                    */
#endif

#if SEVEN_SEG_OC == 1
    TIOS  |= 0x02;                                                      /* Make channel an output compare                           */
    TC1    = TCNT + nbrCnts;                                            /* Set TC1 to present time + nbrCnts                        */
    TIE |= 0x02;                                                        /* Enable OC1 interrupt.                                    */
#endif

#if SEVEN_SEG_OC == 2
    TIOS  |= 0x04;                                                      /* Make channel an output compare                           */
    TC2    = TCNT + nbrCnts;                                            /* Set TC2 to present time + nbrCnts                        */
    TIE |= 0x04;                                                        /* Enable OC2 interrupt.                                    */
#endif

#if SEVEN_SEG_OC == 3
    TIOS  |= 0x08;                                                      /* Make channel an output compare                           */
    TC3    = TCNT + nbrCnts;                                            /* Set TC3 to present time + nbrCnts                        */
    TIE |= 0x08;                                                        /* Enable OC3 interrupt.                                    */
#endif

#if SEVEN_SEG_OC == 4
    TIOS  |= 0x10;                                                      /* Make channel an output compare                           */
    TC4    = TCNT + nbrCnts;                                            /* Set TC4 to present time + nbrCnts                        */
    TIE |= 0x10;                                                        /* Enable OC4 interrupt.                                    */
#endif

#if SEVEN_SEG_OC == 5
    TIOS  |= 0x20;                                                      /* Make channel an output compare                           */
    TC5    = TCNT + nbrCnts;                                            /* Set TC5 to present time + nbrCnts                        */
    TIE |= 0x20;                                                        /* Enable OC5 interrupt.                                    */
#endif

#if SEVEN_SEG_OC == 6
    TIOS  |= 0x40;                                                      /* Make channel an output compare                           */
    TC6    = TCNT + nbrCnts;                                            /* Set TC6 to present time + nbrCnts                        */
    TIE |= 0x40;                                                        /* Enable OC6 interrupt.                                    */
#endif

#if SEVEN_SEG_OC == 7
    TIOS  |= 0x80;                                                      /* Make channel an output compare                           */
    TC7    = TCNT + nbrCnts;                                            /* Set TC7 to present time + nbrCnts                        */
    TIE |= 0x80;                                                        /* Enable OC7 interrupt.                                    */
#endif

    TSCR1 = 0xC0;                                                       /* Enable counter & disable counter in background mode      */
}


/*
*********************************************************************************************************
*                                   SEVEN SEGMENT INTERRUPT SERVICE ROUTINE
*
* Description : This function is the 7-Segment LED Interrupt Service Routine. This
*               interrupt occurs periodically at the rate configured within 
*               sevenSegDisp_Init(). Each time the interrupt occurs, the active
*               LED block is changed, and the value on the 7-Segment LED data
*               bus is updated.
*
* Arguments   : None
*
* Returns     : None
*
* Notes       : THE CORRECT ECT CHANNEL ISR VECTOR MUST BE SET WITHIN VECTORS.C. 
*               This involves plugging the right vector number with the name of
*               the ISR function below. A prototype at the top of vectors.c must
*               also be created.
*********************************************************************************************************
*/

void  SevenSegDisp_ISR_Handler (void) 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久新电视剧免费观看| 国产精品资源在线观看| 亚洲丝袜另类动漫二区| 欧美激情在线看| 中文字幕不卡在线播放| 国产精品久久三| 中文字幕亚洲电影| 成人欧美一区二区三区视频网页 | 日韩精品电影一区亚洲| 亚洲狠狠爱一区二区三区| 日韩毛片一二三区| 亚洲国产综合在线| 蜜芽一区二区三区| 韩国av一区二区| 国产福利一区二区三区视频| 国产精品综合视频| 成人午夜大片免费观看| aaa欧美大片| 91福利精品视频| 欧美一区二区三区视频在线| 精品国产凹凸成av人网站| 中文无字幕一区二区三区 | 亚洲激情在线激情| 日本不卡不码高清免费观看| 精品一区二区三区在线播放| 不卡的av电影| 777奇米四色成人影色区| 亚洲精品一区在线观看| 国产精品三级视频| 天天操天天色综合| 国产不卡在线视频| 在线免费视频一区二区| 久久久久成人黄色影片| 亚洲一区二区美女| 国产麻豆精品在线| 欧美日韩在线三区| 欧美激情在线看| 美女免费视频一区二区| eeuss国产一区二区三区| 在线综合视频播放| 国产精品的网站| 久久疯狂做爰流白浆xx| 在线观看av一区二区| 久久先锋影音av鲁色资源| 亚洲欧美激情视频在线观看一区二区三区| 亚洲午夜久久久久久久久电影院| 国产乱子伦一区二区三区国色天香| 在线观看亚洲a| 欧美极品少妇xxxxⅹ高跟鞋| 蜜臀av一区二区在线免费观看 | 国产精品毛片高清在线完整版| 亚洲chinese男男1069| 国产成人在线免费| 日韩无一区二区| 亚洲影视在线播放| 成人av在线资源网| 久久久不卡网国产精品二区| 蜜臀av一级做a爰片久久| 欧美性猛交xxxxxxxx| 亚洲少妇屁股交4| 国产精品一区二区三区99| 日韩一区二区在线免费观看| 亚洲大型综合色站| 精品视频一区三区九区| 国产精品久久午夜| 成人av资源在线| 亚洲国产成人私人影院tom| 国产麻豆欧美日韩一区| 久久九九国产精品| 国产精品一区专区| 国产日韩一级二级三级| 国产一区二区三区国产| 欧美精品一区男女天堂| 国产在线国偷精品免费看| 欧美不卡一区二区三区四区| 日日摸夜夜添夜夜添亚洲女人| 欧美视频在线观看一区二区| 亚洲国产一区视频| 欧美高清视频不卡网| 久久精品一区二区三区四区| 韩国成人福利片在线播放| 欧美日韩国产一级片| 日本中文字幕一区二区视频 | 欧美性色黄大片| 三级亚洲高清视频| 在线观看亚洲一区| 午夜欧美大尺度福利影院在线看| 欧美人牲a欧美精品| 日韩极品在线观看| 久久久高清一区二区三区| 成人在线视频一区| 亚洲精品欧美二区三区中文字幕| 精品污污网站免费看| 看片的网站亚洲| 欧美激情一区不卡| 在线国产亚洲欧美| 免费成人在线影院| 国产精品人妖ts系列视频| 欧美在线视频你懂得| 麻豆精品国产91久久久久久| 国产亚洲精品福利| 欧美中文字幕久久| 精品一二三四区| 亚洲欧洲日韩av| 99久久夜色精品国产网站| 五月天婷婷综合| 亚洲国产精品99久久久久久久久| 欧美在线制服丝袜| 国产一区二区三区综合| 国产精品免费久久| 91精品在线一区二区| 国产99久久久国产精品| 亚洲欧美日韩国产另类专区| 日韩限制级电影在线观看| 91一区二区三区在线播放| 麻豆精品国产传媒mv男同| 久久久亚洲综合| 在线观看日韩毛片| 国产精品88888| 日本视频在线一区| 亚洲日本在线天堂| 久久男人中文字幕资源站| 成人午夜激情在线| 亚洲午夜日本在线观看| 国产精品毛片高清在线完整版| 国产成人亚洲精品狼色在线| 亚洲 欧美综合在线网络| 亚洲日韩欧美一区二区在线| 26uuu久久天堂性欧美| 欧美一区二区国产| 一本到一区二区三区| 国产一区二区三区四| 亚洲男人的天堂在线aⅴ视频| 精品毛片乱码1区2区3区| 欧美色成人综合| 99久久久免费精品国产一区二区| 国产在线精品免费| 一卡二卡三卡日韩欧美| 337p日本欧洲亚洲大胆色噜噜| 精品视频在线视频| 色吊一区二区三区| 91小视频在线免费看| 成人av免费在线| 韩国女主播成人在线| 国产午夜精品久久久久久免费视 | 国产一区二区三区在线观看免费视频 | 亚洲综合自拍偷拍| 1024成人网| 欧美极品少妇xxxxⅹ高跟鞋 | 国产精品综合网| 国产另类ts人妖一区二区| 国精产品一区一区三区mba桃花| 免费不卡在线观看| 麻豆专区一区二区三区四区五区| 日韩精品免费专区| 精品系列免费在线观看| 国产曰批免费观看久久久| 国内精品伊人久久久久av一坑| 麻豆精品在线看| 国产激情91久久精品导航 | 欧洲亚洲精品在线| 欧美丝袜丝nylons| 欧美日产国产精品| 日韩视频免费观看高清完整版| 精品国产乱码久久久久久蜜臀 | 久久综合九色综合欧美就去吻| 精品免费日韩av| 中文字幕不卡在线| 一区二区在线观看视频| 亚洲视频小说图片| 亚洲成人激情社区| 国产 欧美在线| 99精品视频一区二区三区| 久久9热精品视频| 粉嫩av一区二区三区粉嫩| 日本韩国欧美一区二区三区| 国产欧美一区二区精品秋霞影院| 99riav一区二区三区| 欧美日韩精品是欧美日韩精品| 欧美xxxxx牲另类人与| 麻豆国产精品官网| 精品一区二区三区的国产在线播放| 亚洲人成影院在线观看| 精品久久国产字幕高潮| 精品国产亚洲在线| 亚洲欧洲美洲综合色网| 国产盗摄精品一区二区三区在线| 一区二区三区中文在线| 欧美色男人天堂| 91蝌蚪porny| 99久久免费视频.com| 欧美精品久久一区二区三区| 精品福利一区二区三区免费视频| 欧美日韩第一区日日骚| 欧美一级日韩不卡播放免费| 天天综合天天综合色| 久久不见久久见免费视频7| 99re这里只有精品6| 91污在线观看| eeuss鲁片一区二区三区在线观看|