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

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

?? example_28xevtimerperiod.c

?? TI 281x DSP 各種通信接口驅動源代碼
?? C
字號:
//
//      TMDX ALPHA RELEASE
//      Intended for product evaluation purposes
//
//###########################################################################
//
// FILE:	DSP28_EvTimerPeriod.c
//
// TITLE:	DSP28 Event Manager GP Timer example program.
//
// ASSUMPTIONS:
//
//          This program requires the DSP28 header files.  To compile the
//          program as is, it should reside in the DSP28/examples/ev_timer_period 
//          sub-directory.
//
//          As supplied, this project is configured for "boot to H0" operation.  
//
// DESCRIPTION:
//
//          This program sets up EVA Timer 1, EVA Timer 2, EVB Timer 3
//          and EVB Timer 4 to fire an interrupt on a period overflow.  
//          A count is kept each time each interrupt passes through
//          the interrupt service routine. 
//
//          EVA Timer 1 has the shortest period while EVB Timer4 has the
//          longest period.
//
//          Watch Variables:
//
//                EvaTimer1InterruptCount;
//                EvaTimer2InterruptCount;
//                EvbTimer3InterruptCount;
//                EvbTimer4InterruptCount;
//
//###########################################################################
//
//  Ver | dd mmm yyyy | Who  | Description of changes
// =====|=============|======|===============================================
//  0.57| 06 Jun 2002 | L.H. | First Release
//###########################################################################

// Step 0.  Include required header files
         // DSP28_Device.h: device specific definitions #include statements for
         // all of the peripheral .h definition files.
         // DSP28_Example.h is specific for the given example.  

#include "DSP28_Device.h"


// Prototype statements for functions found within this file.
interrupt void eva_timer1_isr(void);
interrupt void eva_timer2_isr(void);
interrupt void evb_timer3_isr(void);
interrupt void evb_timer4_isr(void);

// Global counts used in this example
Uint32	EvaTimer1InterruptCount;
Uint32  EvaTimer2InterruptCount;
Uint32	EvbTimer3InterruptCount;
Uint32  EvbTimer4InterruptCount;

