[STM8] 提示PD_DDR未定义

[复制链接]
1453|1
 楼主| fhsxycq 发表于 2015-8-13 16:24 | 显示全部楼层 |阅读模式
DDR, pd, gp, pi, IO
刚开始学STM8,写了几句控制端口的语句,发现如下提示,求指导,开发环境为IAR 2.10
#include "stm8l15x.h"
int main(void)
{
   GPIOD->DDR=0x80;
   GPIOD->ODR=0X33;
   GPIOD->CR1=0X00;
   GPIOD->CR2=0X00;
   PD_DDR=0X00;
   PD_ODR=0X00;
   GPIOD_CR1=0X00;
   GPIOD_CR2=0X00;
   
}

Error[Pe020]: identifier "PD_DDR" is undefined F:\code_test\main.c 11
Error[Pe020]: identifier "PD_ODR" is undefined F:\code_test\main.c 12
Error[Pe020]: identifier "GPIOD_CR1" is undefined F:\code_test\main.c 13
Error[Pe020]: identifier "GPIOD_CR2" is undefined F:\code_test\main.c 14

598330983 发表于 2015-8-13 16:46 | 显示全部楼层
#include "stm8l15x.h"
你去这看看,有没有那几个宏定义的参数。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

8

主题

45

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部