void read_ram(position_type *d)
{
INT24U r_point=d->read_ram_pointer;
unsigned char recdata;
TBLPTRL = r_point&0xFF;
TBLPTRH = (r_point>>8)&0xFF;
TBLPTRU = (r_point>>16)&0xFF;
_asm
TBLRD
_endasm
recdata = TABLAT;
if(r_point < 0x04FFFA)
{
r_point += 2;
}
else
{
r_point = 0x010000;
}
d->read_ram_pointer=r_point;
d->data_read_num++;
return(recdata);
}
此程序是从程序存储器读取,然后赋值给recdata.可是为什么我编译之后提示警告如下:unexpected return value
此帖出自
小平头技术问答
一周热门 更多>