换了光盘里现成的hex灯亮了所以不是开发板的问题,麻烦帮忙看下工程文件主函数有什么问题,谢谢
[mw_shl_code=c,true]#include "delay.h"
#include "sys.h"
#include "stm32f10x.h"
#include "stm32f10x_conf.h"
void Delay(u32 count)
{
u32 i=0;
for(;i<count;i++);
}
int main(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
delay_init();
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5 ;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOB,&GPIO_InitStructure);
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOE,ENABLE);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5 ;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOE,&GPIO_InitStructure);
while(1)
{
GPIO_SetBits(GPIOB,GPIO_Pin_5);
Delay (3000000);
GPIO_ResetBits(GPIOB,GPIO_Pin_5);
Delay(3000000);
}
}
[/mw_shl_code]
|