DHL Driver
Application Program Interface
2-89
Module Configuration Parameters
Instance Configuration Parameters
Data Streaming
DHL devices can be opened for input or output data streaming. A DHL
device used by a stream created in output mode must be associated with
an output HST channel. A DHL device used by a stream created in input
mode must be associated with an input HST channel. If these conditions
are not met, a SYS_EBADOBJ error is reported in the system log during
startup when the BIOS_start routine calls the DHL_open function for the
device.
To use a DHL device in a statically-created stream, set the deviceName
property of the SIO object to match the name of the DHL device you
configured.
mySio.deviceName = prog.get("myDhl");
To use a DHL device in a stream created dynamically with SIO_create,
use the DHL device name (as it appears in your Tconf script) preceded
by “/” (forward slash) as the first parameter of SIO_create:
stream = SIO_create(“/dhl0”, SIO_INPUT, 128, NULL);
To enable data streaming between the target and the host through
streams that use DHL devices, you must bind and start the underlying
HST channels of the DHL devices from the Host Channels Control in
Code Composer Studio, just as you would with other HST objects.
DHL devices copy the data between the frames in the HST channel’s
pipe and the stream’s buffers. In input mode, it is the size of the frame in
the HST channel that drives the data transfer. In other words, when all
the data in a frame has been transferred to stream buffers, the DHL
device returns the current buffer to the stream’s fromdevice queue,
making it available to the application. (If the stream buffers can hold more
data than the HST channel frames, the stream buffers always come back
partially full.) In output mode it is the opposite: the size of the buffers in
the stream drives the data transfer so that when all the data in a buffer
Name
Type
Default
OBJMEMSEG
Reference
prog.get("DARAM")
Name
Type
Default (Enum Options)
comment
String
"<add comments here>"
hstChannel
Reference
prog.get("myHST")
mode
EnumString
"output" ("input")