初级会员

- 积分
- 90
- 金钱
- 90
- 注册时间
- 2020-10-17
- 在线时间
- 29 小时
|
#include "stm32f10x.h"
#define periph_base (unsigned int)0x40000000
#define APB2periph_base periph_base +0x10000
#define AHPperiph_base periph_base +0x20000
#define RCC_base AHPperiph_base+0x1000
#define GPIOB_base APB2periph_base+0x0C00
#define RCC_APB2ENR *(unsigned int*)(RCC_base+0x18)
#define GPIOB_CRL *(unsigned int*)(RCC_base+0x00)
#define GPIOB_CRH *(unsigned int*)(RCC_base+0x04)
#define GPIOB_ODR *(unsigned int*)(RCC_base+0x0C)
int main()
{
RCC_APB2ENR |=(1<<3); //使能时钟
GPIOB_CRL |=((1)<<(4*5)); //端口配置低寄存器
GPIOB_ODR &=~(1<<5); //配置端口输出寄存器
}
void SystemInit(void)
{
}
有没有老哥知道,我这个程序为什么点不亮LED0(PB5)
|
|