void main(void)
{

// Step 1. Initialize System Control registers, PLL, WatchDog, Clocks to default state:
        // This function is found in the DSP28_SysCtrl.c file.
	InitSysCtrl();

// Step 2. Select GPIO for the device or for the specific application:
        // This function is found in the DSP28_Gpio.c file.
	// InitGpio();  // Skip for this test

// Step 3. Initialize PIE vector table:
	// The PIE vector table is initialized with pointers to shell Interrupt 
        // Service Routines (ISR).  The shell routines are found in DSP28_DefaultIsr.c.
	// Insert user specific ISR code in the appropriate shell ISR routine in 
        // the DSP28_DefaultIsr.c file.

	// Disable and clear all CPU interrupts:
	DINT;
	IER = 0x0000;
	IFR = 0x0000;

	// Initialize Pie Control Registers To Default State:
        // This function is found in the DSP28_PieCtrl.c file.
	InitPieCtrl();

	// Initialize the PIE Vector Table To a Known State:
        // This function is found in DSP28_PieVect.c.
	// This function populates the PIE vector table with pointers
        // to the shell ISR functions found in DSP28_DefaultIsr.c.
	InitPieVectTable();	
	
// Step 4. Initialize all the Device Peripherals to a known state:
	// This function is found in DSP28_InitPeripherals.c
    // InitPeripherals();
   
// Step 5. User specific functions, Reassign vectors (optional), Enable Interrupts:
	
	// Initialize count values to 0
	EvaTimer1InterruptCount = 0;
	EvaTimer2InterruptCount = 0;
	EvbTimer3InterruptCount = 0;
	EvbTimer4InterruptCount = 0;
				
    // Initialize EVA Timer 1:
    // Setup Timer 1 Registers (EV A)
    EvaRegs.GPTCONA.all = 0;
   
    // Set the Period for the GP timer 1 to 0x0200;
    EvaRegs.T1PR = 0x0200;       // Period
    EvaRegs.T1CMPR = 0x0000;     // Compare Reg
   
    // Enable Period interrupt bits for GP timer 1
    // Count up, x128, internal clk, enable compare, use own period
    EvaRegs.EVAIMRA.bit.T1PINT = 1;
    EvaRegs.EVAIFRA.bit.T1PINT = 1;

    // Clear the counter for GP timer 1
    EvaRegs.T1CNT = 0x0000;
    EvaRegs.T1CON.all = 0x1742;

    // Start EVA ADC Conversion on timer 1 Period interrupt
    EvaRegs.GPTCONA.bit.T1TOADC = 2;



    // Initialize EVA Timer 2:
    // Setup Timer 2 Registers (EV A)
    EvaRegs.GPTCONA.all = 0;
   
    // Set the Period for the GP timer 2 to 0x0200;
    EvaRegs.T2PR = 0x0400;       // Period
    EvaRegs.T2CMPR = 0x0000;     // Compare Reg
   
    // Enable Period interrupt bits for GP timer 2
    // Count up, x128, internal clk, enable compare, use own period
    EvaRegs.EVAIMRB.bit.T2PINT = 1;
    EvaRegs.EVAIFRB.bit.T2PINT = 1;

    // Clear the counter for GP timer 2
    EvaRegs.T2CNT = 0x0000;
    EvaRegs.T2CON.all = 0x1742;

    // Start EVA ADC Conversion on timer 2 Period interrupt
    EvaRegs.GPTCONA.bit.T2TOADC = 2;



	// Initialize EVB Timer 3:
    // Setup Timer 3 Registers (EV B)
    EvbRegs.GPTCONB.all = 0;
   
    // Set the Period for the GP timer 3 to 0x0200;
    EvbRegs.T3PR = 0x0800;       // Period
    EvbRegs.T3CMPR = 0x0000;     // Compare Reg
   
    // Enable Period interrupt bits for GP timer 3
    // Count up, x128, internal clk, enable compare, use own period
    EvbRegs.EVBIMRA.bit.T3PINT = 1;
    EvbRegs.EVBIFRA.bit.T3PINT = 1;

    // Clear the counter for GP timer 3
    EvbRegs.T3CNT = 0x0000;
    EvbRegs.T3CON.all = 0x1742;

    // Start EVA ADC Conversion on timer 3 Period interrupt
    EvbRegs.GPTCONB.bit.T3TOADC = 2;	


	// Initialize EVB Timer 4:
    // Setup Timer 4 Registers (EV B)
    EvbRegs.GPTCONB.all = 0;
   
    // Set the Period for the GP timer 4 to 0x0200;
    EvbRegs.T4PR = 0x1000;       // Period
    EvbRegs.T4CMPR = 0x0000;     // Compare Reg
   
    // Enable Period interrupt bits for GP timer 4
    // Count up, x128, internal clk, enable compare, use own period
    EvbRegs.EVBIMRB.bit.T4PINT = 1;
    EvbRegs.EVBIFRB.bit.T4PINT = 1;

    // Clear the counter for GP timer 4
    EvbRegs.T4CNT = 0x0000;
    EvbRegs.T4CON.all = 0x1742;

    // Start EVA ADC Conversion on timer 4 Period interrupt
    EvbRegs.GPTCONB.bit.T4TOADC = 2;	


	// Reassign ISRs. 
        // Reassign the PIE vector for T1PINT, T2PINT, T3PTINT, 
        // and T4PINT to point to a different 
        // ISR then the shell routine found in DSP28_DefaultIsr.c.
        // This is done if the user does not want to use the shell ISR routine
        // but instead wants to use their own ISR.  This step is optional:
	
	EALLOW;	// This is needed to write to EALLOW protected registers
	PieVectTable.T1PINT = &eva_timer1_isr;
	PieVectTable.T2PINT = &eva_timer2_isr;
	PieVectTable.T3PINT = &evb_timer3_isr;
	PieVectTable.T4PINT = &evb_timer4_isr;
	EDIS;   // This is needed to disable write to EALLOW protected registers

    // Enable PIE group 2 interrupt 4 for T1PINT
    PieCtrlRegs.PIEIER2.all = M_INT4;
    // Enable PIE group 3 interrupt 1 for T2PINT
    PieCtrlRegs.PIEIER3.all = M_INT1;    
    // Enable PIE group 4 interrupt 4 for T3PINT
    PieCtrlRegs.PIEIER4.all = M_INT4;
    // Enable PIE group 5 interrupt 1 for T4PINT
    PieCtrlRegs.PIEIER5.all = M_INT1;
	
    // Enable CPU INT2 for T1PINT, INT3 for T2PINT, INT4 for T3PINT
    // and INT5 for T4PINT:
	IER |= (M_INT2 | M_INT3 | M_INT4 | M_INT5);

    // Enable global Interrupts and higher priority real-time debug events:
	
	EINT;   // Enable Global interrupt INTM
	ERTM;	// Enable Global realtime interrupt DBGM

// Step 6. IDLE loop. Just sit and loop forever:	
	for(;;);

} 	


// Step 7. Insert all local Interrupt Service Routines (ISRs) and functions here:	
	// If local ISRs are used, reassign vector addresses in vector table as
    // shown in Step 5

