#include “stm32f10x.h”
#define GPIOA_CRL (unsigned int)0x40010800
#define GPIOA_CRH (unsigned int)0x40010804
#define GPIOA_IDR (unsigned int)0x40010808
#define GPIOA_ODR (unsigned int)0x4001080c
#define GPIOA_BSRR (unsigned int)0x40010810
#define GPIOA_BRR (unsigned int)0x40010814
#define RCC_GPIOA (unsigned int)0x40021018
//在通过数据手册给PA5引脚配置参数
int main(void)
{
RCC_GPIOA |= (1<<2);
GPIOA_CRL |= (1<<20);
GPIOA_ODR |= (1<<5);
while(1);
}
void SystemInit()//这里的SystemInit函数是为了让程序不报错
{
}
© 2021 GitHub, Inc.
服务条款
隐私
安全
状态
Docs
联系 GitHub
价格
API
培训
博客
关于