Functions

dsp.h File Reference


Detailed Description

Defines interface exposed by DSP sub-component.

============================================================================

Path:
/gpp/inc/sys/arch/
Version:
1.65.02.09 ============================================================================
Copyright:
Copyright (C) 2002-2012, Texas Instruments Incorporated - https://www.ti.com/

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

* Neither the name of Texas Instruments Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ============================================================================

#include <dsplink.h>
#include <_dspdefs.h>
Include dependency graph for dsp.h:

Go to the source code of this file.

Functions

NORMAL_API Void DSP_moduleInit (Void)
 Initializes the DSP module.
NORMAL_API Void DSP_moduleExit (Void)
 Finalizes the DSP module.
NORMAL_API DSP_STATUS DSP_init (IN ProcessorId dspId, IN DSP_Interface *interface)
 Resets the DSP and initializes the components required by DSP. Puts the DSP in RESET state.
NORMAL_API DSP_STATUS DSP_exit (IN ProcessorId dspId)
 Resets the DSP and puts it into IDLE Mode.
NORMAL_API DSP_STATUS DSP_start (IN ProcessorId dspId, IN Uint32 dspAddr)
 Causes DSP to start execution from the given DSP address. DSP is put to STARTED state after successful completion.
NORMAL_API DSP_STATUS DSP_stop (IN ProcessorId dspId)
 Stops execution on DSP. DSP is put to STOPPED state after successful completion.
NORMAL_API DSP_STATUS DSP_idle (IN ProcessorId dspId)
 Idles the DSP. DSP is put to IDLE state after successful completion.
NORMAL_API DSP_STATUS DSP_intCtrl (IN ProcessorId dspId, IN Uint32 intId, IN DSP_IntCtrlCmd cmd, IN OUT Pvoid arg)
 Perform the specified DSP interrupt control activity.
NORMAL_API DSP_STATUS DSP_read (IN ProcessorId dspId, IN Uint32 dspAddr, IN Endianism endianInfo, IN Uint32 numBytes, OUT Uint8 *buffer)
 Reads data from DSP.
NORMAL_API DSP_STATUS DSP_write (IN ProcessorId dspId, IN Uint32 dspAddr, IN Endianism endianInfo, IN Uint32 numBytes, IN Uint8 *buffer)
 Writes data to DSP.
NORMAL_API Uint32 DSP_addrConvert (IN ProcessorId dspId, IN Uint32 addr, IN DSP_AddrConvType type)
 Convert address between GPP and DSP address space.
NORMAL_API DSP_STATUS DSP_control (IN ProcessorId dspId, IN Int32 cmd, Pvoid arg)
 Hook for performing device dependent control operation.

Function Documentation

NORMAL_API Void DSP_moduleInit ( Void   )

Initializes the DSP module.

============================================================================

Function:
DSP_moduleInit
Returns:
None.
Precondition:
dspId must be a valid DSP identifier.
Postcondition:
None.
See also:
DSP_init ============================================================================
NORMAL_API Void DSP_moduleExit ( Void   )

Finalizes the DSP module.

============================================================================

Function:
DSP_moduleExit
Returns:
None.
Precondition:
dspId must be a valid DSP identifier.
Postcondition:
None.
See also:
DSP_init ============================================================================
NORMAL_API DSP_STATUS DSP_init ( IN ProcessorId  dspId,
IN DSP_Interface *  interface 
)

Resets the DSP and initializes the components required by DSP. Puts the DSP in RESET state.

============================================================================

Function:
DSP_init
Parameters:
dspIdProcessor Id.
interfaceInterface to DSP/DEVICE APIs.
Returns:
DSP_SOK Operation successfully completed. DSP_EINVALIDARG Invalid argument. DSP_EVALUE Invalid DSP MMU endianism configuration. DSP_EFAIL DSP_setup function wasn't called before calling this function.
Precondition:
DSP_setup must be called before calling this function. dspId must be a valid DSP identifier.
Postcondition:
None.
See also:
DSP_exit ============================================================================
NORMAL_API DSP_STATUS DSP_exit ( IN ProcessorId  dspId )

Resets the DSP and puts it into IDLE Mode.

============================================================================

Function:
DSP_exit
Parameters:
dspIdProcessor Id.
Returns:
DSP_SOK Operation successfully completed. DSP_EINVALIDARG Invalid argument.. DSP_EFAIL DSP_setup function wasn't called before calling this function.
Precondition:
DSP_setup must be called before calling this function. dspId must be a valid DSP identifier.
Postcondition:
None.
See also:
DSP_init ============================================================================
NORMAL_API DSP_STATUS DSP_start ( IN ProcessorId  dspId,
IN Uint32  dspAddr 
)

Causes DSP to start execution from the given DSP address. DSP is put to STARTED state after successful completion.

============================================================================

Function:
DSP_start
Parameters:
dspIdProcessor Id.
dspAddrAddress to start execution from.
Returns:
DSP_SOK Operation successfully completed. DSP_EINVALIDARG Invalid argument.. DSP_EFAIL DSP_setup function wasn't called before calling this function.
Precondition:
DSP_setup must be called before calling this function. dspId must be a valid DSP identifier.
Postcondition:
None.
See also:
DSP_stop ============================================================================
NORMAL_API DSP_STATUS DSP_stop ( IN ProcessorId  dspId )