interrupt void eva_timer1_isr(void)
{
	EvaTimer1InterruptCount++;

    // Enable more interrupts from this timer
	EvaRegs.EVAIMRA.bit.T1PINT = 1;
	
	// Note: To be safe, use a mask value to write to the entire
	// EVAIFRA register.  Writing to one bit will cause a read-modify-write
	// operation that may have the result of writing 1's to clear 
	// bits other then those intended. 
    EvaRegs.EVAIFRA.all = BIT7;
	
	// Acknowledge interrupt to recieve more interrupts from PIE group 2
	PieCtrlRegs.PIEACK.all = PIEACK_GROUP2;
}

interrupt void eva_timer2_isr(void)
{
	EvaTimer2InterruptCount++;

    // Enable more interrupts from this timer
	EvaRegs.EVAIMRB.bit.T2PINT = 1;
	
	// Note: To be safe, use a mask value to write to the entire
	// EVAIFRB register.  Writing to one bit will cause a read-modify-write
	// operation that may have the result of writing 1's to clear 
	// bits other then those intended. 
    EvaRegs.EVAIFRB.all = BIT0;
	
	// Acknowledge interrupt to recieve more interrupts from PIE group 3
	PieCtrlRegs.PIEACK.all = PIEACK_GROUP3;
}

interrupt void evb_timer3_isr(void)
{
	EvbTimer3InterruptCount++;
	
	// Note: To be safe, use a mask value to write to the entire
	// EVBIFRA register.  Writing to one bit will cause a read-modify-write
	// operation that may have the result of writing 1's to clear 
	// bits other then those intended. 
    EvbRegs.EVBIFRA.all = BIT7;	
	
	// Acknowledge interrupt to recieve more interrupts from PIE group 4
	PieCtrlRegs.PIEACK.all = PIEACK_GROUP4;

}

interrupt void evb_timer4_isr(void)
{
	EvbTimer4InterruptCount++;
	
	// Note: To be safe, use a mask value to write to the entire
	// EVBIFRB register.  Writing to one bit will cause a read-modify-write
	// operation that may have the result of writing 1's to clear 
	// bits other then those intended. 
    EvbRegs.EVBIFRB.all = BIT0;	
	
	// Acknowledge interrupt to recieve more interrupts from PIE group 5
	PieCtrlRegs.PIEACK.all = PIEACK_GROUP5;

}


