Pregunta

Estoy usando la función Memcpy () usando el compilador de ARM EABI.Como veo en el archivo, la función se define como

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.
    */

Perdona mi ignorancia; ya que no estoy muy familiarizado con C y los punteros en general. Por favor, alguien me detalle lo que significa por Const Void * y hace que esas sincaxis (como __Attribute, etc.) deben mantenerse mientras se llamala función?

¡Gracias!

Mi implementación:

char mycharacter;
mycharacter = ROM_UARTCharGetNonBlocking(UART0_BASE);
memcpy(SRAM_BASE, mycharacter, size_t (mycharacter);

¿Fue útil?

Solución

El objetivo completo de tener una biblioteca estándar es que no tiene que entender la implementación para usar la función.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top