我在代码中并没有使用memcpy,但把这个函数注释掉就不会报错了,自己写一个memcpy也会报错error: conflicting types for ‘memcpy’,这是什么情况呢,是代码写的不对吗
在main里
unsigned int ledvalue[]={0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc};
spisend(ECSPI2, ledvalue, 24);
函数定义
void spisend(ECSPI_Type *base, unsigned int *data, unsigned int size)
{
int i;
while (size - 64 > 0)
{
for (i = 0; i < 64; i++)
base->TXDATA = *(++data);
size -= 64;
}
while (size--)
base->TXDATA = *(++data);
}
报错obj/main.o: In function `main':
main.c.text.startup+0x4c): undefined reference to `memcpy'
Makefile:70: recipe for target 'xxx.bin' failed
make: *** [int.bin] Error 1
|