普中开源电子分享网

 找回密码
 立即注册
搜索
查看: 1197|回复: 0

新手求助

[复制链接]

1

主题

1

帖子

13

积分

新手上路

Rank: 1

积分
13
发表于 2023-3-30 14:37:52 | 显示全部楼层 |阅读模式
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'D:\Keil_5\MDK5\ARM\ARMCC\Bin'
compiling main.c...
User\stm32f10x.h(20): warning:  #1-D: last line of file ends without a newline
         
User\main.c(10): error:  #20: identifier "AHBPRIPH_BASE" is undefined
          RCC_APB2ENR |= 1<<3;
User\main.c(11): error:  #20: identifier "ABP2PERIPH_BASE" is undefined
          GPIOB_CRL &= ~(0x0F<<(4*5));
User\main.c: 1 warning, 2 errors
"User\main.c" - 2 Error(s), 1 Warning(s).
我按照教程敲的,请问这个错误是什么原因。
代码:
#include "stm32f10x.h"

void SystemInit(void)
{

}

int main()
{
        RCC_APB2ENR |= 1<<3;
        GPIOB_CRL &= ~(0x0F<<(4*5));
        GPIOB_CRL |= (3<<4*5);
        GPIOB_BSRR = (1<<(16+5));
        while(1)
        {
       
        }
}


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

站长推荐上一条 /1 下一条

Archiver|手机版|小黑屋|普中开源电子分享网 粤ICP备16123577号-2

GMT+8, 2024-4-29 10:11 , Processed in 0.095739 second(s), 30 queries .

Powered by 论坛搭建 X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表