Dspattatchint, Memory allocation, Memlock – Sundance SMT6025 v.2.9 User Manual
Page 39

Version 2.9
Page 39 of 45
SMT6025 User Manual
The
SMT6025 allows you to attach an interrupt function to this event. Unlike
mailboxes, no data is transferred with this type of interrupt.
Refer to the samples for the DSPInt interrupt sample.
19.1 DspAttatchInt
Attach a user-specified function that is to be called when a DSP interrupt
occurs.
Prototype
void IFHw::DspAttatchInt( PFN_DSP_INT pDSPIntFunc )
Parameters
pDSPIntFunc
Pointer to the function that is to be called when the DSP
interrupt occurs.
20 Memory allocation
You can make minor improvements in the performance of the HSC by using
contiguous memory. The following functions allow you to allocate such memory.
20.1 MemLock
Lock down a memory buffer. The function can be used to lock down a
contiguous or scatter-gather type buffer. In the case of a scatter-gather type
buffer, the user has to allocate the memory before calling this function.
Prototype
Void * IFHw:: MemLock(
UINT nBytes, void *pBuf,
MDLEntry * pEntries, UINT &nEntCnt)
Parameters
nBytes
The size of the memory. For scatter-gather memory, this
specifies the size of the memory pointer to by pBuf. For
contiguous memory, this specifies the required memory
size.
pBuf
For scatter gather memory, this points to the memory.
For contiguous memory, this needs to be zero.
pEntries
Optional pointer to a buffer to receive the memory
descriptor list (MDL). When this value is zero, no MDL
list is returned .
nEntCnt
This is both an input and an output parameter. As an
input parameter, this indicate the number of MDL entries
that pEntries buffer contains. When the function returns,
User Manual (QCF42); Version 2.9, 22/02/02; © Sundance Multiprocessor Technology Ltd. 2002