Example 2, Io_in_ready event, Syntax – Echelon Neuron C User Manual

Page 25: Example, Io_out_ready event

Advertising
background image

Neuron C Reference Guide

5

}

Example 2

IO_7 input pulsecount total_ticks;

when (io_changes(total_ticks) by 100)
{
...
}

io_in_ready

Event

The io_in_ready event evaluates to TRUE when a block of data is available to be

read on some asynchronous I/O models. When data is available, the application

then calls io_in( ) to retrieve the data.

The io_in_ready event is used with the parallel, sci, and spi I/O models; see the

I/O Model Reference

for more information about these I/O models.

Syntax

io_in_ready (

io-object-name

)

io-object-name

The I/O object name (see the

I/O Model Reference

).

Example

when (io_in_ready(io_bus))
{
io_in(io_bus, &data);
}

io_out_ready

Event

The io_out_ready event evaluates to TRUE whenever the I/O interface is in a
state where it can be written to, and the io_out_request( ) function has been

previously invoked.
The io_out_ready event is used with the parallel, sci, and spi I/O models; see the

I/O Model Reference

for more information about these I/O models.

Syntax

io_out_ready (

io-object-name

)

io-object-name

The I/O object name (see the

I/O Model Reference

).

Example

when (...)
{
io_out_request(io_bus);
}

Advertising