//===========================================================================
// No more.
//===========================================================================

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人精品国产福利| 久草热8精品视频在线观看| av毛片久久久久**hd| 国产精品日产欧美久久久久| 丁香网亚洲国际| 136国产福利精品导航| 97久久超碰精品国产| 亚洲精品视频免费观看| 欧美日韩一区二区三区视频| 免费在线成人网| 久久久亚洲综合| 99久久国产综合精品色伊| 曰韩精品一区二区| 欧美一区二区久久| 国产成人在线视频网站| 亚洲日本乱码在线观看| 欧美一三区三区四区免费在线看| 极品少妇xxxx偷拍精品少妇| 中文字幕在线不卡一区| 欧美日韩激情一区二区| 国产精品一区三区| 亚洲欧美日韩系列| 日韩一级黄色片| 99久久99久久免费精品蜜臀| 视频在线观看一区二区三区| 国产亚洲精品超碰| 欧美性大战久久久久久久蜜臀| 毛片不卡一区二区| 亚洲色图第一区| 日韩欧美黄色影院| 91视频国产资源| 久久精品国产99国产| 国产精品成人午夜| 日韩视频一区二区在线观看| 色综合久久综合网| 国内成人免费视频| 亚洲成av人片在线观看无码| 国产欧美日韩在线看| 正在播放亚洲一区| 99久久99久久免费精品蜜臀| 久久99精品国产麻豆婷婷| 综合婷婷亚洲小说| 久久先锋影音av| 7777精品伊人久久久大香线蕉完整版 | 亚洲另类一区二区| 欧美va亚洲va在线观看蝴蝶网| 91伊人久久大香线蕉| 国产在线国偷精品免费看| 亚洲风情在线资源站| 中文久久乱码一区二区| 欧美大片在线观看| 欧美高清精品3d| 欧美在线影院一区二区| 91在线免费看| 高清成人在线观看| 国产精品小仙女| 精品一区二区日韩| 日产国产高清一区二区三区| 一区二区免费在线播放| 亚洲欧洲在线观看av| 中文字幕av免费专区久久| 337p日本欧洲亚洲大胆色噜噜| 欧美日韩夫妻久久| 色88888久久久久久影院野外 | 99国产精品久| 国产麻豆午夜三级精品| 蜜臀精品久久久久久蜜臀 | 一区二区三区久久| 亚洲人成精品久久久久| 国产精品女主播av| 国产精品麻豆欧美日韩ww| 国产亚洲欧美激情| 久久久不卡影院| 国产日韩欧美高清在线| 国产欧美精品一区二区色综合 | 亚洲美女免费视频| 综合久久国产九一剧情麻豆| 国产精品不卡一区二区三区| 国产精品欧美综合在线| 亚洲人成网站色在线观看| 亚洲三级在线观看| 亚洲一区影音先锋| 水蜜桃久久夜色精品一区的特点 | 久久美女艺术照精彩视频福利播放| 欧美xxx久久| 国产视频一区在线观看| 国产精品私人自拍| 1024成人网| 亚洲在线中文字幕| 日韩成人伦理电影在线观看| 欧美bbbbb| 国产呦萝稀缺另类资源| 不卡的电视剧免费网站有什么| 91麻豆福利精品推荐| 欧美视频一区在线| 欧美一区二区三区免费观看视频| 日韩亚洲国产中文字幕欧美| 精品日韩欧美在线| 欧美韩国日本一区| 一区二区三区在线播| 日韩电影免费在线观看网站| 国产精品影视在线| 91国偷自产一区二区开放时间| 欧美日韩一区二区在线视频| 26uuu成人网一区二区三区| 中文字幕中文字幕在线一区| 亚洲一区自拍偷拍| 久久97超碰国产精品超碰| 岛国精品在线播放| 欧美三级在线看| 国产婷婷色一区二区三区| 一区二区三区资源| 精品一区二区综合| 91色porny蝌蚪| 欧美成人vps| 一区二区三区91| 国内精品不卡在线| 在线观看亚洲精品| 久久婷婷久久一区二区三区| 亚洲摸摸操操av| 国产一区二区三区综合| 欧美在线不卡一区| 欧美激情一区不卡| 男人操女人的视频在线观看欧美| 成人激情视频网站| 欧美大片拔萝卜| 亚洲国产视频网站| 成人综合在线视频| 91精品国产高清一区二区三区蜜臀 | 欧美日高清视频| 国产精品乱码一区二区三区软件 | 高清免费成人av| 日韩一区二区在线看片| 一区二区三区资源| 丁香网亚洲国际| 欧美成人一区二区三区在线观看| 亚洲精品乱码久久久久久久久 | 成人妖精视频yjsp地址| 欧美一区三区四区| 一区二区在线看| 成人动漫av在线| 精品国产免费一区二区三区四区 | 欧美电视剧免费观看| 午夜视频在线观看一区二区三区| 成人激情午夜影院| 久久精品无码一区二区三区| 美女一区二区视频| 欧美日韩一区二区三区在线看 | 丝袜亚洲另类丝袜在线| 色丁香久综合在线久综合在线观看| 国产欧美精品一区二区三区四区| 日韩成人午夜电影| 欧美日韩成人在线一区| 亚洲一区二区三区四区中文字幕| av一区二区三区黑人| 久久久久久久性| 国产一区二区在线电影| 精品理论电影在线观看| 男人的天堂久久精品| 欧美一级日韩免费不卡| 日韩高清不卡一区| 3751色影院一区二区三区| 午夜久久久久久久久 | 日韩一级片网址| 日韩av午夜在线观看| 欧美日韩成人激情| 日韩不卡一二三区| 欧美一区二区在线免费观看| 日韩av电影免费观看高清完整版在线观看 | 肉丝袜脚交视频一区二区| 91.成人天堂一区| 日韩专区一卡二卡| 欧美老女人第四色| 日本不卡一区二区三区| 3751色影院一区二区三区| 免费在线视频一区| 久久综合九色欧美综合狠狠 | 91免费看`日韩一区二区| 亚洲特黄一级片| 在线亚洲+欧美+日本专区| 亚洲国产成人高清精品| 91麻豆精品国产自产在线观看一区| 日韩精品1区2区3区| 精品久久久久久亚洲综合网| 国产成人免费在线观看不卡| 中文字幕在线一区免费| 色婷婷综合久色| 日本欧美一区二区三区| 精品99999| 不卡高清视频专区| 亚洲电影欧美电影有声小说| 日韩一区二区在线免费观看| 国产不卡视频一区二区三区| 亚洲理论在线观看| 7777精品伊人久久久大香线蕉经典版下载 | 国模无码大尺度一区二区三区| 国产精品美女久久久久久久| 欧美三级午夜理伦三级中视频| 九九在线精品视频| 中文字幕视频一区|