資源簡介
在CCS5.4上調試可以使用的程序,溫濕度值可以在變量窗口查看

代碼片段和文件信息
//?TI?File?$Revision:?/main/3?$
//?Checkin?$Date:?March?16?2007???08:37:30?$
//###########################################################################
//
//?FILE: DSP2833x_CpuTimers.c
//
//?title: CPU?32-bit?Timers?Initialization?&?Support?Functions.
//
//?NOTES:???CpuTimer1?and?CpuTimer2?are?reserved?for?use?with?DSP?BIOS?and
//??????????other?realtime?operating?systems.
//
//??????????Do?not?use?these?two?timers?in?your?application?if?you?ever?plan
//??????????on?integrating?DSP-BIOS?or?another?realtime?OS.
//
//
//###########################################################################
//?$TI?Release:?DSP2833x?Header?Files?V1.01?$
//?$Release?Date:?September?26?2007?$
//###########################################################################
#include?“DSP2833x_Device.h“?????//?Headerfile?Include?File
#include?“DSP2833x_Examples.h“???//?Examples?Include?File
struct?CPUTIMER_VARS?CpuTimer0;
//?CpuTimer?1?and?CpuTimer2?are?used?by?DSP?BIOS?&?other?RTOS.?Comment?out?if?using?DSP?BIOS?or?other?RTOS.
struct?CPUTIMER_VARS?CpuTimer1;
struct?CPUTIMER_VARS?CpuTimer2;
//---------------------------------------------------------------------------
//?InitCpuTimers:
//---------------------------------------------------------------------------
//?This?function?initializes?all?three?CPU?timers?to?a?known?state.
//
void?InitCpuTimers(void)
{
????//?CPU?Timer?0
//?Initialize?address?pointers?to?respective?timer?registers:
CpuTimer0.RegsAddr?=?&CpuTimer0Regs;
//?Initialize?timer?period?to?maximum:
CpuTimer0Regs.PRD.all??=?0xFFFFFFFF;
//?Initialize?pre-scale?counter?to?divide?by?1?(SYSCLKOUT):
CpuTimer0Regs.TPR.all??=?0;
CpuTimer0Regs.TPRH.all?=?0;
//?Make?sure?timer?is?stopped:
CpuTimer0Regs.TCR.bit.TSS?=?1;
//?Reload?all?counter?register?with?period?value:
CpuTimer0Regs.TCR.bit.TRB?=?1;
//?Reset?interrupt?counters:
CpuTimer0.InterruptCount?=?0;
//?CpuTimer?1?and?CpuTimer2?are?reserved?for?DSP?BIOS?&?other?RTOS
//?Do?not?use?these?two?timers?if?you?ever?plan?on?integrating
//?DSP-BIOS?or?another?realtime?OS.
//
//?Initialize?address?pointers?to?respective?timer?registers:
CpuTimer1.RegsAddr?=?&CpuTimer1Regs;
CpuTimer2.RegsAddr?=?&CpuTimer2Regs;
//?Initialize?timer?period?to?maximum:
CpuTimer1Regs.PRD.all??=?0xFFFFFFFF;
CpuTimer2Regs.PRD.all??=?0xFFFFFFFF;
????//?Initialize?pre-scale?counter?to?divide?by?1?(SYSCLKOUT):
CpuTimer1Regs.TPR.all??=?0;
CpuTimer1Regs.TPRH.all?=?0;
CpuTimer2Regs.TPR.all??=?0;
CpuTimer2Regs.TPRH.all?=?0;
????//?Make?sure?timers?are?stopped:
CpuTimer1Regs.TCR.bit.TSS?=?1;
CpuTimer2Regs.TCR.bit.TSS?=?1;
//?Reload?all?counter?register?with?period?value:
CpuTimer1Regs.TCR.bit.TRB?=?1;
CpuTimer2Regs.TCR.bit.TRB?=?1;
//?Reset?interrupt?counters:
CpuTimer1.InterruptCount?=?0;
CpuTimer2.InterruptCount?=?0;
}
//---------------------------------------------------------------------------
//?ConfigCpuTimer:
//-------------
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????329??2015-08-16?19:04??DHT11\.ccsproject
?????文件??????17524??2015-04-20?14:12??DHT11\.cdtbuild
?????文件??????17524??2015-08-16?19:04??DHT11\.cdtbuild_initial
?????文件????????553??2015-04-20?14:12??DHT11\.cdtproject
?????文件??????28025??2015-08-16?19:04??DHT11\.cproject
?????文件???????4235??2015-11-21?20:11??DHT11\.launches\lab3-timer0_LED.launch
?????文件????????845??2015-08-16?19:04??DHT11\.project
?????文件????????595??2015-08-16?19:04??DHT11\.project_initial
?????文件?????????62??2015-08-16?19:04??DHT11\.settings\org.eclipse.cdt.codan.core.prefs
?????文件????????123??2015-08-16?19:04??DHT11\.settings\org.eclipse.cdt.debug.core.prefs
?????文件????????632??2015-04-20?14:12??DHT11\.settings\org.eclipse.cdt.managedbuilder.core.prefs
?????文件????????301??2015-08-16?19:04??DHT11\.settings\org.eclipse.core.resources.prefs
?????文件????????220??2015-04-20?14:12??DHT11\cc_build_Debug.log
?????文件???????3947??2015-04-20?14:12??DHT11\CMD\28335_RAM_lnk.cmd
?????文件???????8438??2015-04-20?14:12??DHT11\CMD\DSP2833x_Headers_nonBIOS.cmd
?????文件???????4855??2015-04-20?14:12??DHT11\CMD\F28335.cmd
?????文件????????374??2015-11-21?20:11??DHT11\Debug\ccsObjs.opt
?????文件??????????0??2015-04-20?14:12??DHT11\Debug\CMD\ccsSrcs.opt
?????文件???????1826??2015-04-20?14:12??DHT11\Debug\CMD\subdir.mk
?????文件???????1577??2015-11-21?18:52??DHT11\Debug\CMD\subdir_rules.mk
?????文件????????373??2015-11-21?18:52??DHT11\Debug\CMD\subdir_vars.mk
?????文件???????1294??2015-11-21?12:05??DHT11\Debug\DSP2833x_ADC_cal.obj
?????文件???????1578??2015-11-21?12:05??DHT11\Debug\DSP2833x_CodeStartBranch.obj
?????文件???????5874??2015-11-21?12:05??DHT11\Debug\DSP2833x_CpuTimers.obj
?????文件??????55983??2015-11-21?12:05??DHT11\Debug\DSP2833x_DefaultIsr.obj
?????文件?????121449??2015-11-21?12:05??DHT11\Debug\DSP2833x_GlobalVariableDefs.obj
?????文件???????5829??2015-11-21?12:05??DHT11\Debug\DSP2833x_PieCtrl.obj
?????文件??????18031??2015-11-21?12:06??DHT11\Debug\DSP2833x_PieVect.obj
?????文件??????16235??2015-11-21?12:06??DHT11\Debug\DSP2833x_SysCtrl.obj
?????文件???????1303??2015-11-21?12:06??DHT11\Debug\DSP2833x_usDelay.obj
............此處省略83個文件信息
- 上一篇:人眼圖像庫
- 下一篇:DSP28335 三相SVPWM程序
評論
共有 條評論