Echelon Neuron C Manual do Utilizador Página 93

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 267
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 92
Neuron C Reference Guide 73
Example
#include <mem.h>
unsigned buf[40];
unsigned *p;
void f(void)
{
p = ansi_memcpy(buf, "Hello World", 11);
}
ansi_memset( ) Function
The ansi_memset( ) function sets the first
len
bytes of the block pointed to by
p
to
the character
c
. It also returns the value
p
. This function cannot be used to write
into EEPROM or flash memory.
The ansi_memset( ) function as implemented here conforms to the ANSI
definition for memset( ), as it returns the pointer
p
. See memset( ) for a non-
conforming implementation (does not have a return value), which is a more
efficient implementation if the return value is not needed. See also
ansi_memcpy( ), eeprom_memcpy( ), memccpy( ), memchr( ), memcmp( ), and
memcpy( ).
Syntax
#include <mem.h>
void *ansi_memset (void *
p
, int
c
, unsigned long
len
);
Example
#include <mem.h>
unsigned target[20];
unsigned *p;
void f(void)
{
p = ansi_memset(target, 0, 20);
}
application_restart( ) Function
The application_restart( ) function restarts the application program running on
the application processor only. The network, MAC, and interrupt processors are
unaffected. When an application is restarted, the when(reset) event becomes
TRUE.
Recommendation: For applications that include interrupt tasks, call
interrupt_control(0) to suspend the interrupt processing prior to restarting the
application.
Vista de página 92
1 2 ... 88 89 90 91 92 93 94 95 96 97 98 ... 266 267

Comentários a estes Manuais

Sem comentários