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

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

?? dsp280x_epwm.c

?? AD轉換 數據采集 串口讀數 定時器控制采樣頻率
?? C
字號:
// TI File $Revision: /main/3 $
// Checkin $Date: December 2, 2004   14:54:39 $
//###########################################################################
//
// FILE:   DSP280x_EPwm.c
//
// TITLE:  DSP280x ePWM Initialization & Support Functions.
//
//###########################################################################
// $TI Release: DSP280x V1.30 $
// $Release Date: February 10, 2006 $
//###########################################################################

#include "DSP280x_Device.h"     // DSP280x Headerfile Include File
#include "DSP280x_Examples.h"   // DSP280x Examples Include File

//---------------------------------------------------------------------------
// InitEPwm: 
//---------------------------------------------------------------------------
// This function initializes the ePWM(s) to a known state.
//
void InitEPwm(void)
{
   // Initialize ePWM1/2/3/4/5/6

   //tbd...
 
}

//---------------------------------------------------------------------------
// Example: InitEPwmGpio: 
//---------------------------------------------------------------------------
// This function initializes GPIO pins to function as ePWM pins
//
// Each GPIO pin can be configured as a GPIO pin or up to 3 different
// peripheral functional pins. By default all pins come up as GPIO
// inputs after reset.  
// 

void InitEPwmGpio(void)
{
   InitEPwm1Gpio();
   InitEPwm2Gpio();
   InitEPwm3Gpio();
#if DSP28_2808 || DSP28_2806     
   InitEPwm4Gpio();
   InitEPwm5Gpio();
   InitEPwm6Gpio();
#endif // endif DSP28_2808 || DSP28_2806     
}

void InitEPwm1Gpio(void)
{
   EALLOW;
   
/* Enable internal pull-up for the selected pins */
// Pull-ups can be enabled or disabled by the user. 
// This will enable the pullups for the specified pins.
// Comment out other unwanted lines.

    GpioCtrlRegs.GPAPUD.bit.GPIO0 = 0;    // Enable pull-up on GPIO0 (EPWM1A)
    GpioCtrlRegs.GPAPUD.bit.GPIO1 = 0;    // Enable pull-up on GPIO1 (EPWM1B)   
   
/* Configure ePWM-1 pins using GPIO regs*/
// This specifies which of the possible GPIO pins will be ePWM1 functional pins.
// Comment out other unwanted lines.

    GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1;   // Configure GPIO0 as EPWM1A
    GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 1;   // Configure GPIO1 as EPWM1B
   
    EDIS;
}

void InitEPwm2Gpio(void)
{
   EALLOW;
	
/* Enable internal pull-up for the selected pins */
// Pull-ups can be enabled or disabled by the user. 
// This will enable the pullups for the specified pins.
// Comment out other unwanted lines.

    GpioCtrlRegs.GPAPUD.bit.GPIO2 = 0;    // Enable pull-up on GPIO2 (EPWM2A)
    GpioCtrlRegs.GPAPUD.bit.GPIO3 = 0;    // Enable pull-up on GPIO3 (EPWM3B)

/* Configure ePWM-2 pins using GPIO regs*/
// This specifies which of the possible GPIO pins will be ePWM2 functional pins.
// Comment out other unwanted lines.

    GpioCtrlRegs.GPAMUX1.bit.GPIO2 = 1;   // Configure GPIO2 as EPWM2A
    GpioCtrlRegs.GPAMUX1.bit.GPIO3 = 1;   // Configure GPIO3 as EPWM2B
   
    EDIS;
}

void InitEPwm3Gpio(void)
{
   EALLOW;
   
/* Enable internal pull-up for the selected pins */
// Pull-ups can be enabled or disabled by the user. 
// This will enable the pullups for the specified pins.
// Comment out other unwanted lines.

    GpioCtrlRegs.GPAPUD.bit.GPIO4 = 0;    // Enable pull-up on GPIO4 (EPWM3A)
    GpioCtrlRegs.GPAPUD.bit.GPIO5 = 0;    // Enable pull-up on GPIO5 (EPWM3B)
       
/* Configure ePWM-3 pins using GPIO regs*/
// This specifies which of the possible GPIO pins will be ePWM3 functional pins.
// Comment out other unwanted lines.

    GpioCtrlRegs.GPAMUX1.bit.GPIO4 = 1;   // Configure GPIO4 as EPWM3A
    GpioCtrlRegs.GPAMUX1.bit.GPIO5 = 1;   // Configure GPIO5 as EPWM3B
	
    EDIS;
}


