Recallhandlers, Implementing a handler – Sundance SMT6025 v.2.9 User Manual
Page 27

Version 2.9
Page 27 of 45
SMT6025 User Manual
15.5.2.5 RecallHandlers
Recall any loaded handlers and puts the host into a state where it will
read commands from the DSP but do not perform any action. This is
useful if the host side software wants to disconnect the DSP and the
handler. The DSP will no longer be able to communicate with any
handlers. This state will remain in operation until the DSP is reset, in
which case the default handler will be reselected.
Prototype
void IFHw:: RecallHandlers
(void)
Parameters
None
15.5.3 Implementing a handler
The handler takes the form of a DLL. Development is done with
Microsoft Visual Studio 6.0. A handler DLL must export the following
function:
extern "C" __declspec(dllexport) HSCHndl* OpenHandler(HSC
*pHsc, int Code, int Arg);
where
pHsc
Is a pointer to the HSC object.
Code
Is a value specified by the DSP.
Arg
Is a value specified by the DSP.
extern "C" __declspec(dllexport) void
CloseHandler(HSCHndl *p )
where
p
Is a pointer to the currenlty open handler.
To implement a handler, derive the handler class from
HSCHndl and
implement the following virtual functions.
struct HSCHndl {
virtual ~HSCHndl() {};
virtual int InitHandler (HSC *pHsc) = 0;
virtual int OnPciToHost (HSC *pHsc, HANDLE hCancel) = 0;
virtual int OnHostToPci (HSC *pHsc, HANDLE hCancel) = 0;
virtual int OnOpenPci (HSC *pHsc, HANDLE hCancel) = 0;
virtual int OnClosePci (HSC *pHsc, HANDLE hCancel) = 0;
virtual int OnSramToHost (HSC *pHsc, HANDLE hCancel) = 0;
virtual int OnHostToSram (HSC *pHsc, HANDLE hCancel) = 0;
virtual int OnUserDefined (HSC *pHsc, HANDLE hCancel) = 0;
};
User Manual (QCF42); Version 2.9, 22/02/02; © Sundance Multiprocessor Technology Ltd. 2002