#include "hw_ints.h"
#include "hw_memmap.h"
#include "hw_types.h"
#include "gpio.h"
#include "sysctl.h"
#define PINS GPIO_PIN_0
void delay(int d)
{
for(;d;--d);
}
int main(void)
{
unsigned int i;
SysCtlClockSet(SYSCTL_SYSDIV_1|SYSCTL_USE_OSC|SYSCTL_OSC_MAIN|SYSCTL_XTAL_6MHZ);//直接使用外部晶振
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD);//使能GPIO的PD模块
GPIODirModeSet(GPIO_PORTD_BASE,PINS,GPIO_DIR_MODE_OUT);//设置PD0输出
for(i=0;i<10;i++);
{
GPIOPinWrite(GPIO_PORTD_BASE,PINS,~PINS);//置PD0低电平
delay(20000);
GPIOPinWrite(GPIO_PORTD_BASE,PINS,PINS);//置PD0高电平
delay(20000);
}
SysCtlClockSet(SYSCTL_SYSDIV_1|SYSCTL_USE_PLL|SYSCTL_OSC_MAIN|SYSCTL_XTAL_6MHZ);//使用PLL
for(i=0;i<10;i++)
{GPIOPinWrite(GPIO_PORTD_BASE,PINS,PINS);
delay(20000);
GPIOPinWrite(GPIO_PORTD_BASE,PINS,PINS);
delay(20000);
}
我的程序 每次编译都出现Description Resource Path Location Type
errors encountered during linking; "LAB2.out" not built LAB2 C/C++ Problem
<a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/10234.html">[?]</a> unresolved symbols remain LAB2 C/C++ Problem
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>