Opening a channel handler, Closing a handler, Development guidelines – Sundance SMT6025 v.2.9 User Manual
Page 28

Version 2.9
Page 28 of 45
SMT6025 User Manual
Each virtual function shown above corresponds to a command word
from the DSP. The mapping is shown in the table.
Function Called
when:
OnPciToHost When the DSP sends a
HSC_PciToHost command.
OnHostToPci When the DSP sends a
HSC_HostToPci command.
OnOpenPci When the DSP sends a
HSC_OpenPci command.
OnClosePci When the DSP sends a
HSC_ClosePci command.
OnSramToHost When the DSP sends a
HSC_SramToHost command.
OnHostToSram When the DSP sends a
HSC_HostToSram command.
OnUserDefined When the DSP sends a
HSC_UserDefined command.
15.5.4 Opening a channel handler
When the DSP wishes to open a handler on the host, the DSP writes
the details of the handler in the SRAM argument area for the relevant
channel. It then sends a
HSC_OpenHandler command to the host.
The format of the data block required in the SRAM is described by the
following structure, which can be found in smthsc.h.
typedef struct {
int Code;
int Arg;
char Dll[128]; /* name of handler dll,
including .DLL */
} HSC_Param_OpenHandler;
The DSP is free to specify values for Code and Arg. These values
might be interpreted on the host by the OpenHandler() function. The
design of these values is completely up to the designer.
15.5.5 Closing a handler
Once the DSP has finished using a handler, it sends a
HSC_CloseHandler command word to the host. This will make the
host unload the handler, and revert back to the default handler.
15.5.6 Development
guidelines
For each of the virtual functions described by the HSCHndl class, takes
a cancel event handle as a parameter. When these functions return,
they should return one of the following values:
HSC_HANDLER_OK
User Manual (QCF42); Version 2.9, 22/02/02; © Sundance Multiprocessor Technology Ltd. 2002