Stops execution on DSP. DSP is put to STOPPED state after successful completion.

============================================================================

Function:
DSP_stop
Parameters:
dspIdProcessor Id.
Returns:
DSP_SOK Operation successfully completed. DSP_EINVALIDARG Invalid argument.. DSP_EFAIL DSP_setup function wasn't called before calling this function.
Precondition:
DSP_setup must be called before calling this function. dspId must be a valid DSP identifier.
Postcondition:
None.
See also:
DSP_start ============================================================================
NORMAL_API DSP_STATUS DSP_idle ( IN ProcessorId  dspId )

Idles the DSP. DSP is put to IDLE state after successful completion.

============================================================================

Function:
DSP_idle
Parameters:
dspIdProcessor Id.
Returns:
DSP_SOK Operation successfully completed. DSP_EINVALIDARG Invalid argument.. DSP_EFAIL DSP_setup function wasn't called before calling this function.
Precondition:
DSP_setup must be called before calling this function. dspId must be a valid DSP identifier.
Postcondition:
None.
See also:
DSP_start ============================================================================
NORMAL_API DSP_STATUS DSP_intCtrl ( IN ProcessorId  dspId,
IN Uint32  intId,
IN DSP_IntCtrlCmd  cmd,
IN OUT Pvoid  arg 
)

Perform the specified DSP interrupt control activity.

============================================================================

Function:
DSP_intCtrl
Parameters:
dspIdProcessor ID.
intIdInterrupt ID.
cmdInterrupt control command to be performed.
argOptional input/output argument specific to each control command.
Returns:
DSP_SOK Operation successfully completed. DSP_EINVALIDARG Invalid argument. DSP_EFAIL DSP_setup function wasn't called before calling this function.
Precondition:
DSP_setup must be called before calling this function. dspId must be a valid DSP identifier. isrObj must be a valid pointer.
Postcondition:
None.
See also:
DSP_start ============================================================================
NORMAL_API DSP_STATUS DSP_read ( IN ProcessorId  dspId,
IN Uint32  dspAddr,
IN Endianism  endianInfo,
IN Uint32  numBytes,
OUT Uint8 buffer 
)

Reads data from DSP.

============================================================================

Function:
DSP_read
Parameters:
dspIdProcessor ID.
dspAddrDSP address to read from.
endianInfoendianness of data - indicates whether swap is required or not.
numBytesNumber of bytes to read.
bufferBuffer to hold the read data.
Returns:
DSP_SOK Operation successfully completed. DSP_EINVALIDARG Invalid argument.. DSP_EFAIL DSP_setup function wasn't called before calling this function.
Precondition:
DSP_setup must be called before calling this function. dspId must be a valid DSP identifier. numBytes must be a valid pointer. buffer must be a valid pointer.
Postcondition:
On successful completion, holds the number of bytes read.
See also:
None. ============================================================================
NORMAL_API DSP_STATUS DSP_write ( IN ProcessorId  dspId,
IN Uint32  dspAddr,
IN Endianism  endianInfo,
IN Uint32  numBytes,
IN Uint8 buffer 
)

Writes data to DSP.

============================================================================

Function:
DSP_write
Parameters:
dspIdProcessor ID.
dspAddrDSP address to write to.
endianInfoendianness of data - indicates whether swap is required or not.
numBytesNumber of bytes to write.
bufferBuffer containing data to be written.
Returns:
DSP_SOK Operation successfully completed. DSP_EINVALIDARG Invalid argument.. DSP_EFAIL DSP_setup function wasn't called before calling this function.
Precondition:
DSP_setup must be called before calling this function. dspId must be a valid DSP identifier. buffer must be a valid pointer.
Postcondition:
None.
See also:
None. ============================================================================
NORMAL_API Uint32 DSP_addrConvert ( IN ProcessorId  dspId,
IN Uint32  addr,
IN DSP_AddrConvType  type 
)

Convert address between GPP and DSP address space.

============================================================================

Function:
DSP_addrConvert
Parameters:
dspIdProcessor Id.
addrAddress to be converted. If DSP address, the addr parameter reflects the DSP MADU address.
typeType of address conversion.
Returns:
Converted address. Operation successfully completed. ADDRMAP_INVALID. Specified address is not in mapped range.
Precondition:
DSP_setup must be called before calling this function. dspId must be a valid DSP identifier.
Postcondition:
None.
See also:
DSP_AddrConvType ============================================================================
NORMAL_API DSP_STATUS DSP_control ( IN ProcessorId  dspId,
IN Int32  cmd,
Pvoid  arg 
)

Hook for performing device dependent control operation.

============================================================================

Function:
DSP_control
Parameters:
dspIdProcessor ID.
cmdCommand id.
argOptional argument for the specified command.
Returns:
DSP_SOK Operation successfully completed. DSP_EINVALIDARG Invalid arguments specified.
Precondition:
DSP_setup must be called before calling this function. dspId must be a valid DSP identifier.
Postcondition:
None.
See also:
None. ============================================================================
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2012, Texas Instruments Incorporated