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

Page 26

Advertising
background image

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.

15.6.9

SramRead

To read data from the SRAM
arguments area

15.6.10

SramCancel

To cancel a pending SRAM read or
write operation.

15.6.11

MemWriteStart To start a PCI write operation.

15.6.14

MemWriteDone To complete a PCI write operation.

15.6.15

MemReadStart To start a PCI read operation.

15.6.16

MemReadDone To complete a PCI read operation.

15.6.17


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.

Advertising