ARM EABI编译器中的Memcpy()指令解释
题
我正在使用ARM EABI编译器使用Memcpy()函数。当我在文件中看到时,该函数被定义为
extern _ARMABI void *memcpy(void * __restrict /*s1*/,
const void * __restrict /*s2*/, size_t /*n*/)
__attribute__((__nonnull__(1,2)));
/*
* copies n characters from the object pointed to by s2 into the object
* pointed to by s1. If copying takes place between objects that overlap,
* the behaviour is undefined.
* Returns: the value of s1.
*/
.
请原谅我的无知;因为我不太熟悉c和指针。有人请详细说明const void *它的意思是什么,并且需要在调用时维护那些语法(如__Attribute等)功能?
谢谢!
我的实现:
char mycharacter;
mycharacter = ROM_UARTCharGetNonBlocking(UART0_BASE);
memcpy(SRAM_BASE, mycharacter, size_t (mycharacter);
. 解决方案
具有标准库的全部点是您不必了解使用该功能的实现。
不隶属于 StackOverflow