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);