Bitshift, Edgelog, Infrared – Echelon Neuron C User Manual

Page 113

Advertising
background image

Neuron C Reference Guide

93

io_in (

input-obj

);

The type of the

return-value

of the io_in( ) call is listed in the table above.

bitshift

For bitshift input objects, the syntax is:
io_in (

bitshift-input-obj

[,

numbits

]);

numbits

The number of bits to be shifted in, from 1 to 127. Only

the last 16 bits shifted in are returned. The unused bits

are 0 if fewer than 16 bits are shifted in.

edgelog

For edgelog

input objects, the syntax is:

io_in (

edgelog-input-obj

,

buf

,

count

);

buf

A pointer to a buffer of unsigned long values.

count

The maximum number of values to be read.

The io_in( ) call has an unsigned short

return-value

that is the actual number of

edges logged.

ic2

For i2c

I/O objects, the syntax is:

io_in (

i2c-io-obj

,

buf

,

addr

,

count

);

io_in (

i2c-io-obj

,

buf

,

addr

,

count

,

stop

);

buf

A

(void *) pointer to a buffer.

addr

An

unsigned short int I2C device address.

count

The number of bytes to be transferred.

stop

A Boolean value to specify whether the stop condition is

asserted after the transfer.

The io_in( ) call has a boolean

return-value

that indicates whether the transfer

succeeded (TRUE) or failed (FALSE).

infrared

For infrared

input objects, the syntax is:

io_in (

infrared-obj

,

buf

,

ct

,

v1

,

v2

);

buf

A pointer to a buffer of unsigned short values.

ct

The maximum number of bits to be read.

v1

The maximum period value (an unsigned long). See the

I/O model description in the

I/O Model Reference

.

v2

The threshold value (an unsigned long). See the infrared

I/O model description in the

I/O Model Reference

.

Advertising