21ic电子技术开发论坛

标题: 提示PD_DDR未定义 [打印本页]

作者: fhsxycq    时间: 2015-8-13 16:24
标题: 提示PD_DDR未定义
刚开始学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"
你去这看看,有没有那几个宏定义的参数。




欢迎光临 21ic电子技术开发论坛 (https://bbs.21ic.com/) Powered by Discuz! X3.5