res =
fopen (obj) (dummy)
¶Opens parallel interface obj
This currently is a dummy function to improve compatibility to MATLAB
data =
fread (obj)
¶data =
fread (obj, size)
¶data =
fread (obj, size, precision)
¶[data,count] =
fread (obj, ...)
¶[data,count,errmsg] =
fread (obj, ...)
¶Reads data from parallel instrument
obj is a parallel object.
size Number of values to read. (Default: 1).
precision precision of data.
data The read data.
count values read.
errmsg read operation error message.
parallel =
parallel ([path], [direction])
¶Open Parallel interface.
path - the interface path of type String. If omitted defaults to ’/dev/parport0’.
direction - the direction of interface drivers of type Integer, see: PP_DATADIR for more info.
If omitted defaults to 1 (Input).
The parallel() shall return instance of octave_parallel class as the result parallel.
(parallel)
¶Close the interface and release a file descriptor.
parallel - instance of octave_serial class.
None
(parallel, ctrl)
¶c =
pp_ctrl (parallel)
¶Sets or Read the Control lines.
parallel - instance of octave_parallel class.
ctrl - control parameter to be set of type Byte.
If ctrl parameter is omitted, the pp_ctrl() shall return current Control lines state as the result c.
(parallel, data)
¶d =
pp_data (parallel)
¶Sets or Read the Data lines.
parallel - instance of octave_parallel class.
data - data parameter to be set of type Byte.
If data parameter is omitted, the pp_data() shall return current Data lines state as the result d.
(parallel, direction)
¶dir =
pp_datadir (parallel)
¶Controls the Data line drivers.
Normally the computer’s parallel port will drive the data lines, but for byte-wide transfers from the peripheral to the host it is useful to turn off those drivers and let the peripheral drive the signals. (If the drivers on the computer’s parallel port are left on when this happens, the port might be damaged.)
parallel - instance of octave_parallel class.
direction - direction parameter of type Integer. Supported values: 0 - the drivers are turned on
(Output/Forward direction); 1 - the drivers are turned off (Input/Reverse direction).
If direction parameter is omitted, the pp_datadir() shall return current Data direction as the result dir.
stat =
pp_stat (parallel)
¶Reads the Status lines.
parallel - instance of octave_parallel class.
The pp_stat() shall return current Status lines state as the result stat.