WOLFRAM SYSTEM MODELER

read

Wolfram Language

In[1]:=
SystemModel["ModelPlug.Internal.I2C.read"]
Out[1]:=

Information

Reads the the number of bytes specified by the variable 'bytes' out the given 'register'. This function requires a vector of integers as input ('data') and will return as output a new vector of the same size with the read data. This function returns a value ('updated') that becomes true when the data was received.

It is recommended to use the special read functions (readByte, readUInt8, readSInt8, readUInt16 and readSInt16).

If the read operation is not to an specific register, the input variable 'register' should be 0.

Syntax

(new_state, new_t, data_out, updated) = read(device, state, t, stage, register, bytes, data)

Inputs (7)

device

Type: Device

state

Type: State

t

Type: Transaction

stage

Type: Stage

register

Type: Integer

bytes

Type: Integer

data

Type: Integer[bytes]

Outputs (4)

new_state

Type: State

new_t

Type: Transaction

data_out

Type: Integer[bytes]

updated

Type: Boolean