#if DSP28_2808 || DSP28_2806
void InitEPwm4Gpio(void)
{
   EALLOW;
/* Enable internal pull-up for the selected pins */
// Pull-ups can be enabled or disabled by the user. 
// This will enable the pullups for the specified pins.
// Comment out other unwanted lines.

    GpioCtrlRegs.GPAPUD.bit.GPIO6 = 0;    // Enable pull-up on GPIO6 (EPWM4A)
    GpioCtrlRegs.GPAPUD.bit.GPIO7 = 0;    // Enable pull-up on GPIO7 (EPWM4B)

/* Configure ePWM-4 pins using GPIO regs*/
// This specifies which of the possible GPIO pins will be ePWM4 functional pins.
// Comment out other unwanted lines.

    GpioCtrlRegs.GPAMUX1.bit.GPIO6 = 1;   // Configure GPIO6 as EPWM4A
    GpioCtrlRegs.GPAMUX1.bit.GPIO7 = 1;   // Configure GPIO7 as EPWM4B
	
    EDIS;
}
#endif // endif DSP28_2808 || DSP28_2806   


#if DSP28_2808 || DSP28_2806
void InitEPwm5Gpio(void)
{
   EALLOW;
/* Enable internal pull-up for the selected pins */
// Pull-ups can be enabled or disabled by the user. 
// This will enable the pullups for the specified pins.
// Comment out other unwanted lines.

    GpioCtrlRegs.GPAPUD.bit.GPIO8 = 0;    // Enable pull-up on GPIO8 (EPWM5A)
    GpioCtrlRegs.GPAPUD.bit.GPIO9 = 0;    // Enable pull-up on GPIO9 (EPWM5B)

/* Configure ePWM-5 pins using GPIO regs*/
// This specifies which of the possible GPIO pins will be ePWM5 functional pins.
// Comment out other unwanted lines.

    GpioCtrlRegs.GPAMUX1.bit.GPIO8 = 1;   // Configure GPIO8 as EPWM5A
    GpioCtrlRegs.GPAMUX1.bit.GPIO9 = 1;   // Configure GPIO9 as EPWM5B
	
    EDIS;
}
#endif // endif DSP28_2808 || DSP28_2806  


#if DSP28_2808 || DSP28_2806
void InitEPwm6Gpio(void)
{
   EALLOW;

/* Enable internal pull-up for the selected pins */
// Pull-ups can be enabled or disabled by the user. 
// This will enable the pullups for the specified pins.
// Comment out other unwanted lines.

    GpioCtrlRegs.GPAPUD.bit.GPIO10 = 0;    // Enable pull-up on GPIO10 (EPWM6A)
    GpioCtrlRegs.GPAPUD.bit.GPIO11 = 0;    // Enable pull-up on GPIO11 (EPWM6B)

/* Configure ePWM-6 pins using GPIO regs*/
// This specifies which of the possible GPIO pins will be ePWM6 functional pins.
// Comment out other unwanted lines.

    GpioCtrlRegs.GPAMUX1.bit.GPIO10 = 1;   // Configure GPIO10 as EPWM6A
    GpioCtrlRegs.GPAMUX1.bit.GPIO11 = 1;   // Configure GPIO11 as EPWM6B
	
    EDIS;
}
#endif // endif DSP28_2808 || DSP28_2806  

//---------------------------------------------------------------------------
// Example: InitEPwmSyncGpio: 
//---------------------------------------------------------------------------
// This function initializes GPIO pins to function as ePWM Synch pins
//

