Example, Ansi_memset( ) function, Syntax – Echelon Neuron C User Manual
Page 93: Application_restart( ) function

Neuron C Reference Guide
73
Example
#include
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
void *ansi_memset (void *
p
, int
c
, unsigned long
len
);
Example
#include
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.