Example, Spi_abort( ) function, Syntax – Echelon Neuron C User Manual
Page 156

136
Functions
void sleep (unsigned int
flags
,
io-object-name
);
void sleep (unsigned int
flags
,
io-pin
);
flags
One or more of the following three flags, or 0 if no flag is
specified:
COMM_IGNORE
Causes incoming messages to be
ignored
PULLUPS_ON
Enables all I/O pullup resistors
(the service pin pullup is not
affected)
TIMERS_OFF
Turns off all timers in the
program
If two or more flags are used, they must be combined
using either the + or the | operator.
io-object-name
Specifies an input object for any of the IO_4 through IO_7
pins. When any I/O transition occurs on the specified pin,
the Neuron core wakes up. If neither this parameter nor
the
io-pin
argument are specified, I/O is ignored after the
Neuron core goes to sleep.
io-pin
Specifies one of the IO_4 through IO_7 pins directly
instead of through a declared I/O object.
Example
IO_6 input bit wakeup;
...
when (flush_completes)
{
sleep(COMM_IGNORE + TIMERS_OFF, wakeup);
}
spi_abort( )
Function
The spi_abort( ) built-in function terminates any outstanding SPI I/O operation
in progress.
Syntax
void spi_abort (
io-object-name
);
Example
IO_8 spi master clock(4) iospi;
when (...)
{
spi_abort(iospi);
}