f07pwmdac1.c
来自「TI公司24X系列DSP控制无刷直流电机」· C语言 代码 · 共 42 行
C
42 行
/* ==================================================================================
File name: F07PWMDAC1.C
Originator: Digital Control Systems Group
Texas Instruments
Description:
This file contains source for the Full Compare PWMDAC drivers for the F2407
Applicability of these functions is indicated in the Table 1
=====================================================================================
History:
-------------------------------------------------------------------------------------
12-10-2000 Release Rev 1.00 */
/*----------------------------------------------------------------------------*/
/* T A B L E 1 */
/*----------------------------------------------------------------------------*/
/* Function Name | Applicability */
/*----------------------------------------------------------------------------*/
/* | F240 | F241| F243 | LF2402 | LF2406 | LF2407 */
/* | | | | | | */
/* F2407_PWMDAC_Init | | | | Y | Y | Y */
/*----------------------------------------------------------------------------*/
#include "..\include\regs240x.h"
#include "..\include\F07PWMDAC.h"
#include "..\include\override.h"
int F2407_PWMDAC_Init(PWMDAC *p)
{
SCSR1|=0x0008; /* Turn EVB Clocks on */
T3PER=p->pwmdac_period*15; /* Init Timer 3 period Register */
T3CON=PWMDAC_INIT_STATE; /* Symmetrical Operation */
DBTCONB=DBTCONB_INIT_STATE;
ACTRB=ACTRB_INIT_STATE;
COMCONB=0x8200;
MCRC|=0x007e; /* Set up the full compare PWM pins to primary functions.*/
return(0);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?