void InitEPwmSyncGpio(void)
{

   EALLOW;

/* Configure EPWMSYNCI  */
   
/* Enable internal pull-up for the selected pins */
// Pull-ups can be enabled or disabled by the user. 
// This will enable the pullups for the specified pins.
// Comment out other unwanted lines.

   GpioCtrlRegs.GPAPUD.bit.GPIO6 = 0;    // Enable pull-up on GPIO6 (EPWMSYNCI)
// GpioCtrlRegs.GPBPUD.bit.GPIO32 = 0;   // Enable pull-up on GPIO32 (EPWMSYNCI)    

/* Set qualification for selected pins to asynch only */
// This will select synch to SYSCLKOUT for the selected pins.
// Comment out other unwanted lines.

   GpioCtrlRegs.GPAQSEL1.bit.GPIO6 = 0;   // Synch to SYSCLKOUT GPIO6 (EPWMSYNCI)
// GpioCtrlRegs.GPBQSEL1.bit.GPIO32 = 0;  // Synch to SYSCLKOUT GPIO32 (EPWMSYNCI)    

/* Configure EPwmSync pins using GPIO regs*/
// This specifies which of the possible GPIO pins will be EPwmSync functional pins.
// Comment out other unwanted lines.   

   GpioCtrlRegs.GPAMUX1.bit.GPIO6 = 2;    // Enable pull-up on GPIO6 (EPWMSYNCI)
// GpioCtrlRegs.GPBMUX1.bit.GPIO32 = 2;   // Enable pull-up on GPIO32 (EPWMSYNCI)    



/* Configure EPWMSYNC0  */

/* Enable internal pull-up for the selected pins */
// Pull-ups can be enabled or disabled by the user. 
// This will enable the pullups for the specified pins.
// Comment out other unwanted lines.

// GpioCtrlRegs.GPAPUD.bit.GPIO6 = 0;    // Enable pull-up on GPIO6 (EPWMSYNC0)
   GpioCtrlRegs.GPBPUD.bit.GPIO33 = 0;   // Enable pull-up on GPIO33 (EPWMSYNC0)    

// GpioCtrlRegs.GPAMUX1.bit.GPIO6 = 3;    // Enable pull-up on GPIO6 (EPWMSYNC0)
   GpioCtrlRegs.GPBMUX1.bit.GPIO33 = 2;   // Enable pull-up on GPIO33 (EPWMSYNC0)    

}



//---------------------------------------------------------------------------
// Example: InitTzGpio: 
//---------------------------------------------------------------------------
// This function initializes GPIO pins to function as Trip Zone (TZ) pins
//
// Each GPIO pin can be configured as a GPIO pin or up to 3 different
// peripheral functional pins. By default all pins come up as GPIO
// inputs after reset.  
// 

void InitTzGpio(void)
{
   EALLOW;
   
/* Enable internal pull-up for the selected pins */
// Pull-ups can be enabled or disabled by the user. 
// This will enable the pullups for the specified pins.
// Comment out other unwanted lines.
   GpioCtrlRegs.GPAPUD.bit.GPIO12 = 0;    // Enable pull-up on GPIO12 (TZ1)
   GpioCtrlRegs.GPAPUD.bit.GPIO13 = 0;    // Enable pull-up on GPIO13 (TZ2)
   GpioCtrlRegs.GPAPUD.bit.GPIO14 = 0;    // Enable pull-up on GPIO14 (TZ3)
   GpioCtrlRegs.GPAPUD.bit.GPIO15 = 0;    // Enable pull-up on GPIO15 (TZ4)

   GpioCtrlRegs.GPAPUD.bit.GPIO16 = 0;    // Enable pull-up on GPIO16 (TZ5)
// GpioCtrlRegs.GPAPUD.bit.GPIO28 = 0;    // Enable pull-up on GPIO28 (TZ5)

   GpioCtrlRegs.GPAPUD.bit.GPIO17 = 0;    // Enable pull-up on GPIO17 (TZ6) 
// GpioCtrlRegs.GPAPUD.bit.GPIO29 = 0;    // Enable pull-up on GPIO29 (TZ6)  
   
/* Set qualification for selected pins to asynch only */
// Inputs are synchronized to SYSCLKOUT by default.  
// This will select asynch (no qualification) for the selected pins.
// Comment out other unwanted lines.

   GpioCtrlRegs.GPAQSEL1.bit.GPIO12 = 3;  // Asynch input GPIO12 (TZ1)
   GpioCtrlRegs.GPAQSEL1.bit.GPIO13 = 3;  // Asynch input GPIO13 (TZ2)
   GpioCtrlRegs.GPAQSEL1.bit.GPIO14 = 3;  // Asynch input GPIO14 (TZ3)
   GpioCtrlRegs.GPAQSEL1.bit.GPIO15 = 3;  // Asynch input GPIO15 (TZ4)

   GpioCtrlRegs.GPAQSEL2.bit.GPIO16 = 3;  // Asynch input GPIO16 (TZ5)
// GpioCtrlRegs.GPAQSEL2.bit.GPIO28 = 3;  // Asynch input GPIO28 (TZ5)

   GpioCtrlRegs.GPAQSEL2.bit.GPIO17 = 3;  // Asynch input GPIO17 (TZ6) 
// GpioCtrlRegs.GPAQSEL2.bit.GPIO29 = 3;  // Asynch input GPIO29 (TZ6)  

   
/* Configure TZ pins using GPIO regs*/
// This specifies which of the possible GPIO pins will be TZ functional pins.
// Comment out other unwanted lines.   
   GpioCtrlRegs.GPAMUX1.bit.GPIO12 = 1;  // Configure GPIO12 as TZ1
   GpioCtrlRegs.GPAMUX1.bit.GPIO13 = 1;  // Configure GPIO13 as TZ2
   GpioCtrlRegs.GPAMUX1.bit.GPIO14 = 1;  // Configure GPIO14 as TZ3
   GpioCtrlRegs.GPAMUX1.bit.GPIO15 = 1;  // Configure GPIO15 as TZ4

   GpioCtrlRegs.GPAMUX2.bit.GPIO16 = 3;  // Configure GPIO16 as TZ5
// GpioCtrlRegs.GPAMUX2.bit.GPIO28 = 3;  // Configure GPIO28 as TZ5

   GpioCtrlRegs.GPAMUX2.bit.GPIO17 = 3;  // Configure GPIO17 as TZ6               
// GpioCtrlRegs.GPAMUX2.bit.GPIO29 = 3;  // Configure GPIO29 as TZ6  

   EDIS;
}



//===========================================================================
// End of file.
//===========================================================================

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区大片| 国产精品一区二区在线看| 久久久久综合网| 久久综合色8888| 久久新电视剧免费观看| 26uuu国产在线精品一区二区| 欧美大胆人体bbbb| 日韩视频免费直播| 久久蜜桃av一区精品变态类天堂 | 亚洲欧美日韩小说| 中文字幕不卡三区| 国产精品欧美一区喷水| 中文字幕精品—区二区四季| 国产精品久久毛片a| 亚洲免费观看高清完整版在线 | 精品一区二区三区香蕉蜜桃 | 精品国精品自拍自在线| 久久亚洲二区三区| 国产精品久久午夜| 亚洲在线视频网站| 视频一区中文字幕国产| 韩国一区二区视频| 粉嫩一区二区三区在线看| 91小宝寻花一区二区三区| 色香色香欲天天天影视综合网| 欧洲国内综合视频| 久久这里只有精品视频网| 国产精品午夜免费| 亚洲午夜免费视频| 激情成人综合网| 91福利精品视频| 欧美精品一区男女天堂| 夜夜嗨av一区二区三区网页 | 99精品久久久久久| 日韩三级在线观看| 亚洲精品自拍动漫在线| 麻豆精品一二三| 99v久久综合狠狠综合久久| 欧美蜜桃一区二区三区| 国产亲近乱来精品视频| 五月婷婷激情综合| 成人福利视频网站| 欧美大片一区二区| 亚洲妇女屁股眼交7| av成人免费在线| 日韩写真欧美这视频| 亚洲精品免费在线播放| 蜜桃久久久久久| 在线观看免费成人| 欧美国产日韩在线观看| 日韩高清一区二区| 91污片在线观看| 久久久av毛片精品| 天堂蜜桃91精品| 91首页免费视频| 久久久影视传媒| 麻豆国产欧美日韩综合精品二区| 色综合天天综合色综合av | 精品国产电影一区二区| 性欧美大战久久久久久久久| 成人国产精品免费观看视频| 久久一二三国产| 免费成人在线观看视频| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 欧美一区二区三区免费大片| 一区二区三区欧美视频| 成人激情文学综合网| 久久夜色精品国产欧美乱极品| 亚洲国产成人91porn| 91女厕偷拍女厕偷拍高清| 国产女人aaa级久久久级 | 亚洲成人激情自拍| 欧美日本一区二区三区四区 | 欧美mv日韩mv国产网站| 天涯成人国产亚洲精品一区av| 一本一本大道香蕉久在线精品| 国产精品全国免费观看高清| 成人高清视频在线观看| 中文字幕高清一区| 91亚洲资源网| 亚洲一级二级三级在线免费观看| 91农村精品一区二区在线| 亚洲欧洲制服丝袜| 欧美体内she精视频| 午夜精品久久久久久久久久 | 高清不卡在线观看av| 国产精品人人做人人爽人人添| 国产成人精品aa毛片| 亚洲欧美色图小说| 56国语精品自产拍在线观看| 热久久国产精品| 久久久久国产精品麻豆| 波多野结衣的一区二区三区| 一个色妞综合视频在线观看| 欧美日韩精品一区二区天天拍小说| 日韩在线卡一卡二| 精品国产乱码久久久久久闺蜜 | 色噜噜狠狠一区二区三区果冻| 亚洲女人的天堂| 欧美精品久久天天躁| 久久精品久久99精品久久| 久久九九全国免费| 欧美日韩中文另类| 国产美女精品一区二区三区| 亚洲精选在线视频| 精品乱人伦一区二区三区| 韩国精品主播一区二区在线观看 | 国内精品伊人久久久久影院对白| 国产日韩综合av| 欧美撒尿777hd撒尿| 国产乱子伦视频一区二区三区| 国产精品理论在线观看| 欧美精品日韩精品| 成人av资源站| 天天综合日日夜夜精品| 国产精品福利一区二区| 日韩欧美一级在线播放| 99精品视频在线播放观看| 久久精品国产在热久久| 亚洲欧美日本在线| 久久亚洲精华国产精华液| 欧美综合亚洲图片综合区| 国产盗摄女厕一区二区三区 | 中文字幕在线观看不卡| 欧美一区二区三区四区五区| av一区二区三区黑人| 欧美aaa在线| 一区二区三区欧美| 国产丝袜在线精品| 欧美一区二区观看视频| 色av综合在线| 91免费国产在线| 成人av网站在线| 国产精品亚洲人在线观看| 秋霞午夜av一区二区三区| 一区二区三区四区蜜桃| 最新欧美精品一区二区三区| 国产网站一区二区| 2019国产精品| 日韩欧美一级二级| 日韩三区在线观看| 欧美一区二区三区免费在线看| 欧美综合在线视频| 欧美亚洲国产一区二区三区va | 午夜精品久久久久久久蜜桃app| 国产精品素人视频| 国产日韩亚洲欧美综合| 久久久综合网站| 久久久久久久久久久久电影 | 一区二区成人在线视频| 亚洲自拍偷拍麻豆| 亚洲高清免费视频| 婷婷开心激情综合| 蜜桃视频在线观看一区| 蜜桃免费网站一区二区三区| 日本伊人精品一区二区三区观看方式| 亚洲成人免费观看| 日韩国产欧美一区二区三区| 视频一区在线视频| 国内久久婷婷综合| 国产精品资源站在线| 成人性生交大片| 92国产精品观看| 欧美日韩一区二区在线视频| 欧美精品黑人性xxxx| 日韩欧美亚洲国产精品字幕久久久| 日韩欧美你懂的| 国产精品蜜臀在线观看| 一区二区三区四区视频精品免费| 亚洲综合丝袜美腿| 美美哒免费高清在线观看视频一区二区| 久久国产尿小便嘘嘘| 国产高清亚洲一区| 91丨国产丨九色丨pron| 欧美一区二区三区在线观看| 久久久五月婷婷| 亚洲精品国产一区二区精华液 | 大桥未久av一区二区三区中文| 99国产欧美另类久久久精品 | 不卡av电影在线播放| 91久久人澡人人添人人爽欧美| 欧美日韩精品系列| 精品国产乱码久久久久久久久| 日韩毛片在线免费观看| 午夜欧美在线一二页| 国产在线精品一区在线观看麻豆| 成人小视频免费在线观看| 在线观看网站黄不卡| 欧美成人video| 一区二区三区国产豹纹内裤在线| 久久精品国产澳门| 97久久超碰国产精品电影| 日韩一区二区在线观看| 成人免费一区二区三区视频| 日本少妇一区二区| 91丨porny丨蝌蚪视频| 久久久久亚洲蜜桃| 免费欧美日韩国产三级电影| 97aⅴ精品视频一二三区| 精品国产第一区二区三区观看体验 |