The default handler, Custom handlers, Section 15.5.4. if – Sundance SMT6035 v.2.2 User Manual
Page 26

Version 2.2
Page 26 of 39
SMT6035 User Manual
15.5.3 The default handler
When no handler is specified for a channel, the default handler will be in
use. It performs the basic functions on the host side associated with a
HSC.
The HSC object exposes a number of functions used with the default
handler. They are listed in the table below.
Function
Purpose
Section
SramWrite To
write
data
to the SRAM argument
area.
SramRead
To read data from the SRAM
arguments area
SramCancel
To cancel a pending SRAM read or
write operation.
MemWriteStart To start a PCI write operation.
MemWriteDone To complete a PCI write operation.
MemReadStart To start a PCI read operation.
MemReadDone To complete a PCI read operation.
If you specify your own handler, then probably the functionality provided
by the functions listed above will be somehow incorporated into the
custom behaviour of your handler. While a custom handler is in effect,
the functions above will no longer work. The default handler will be
reinstated when a custom handler is closed, or when the DSP is reset
using the SMT6035.
15.5.4 Custom
handlers
It is possible to create your own handler for user specific requirements.
Please refer to the SmtHscFile library installed with the SMT6035 for an
example of a custom handler. This handler allows the DSP to access
files on the host system by performing the host side functions on behalf
of the DSP.
A handler DLL must export the following function. This function will be
called by the libsmtdrv.so when the DSP specifies this handler.
extern "C" __declspec(dllexport)
int HandlerEntry(
HSC *pHsc,
int Code,
int Arg,
HANDLE hCancel );
where:
User Manual - Version 2.2, 04/01/07; © Sundance Italia S.R.L.