Touch, Example, Io_out_request( ) built-in function – Echelon Neuron C User Manual

Page 120: Syntax, Example 1, Example 2

Advertising
background image

100

Functions

touch

For touch I/O objects, the syntax is:

io_out (

touch-io-obj

,

buf

,

count

);

buf

A

(void *) pointer to a buffer.

count

The number of bits to be written (from 1 to 255).

Example

boolean value;
IO_0 output bit d0;

void f(void)
{
io_out(d0,

value);

}

io_out_request( )

Built-in Function

The io_out_request( ) built-in function is used with the parallel I/O object and the
sci I/O object.
The io_out_request( ) sets up the system for an io_out( ) on the specified parallel

I/O object. When the system is ready, the io_out_ready event becomes TRUE and
the io_out( ) function can be used to write data to the parallel port. See Chapter

2,

Focusing on a Single Device,

of the

Neuron C Programmer's Guide

for more

information.

Syntax

void io_out_request (

io-object-name

);

io-object-name

Specifies the I/O object name, which corresponds to

io-object-name

in the I/O object’s declaration.

Example 1

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

The io_out_request( ) is used with a sci I/O object to start the serial transfer.

Example 2

IO_8 sci baud(SCI_2400) iosci;
unsigned short buf[20];

when (...)
{

io_out_request(iosci, buf, 20);

}

Advertising