?? dsp28_ev.c
字號:
//###########################################################################
//
// FILE: DSP28_Ev.c
//
// TITLE: DSP28 Event Manager Initialization & Support Functions.
//###########################################################################
#include "DSP28_Device.h"
//---------------------------------------------------------------------------
// InitEv:
//---------------------------------------------------------------------------
// This function initializes to a known state.
//
void InitEv(void)
{
// Enable Clock to EV
EALLOW;
SysCtrlRegs.PCLKCR.bit.EVAENCLK=1;
EDIS;
EALLOW;
GpioMuxRegs.GPAMUX.all=0xff; // Configure MUXs as digital I/Os or
GpioMuxRegs.GPBMUX.all=0xff; // peripheral I/Os
EDIS;
// Configure EV module
EvaRegs.T1PR = 0xffff; // Setup period register
EvaRegs.T1CMPR = 0xffff; // Setup T1 compare value for 0% duty cycle
EvaRegs.GPTCONA.all=0x17A; // T1 to ADC, Enable T1CMP, T2CMP
EvaRegs.T1CON.all = 0x9042; // Enable timer 1 compare (upcount mode)
EvaRegs.ACTRA.all=0x0666; // Enable PWM1, PWM2, PWM3, PWM4, PWM5, PWM6
EvaRegs.COMCONA.all = 0x8600; // Compare reload, Enable Full compare output
}
//===========================================================================
// No more.
//===========================================================================
?? 快捷鍵說明
復制代碼
Ctrl + C
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -