Contents

API Reference Guide for the OTX DSP C55x SDK

Odin TeleSystems Inc.
Doc. No. 1211-1-SDA-1012-1
Doc. Rev. 2.0.1.0
Doc. Date 11/05/04
Copyright \'a9 2003-2004 Odin TeleSystems Inc., All Rights Reserved

API Function Reference

DSP SDK Functions (Dsp55Api.h)

Macro, Constant and Type Reference

Constants, Macros, and Types (Dsp55Def.h)
Communication protocol between Host and Dsp (DspIoctl.h)
Constants, Macros, and Types (DspIoctl.h)
Host-Dsp Communication addresses (Dsp55Ioctl.h)

Header File Reference

Dsp55Api.h
Dsp55Def.h
Dsp55Law.h
DspIoctl.h
Dsp55Ioctl.h

Communication protocol between Host and Dsp (DspIoctl.h)


DSP SDK Host .. DSP Macro, Constant and Type Reference

Example

IO Control Code structure
The IO Control codes used (from Host towards the DSP code) are
16 bit values layed out as follows:


 1 1 1 1 1 1
 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0

|S|C|P|         Code            |
where
S - SDK System IO Codes - reserved

    1 - SDK Reserved System Codes

    0 - User application code

C - Data Complete - reserved

    0 - There is more data pending for this IO Code

    1 - Data is complete for this IO Code.

P - Padded octet for Data

    0 - Even number of octets were transferred. Data length (in words)
	reflects actual number of data octets transferred (2*octets).

    1 - Odd number of octets were transferred. Data length includes one
	padded octet.

Code - is the IO Control code value
Host-To-Dsp IO Control Communication

There is only one pending IO Control packet in the DSP HPI memory 
at any time. The Otx Driver buffers pending IO Control packets. The DSP 
application must act on the IO Control packet with minimum latency.

The DSP application processes the IO Control packets by performing 
these steps:
1. Retrieve (and possibly process) the data passed in the IO packet.
2. Writing return data (if any) to OTXDSP_SDK_IOCTL_DATA_ADDR and data
   length OTXDSP_SDK_IOCTL_DATA_LEN_ADDR.
3. Mark the completion of the packet by writing OTXDSP_SDK_IO_NO_COMMAND
   to the OTXDSP_SDK_IOCTL_CODE_ADDR.
4. Issue an interrupt towards the host.
The data used for the IO Control communication is packed in the following format.
1 1 1 1 1 1
5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0

|           IO Code             |  OTXDSP_SDK_IOCTL_CODE_ADDR

|  LogDevType   |  Handle       |  OTXDSP_SDK_IOCTL_HANDLE_ADDR

|           Task Ref            |  OTXDSP_SDK_IOCTL_TASKREF_ADDR

|           Data Length (n)     |  OTXDSP_SDK_IOCTL_DATA_LEN_ADDR

|           Data Word 0         |  OTXDSP_SDK_IOCTL_DATA_ADDR

|           Data Word 1         |

:                               :

|           Data Word (n-1)     |
Dsp-To-Host Asynchronous Event Communication

The DSP code can buffer several Event packets in a circular buffer

The data used for the Event communication from the DSP towards 
the host is packed in the following format.
1 1 1 1 1 1
5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0

|           Processing Addr     |       OTXDSP_SDK_EVENT_BUF_PROCESSING_ADDR

|S|C|P|     Event Code          |  >-+  OTXDSP_SDK_EVENT_BUF_ADDR (start of buffer)
|
|  LogDevType   |  Handle       |    |
|
|           TaskRef             |    |
|
|           TimeStamp bit 48-63 |    |
|
|           TimeStamp bit 32-47 |    |
|
|           TimeStamp bit 16-31 |    |
|
|           TimeStamp bit  0-15 |    |
|
|           Data Length (n=0)   |    |
|
|S|C|P|     Event Code          |    |
|
|  LogDevType   |  Handle       |    |
|
|           TaskRef             |    |
|
|           TimeStamp bit 48-63 |    |
|
|           TimeStamp bit 32-47 |    |
|
|           TimeStamp bit 16-31 |    |
|
|           TimeStamp bit  0-15 |    |
|
|           Data Length (n=2)   |    |
|
|           Data Word 0         |    |
|
|           Data Word 1         |    |
|
|  OTXDSP_SDK_EVENT_NO_COMMAND  |    |
|
:                               :    |
|
|                               |  <-+  End of Event buffer


*/ /*

Constants, Macros, and Types (Dsp55Def.h)


DSP C55x SDK Macro, Constant, and Type Reference



DSP SDK Functions (Dsp55Api.h)

DSP SDK Functions available for custom DSP Applications

Dsp55Api Function Reference



Dsp55Api.h




Dsp55Def.h




Dsp55Ioctl.h




DspIoctl.h




Host-Dsp Communication addresses (Dsp55Ioctl.h)

Overriding the some of the macros defined in Dsp55Ioctl.h

We keep the host/dsp communication buffers below address 0x10000 so that we can use unsigned short as the data type for the address pointers.

\\*--------------------------------------------------------------------------


Dsp55Api

Filename: Dsp55Api.h

Description

DSK SDK API Function Prototypes

Dsp55Def

Filename: Dsp55Def.h

Description

Constants, Macros, and Types for the DSP C55x SDK

Dsp55Ioctl.h

Filename: Dsp55Ioctl.h

Description

Macros and structs for sharing data between a C55x DSP and the host.

Dsp55Law.h

Filename: Dsp55Law.h

Description

A-law and U-law expansion tables.

\\*--------------------------------------------------------------------------


DspIoctl.h

Filename: DspIoctl.h

Description

Macros and structs for sharing data between the DSP and the host. (for all C5000 DSPs)

OtxDspAlawCompress

extern short OtxDspAlawCompress(short lawCompInput)
Takes in a 14 bit 2-s complement value and returns a A-law compressed value ready to transmission (8-bits)
Defined in: Dsp55Api.h

Parameters

lawCompInput
14 bit 2-s complement value to be companded

Comments

Every other bit is inverted (for transmission).

OtxDspCalculateFreeBufferSpace

void OtxDspCalculateFreeBufferSpace(void)
Calculates the amount of free space in the notify event buffer. The result ends up in the 'g_hpiEventBufDiag' variable.
Defined in: Dsp55Api.h

OtxDspCommandComplete

void OtxDspCommandComplete(unsigned short hHandle)
Completes an IO Control call from the host. No data is passed back to the host.
Defined in: Dsp55Api.h

Parameters

hHandle
Handle to the user defined logical device

OtxDspCommandCompleteData

void OtxDspCommandCompleteData(unsigned short hHandle, unsigned short * pData, unsigned short dataLen)
Completes an IO Control call from the host. Passes an arbitrary size of return data from a IO Control call back to the host.
Defined in: Dsp55Api.h

Parameters

hHandle
Handle to the user logical device
pData
Pointer to the data to be returned to the host driver
dataLen
Length of the data to be returned to the host driver

OtxDspCommandCompleteRc

void OtxDspCommandCompleteRc(unsigned short hHandle, unsigned short nResult)
Completes an IO Control call from the host. Passes a return code from an IO Control call back to the host.
Defined in: Dsp55Api.h

Parameters

hHandle
Handle to the user defined logical device
nResult
Result code to be passed to the host driver

OtxDspInit

void OtxDspInit( void)
Run Standard OTX DSP SDK API Initializations. Calls OtxDspInitSerialPort.
Defined in: Dsp55Api.h

Parameters

void
No parameters

OtxDspInitGlobalData

void OtxDspInitGlobalData( void)
Initialize Standard Global Data. Called by OtxDspInit.
Defined in: Dsp55Api.h

Parameters

void
No parameters

OtxDspInitSerialPort

void OtxDspInitSerialPort( void)
Initialize the Multi-Channel Serial Port #0 (McBSP0). Called by OtxDspInit.
Defined in: Dsp55Api.h

Parameters

void
No parameters

OtxDspInitTimer

short OtxDspInitTimer( void)
Resets the internal DSP timer to be used for timestamping of Host events. The timer interrupt frequency is 10.000MHz for ASM and PCI boards and 10.036MHz for PCMCIA boards. The timer interrupt service routine is called when the TIM register is decremented to 0. The timer interrupt service routine increments a 64 bit timestamp which is used the Host events.

This function should be called when the OTXDSP_SDK_IO_INIT_TIMER IO code is sent from the host.
Defined in: Dsp55Api.h

Parameters

void
No parameters

OtxDspLawExpand

extern short OtxDspLawExpand(unsigned short lawExpandInput, short law)
Expands a U-law or A-law companded 8-bit sample and returns a 14-bit 2's complement value (in the 14 least significant bits of a 16-bit word)
Defined in: Dsp55Api.h

Parameters

lawExpandInput
Sample to be expanded (8-bits sign magnitude value
law
Law (0 = u-law, 1 = A-law)

Comments

Since a-law only has a range of -4196 .. x .. 4195, the value is multiplied by 2 before it is returned to make it a full scale 14-bit value.

OtxDspServiceIoControl

void OtxDspServiceIoControl( void)
Call-back routine called by the Interrupt Service Routine when the host has issued a command to the HPI and requests our attention.
Defined in: Dsp55Api.h

Parameters

void
No parameters

Comments

This function is called from the Interrupt Service Routine. TO BE RE-IMPLEMENTED BY THE USER.

OtxDspServiceRxSerialPort

void OtxDspServiceRxSerialPort( void)
Call-back routine call when we have receive interrupt from the Buffered Serial Port indicating the the receive buffer is either full or half-full.
Defined in: Dsp55Api.h

Parameters

void
No parameters

Comments

This function is called from the Interrupt Service Routine TO BE RE-IMPLEMENTED BY THE USER.

OtxDspServiceTxSerialPort

void OtxDspServiceTxSerialPort( void)
Call-back routine call when we have transmit interrupt from the Buffered Serial Port indicating the the transmit buffer is either empty or half-empty.
Defined in: Dsp55Api.h

Parameters

void
No parameters

Comments

This function is called from the Interrupt Service Routine TO BE RE-IMPLEMENTED BY THE USER.

OtxDspSetHostEvent

short OtxDspSetHostEvent(unsigned short nEvent, unsigned short hHandle, unsigned short nTaskRef, unsigned short * pData, unsigned short nDataLen)
Generates a driver event for the host and copies the associated data to the HPI buffer.
Defined in: Dsp55Api.h

Parameters

nEvent
Event to be send to the host
hHandle
Handle to the user logical device sending the event
nTaskRef
Associated Task Reference
pData
Pointer to the data to be sent to the host
nDataLen
Length of the data to be sent

OtxDspSetHostEventEx

short OtxDspSetHostEventEx(unsigned short nEvent, unsigned short hHandle, unsigned short nTaskRef, unsigned short * pData, unsigned short nDataLen, short bOctetTransfer)
Generates a driver event for the host and copies the associated data to the HPI buffer.

Extended version. Has the ability to transfer a buffer of octets as well as a buffer of words.
Defined in: Dsp55Api.h

Parameters

nEvent
Event to be send to the host
hHandle
Handle to the user logical device sending the event
nTaskRef
Associated Task Reference
pData
Pointer to the data to be sent to the host
nDataLen
Length of the data to be sent
bOctetTransfer
OTXDSP_TRUE if nDataLen and pData specifies octets. OTXDSP_FALSE if they specify words

OtxDspSetHostEventUlong

short OtxDspSetHostEventUlong(unsigned short nEvent, unsigned short hHandle, unsigned long data)
Easy access function for sending an event to the host with unsigned long as the data.
Defined in: Dsp55Api.h

Parameters

nEvent
Event to be send to the host
hHandle
Handle to the user logical device sending the event
data
Data to be sent to the host

OtxDspSetHostEventUshort

short OtxDspSetHostEventUshort(unsigned short nEvent, unsigned short hHandle, unsigned short data)
Easy access function for sending an event to the host with an unsigned short as the data.
Defined in: Dsp55Api.h

Parameters

nEvent
Event to be send to the host
hHandle
Handle to the user logical device sending the event
data
Data to be sent to the host

OtxDspSetHostEventVoid

short OtxDspSetHostEventVoid(unsigned short nEvent, unsigned short hHandle)
Easy access function for sending an event to the host with no data.
Defined in: Dsp55Api.h

Parameters

nEvent
Event to be send to the host
hHandle
Handle to the user logical device sending the event

OtxDspStartProgram

short OtxDspStartProgram(OtxDspSdkIoInStartProgramS * pSin)
Verifies that the DSP SDK and the Host driver revisions match. Initializes the PLL to make it run at the maximum speed for this particular DSP.

This function should be called when the OTXDSP_SDK_IO_START_PROGRAM IO code is sent from the host.
Defined in: Dsp55Api.h

Parameters

pSin

See Also

OtxDspSdkIoInStartProgramS

OtxDspUlawCompress

extern short OtxDspUlawCompress(short lawCompInput)
Takes in a 14 bit 2-s complement value and returns a U-law compressed value ready to transmission (8-bits)
Defined in: Dsp55Api.h

Parameters

lawCompInput
14 bit 2-s complement value to be companded

Comments

Value bits (0-6) are inverted

C55X_CLR_HINT

Macro for clearing the HINT bit. Clearing this bit, followed by setting this bit will generate an interrupt pulse to the host
Defined in: Dsp55Def.h

C55X_CLR_INT_MASK_BIT

Macro for Globally Unmasking (enable) Interrupts
Defined in: Dsp55Def.h

C55X_CLR_XF_BIT

Macro for clearing the XF bit. Connected to the heart-beat LED. Turns the LED on.
Defined in: Dsp55Def.h

C55X_NOP

Macro for No-operation
Defined in: Dsp55Def.h

C55X_SET_HINT

Macro for setting the HINT bit
Defined in: Dsp55Def.h

C55X_SET_INT_MASK_BIT

Macro for Globally Masking (disable) Interrupts
Defined in: Dsp55Def.h

C55X_SET_LED0_OFF

Macro for turning red LED0 off
Defined in: Dsp55Def.h

C55X_SET_LED0_ON

Macro for turning red LED0 on
Defined in: Dsp55Def.h

C55X_SET_LED1_OFF

Macro for turning red LED1 off
Defined in: Dsp55Def.h

C55X_SET_LED1_ON

Macro for turning red LED1 on
Defined in: Dsp55Def.h

C55X_SET_LED2_OFF

Macro for turning green LED2 off. This LED is normally used as a heart-beat blinking LED
Defined in: Dsp55Def.h

C55X_SET_LED2_ON

Macro for turning green LED2 on. This LED is normally used as a heart-beat blinking LED
Defined in: Dsp55Def.h

Members

cwFreeBuffer
Current number of free words in the HPI Event Buffer
cwMinFreeBuffer
Minimum number of free words in the HPI Event Buffer since the application started
coLostEvents
Number of lost event packets (due to a full buffer) since the application started

C55X_SET_XF_BIT

Macro for setting the XF bit. Connected to the heart-beat LED. Turns the LED off.
Defined in: Dsp55Def.h

C55X_WAIT_FOR_INT

Macro for making the DSP go idle. It will wake up on any enabled interrupt.
Defined in: Dsp55Def.h

OTXDSP_ALAW

A-Law Companding
Defined in: Dsp55Def.h

OTXDSP_BSP_RXBUF_SIZE

The size of the Receive buffer for the highest
Defined in: Dsp55Def.h

OTXDSP_BSP_TXBUF_SIZE

The size of the Transmit buffer for the highest
Defined in: Dsp55Def.h

OTXDSP_FALSE

Boolean value TRUE
Defined in: Dsp55Def.h

OTXDSP_HWY_SPEED_2M

Highway speed 2048 kpbs is supported for this DSP program.
Defined in: Dsp55Def.h

OTXDSP_HWY_SPEED_4M

Highway speed 4096 kpbs is supported for this DSP program.
Defined in: Dsp55Def.h

OTXDSP_HWY_SPEED_8M

Highway speed 8192 kpbs is supported for this DSP program.
Defined in: Dsp55Def.h

OTXDSP_HWY_SPEEDS

Supported highway speeds for this DSP program.
Defined in: Dsp55Def.h

OTXDSP_INVALID_HANDLE

Invalid Logical Device Handle Value
Defined in: Dsp55Def.h

OTXDSP_LDEVICE_USER_APPLICATION

Reserved. The logical device type is the 8 most significant bits of the OTXDSP_SDK_IOCTL_HANDLE_ADDR address
Defined in: DspIoctl.h

OTXDSP_NO_TASKREF

No Task Reference
Defined in: Dsp55Def.h

OTXDSP_SDK_E_ABORT

Otx DSP SDK Result Code: Operation aborted
Defined in: DspIoctl.h

OTXDSP_SDK_E_ACCESSDENIED

Otx DSP SDK Result Code: General access denied error
Defined in: DspIoctl.h

OTXDSP_SDK_E_ALREADY_EXISTS

Otx DSP SDK Result Code: Attempted to create an already existing Logical device
Defined in: DspIoctl.h

OTXDSP_SDK_E_BLOCKED

Otx DSP SDK Result Code: Device Blocked
Defined in: DspIoctl.h

OTXDSP_SDK_E_CALL_FAIL

Otx DSP SDK Result Code: Call into other process failed (e.g. app to driver)
Defined in: DspIoctl.h

OTXDSP_SDK_E_FAIL

Otx DSP SDK Result Code: Unspecified error
Defined in: DspIoctl.h

OTXDSP_SDK_E_HANDLE

Otx DSP SDK Result Code: Invalid handle
Defined in: DspIoctl.h

OTXDSP_SDK_E_IN_USE

Otx DSP SDK Result Code: The requested resource or function cannot service the request at this time
Defined in: DspIoctl.h

OTXDSP_SDK_E_IN_USE

Otx DSP SDK Result Code: The requested resource is in use by another application
Defined in: DspIoctl.h

OTXDSP_SDK_E_INVALIDARG

Otx DSP SDK Result Code: One or more arguments are invalid
Defined in: DspIoctl.h

OTXDSP_SDK_E_NO_INTERRUPT

Otx DSP SDK Result Code: No Interrupt
Defined in: DspIoctl.h

OTXDSP_SDK_E_NO_SUCH_OBJECT

Otx result Code: Reference to non-existent object or type, etc.
Defined in: DspIoctl.h

OTXDSP_SDK_E_NOT_CONNECTED

Otx DSP SDK Result Code: The logical device is not connected
Defined in: DspIoctl.h

OTXDSP_SDK_E_NOT_INITIALIZED

Otx DSP SDK Result Code: The OtxXxxxInit() function needs to be called for this logical device
Defined in: DspIoctl.h

OTXDSP_SDK_E_NOT_SUPPORTED

Otx DSP SDK Result Code: Functionality not supported by the logical device
Defined in: DspIoctl.h

OTXDSP_SDK_E_NOT_WORKING

Otx DSP SDK Result Code: The logical device is not in working state
Defined in: DspIoctl.h

OTXDSP_SDK_E_NOTIMPL

Otx DSP SDK Result Code: Not implemented
Defined in: DspIoctl.h

OTXDSP_SDK_E_OUT_OF_CONNECTIONS

Otx DSP SDK Result Code: Connection limit is reached. The DSP code cannot accept more connections until a connection is freed.
Defined in: DspIoctl.h

OTXDSP_SDK_E_OUT_OF_RESOURCES

Otx DSP SDK Result Code: Ran out of software resources
Defined in: DspIoctl.h

OTXDSP_SDK_E_OUTOFMEMORY

Otx DSP SDK Result Code: Creation (new/malloc) failed, i.e. ran out of memory
Defined in: DspIoctl.h

OTXDSP_SDK_E_POINTER

Otx DSP SDK Result Code: Invalid pointer
Defined in: DspIoctl.h

OTXDSP_SDK_E_REG_NO

Otx DSP SDK Result Code: Invalid Register Number
Defined in: DspIoctl.h

OTXDSP_SDK_E_TIMEOUT

Otx DSP SDK Result Code: Timeout
Defined in: DspIoctl.h

OTXDSP_SDK_E_UNEXPECTED

Otx DSP SDK Result Code: Catastrophic failure
Defined in: DspIoctl.h

OTXDSP_SDK_E_UNSUPPORTED_DEVICE

Otx DSP SDK Result Code: The DSP code cannot support the requested Logical Device
Defined in: DspIoctl.h

OTXDSP_SDK_E_UNSUPPORTED_IO_CODE

Otx DSP SDK Result Code: The DSP code does not support this IO code
Defined in: DspIoctl.h

OTXDSP_SDK_E_UNSUPPORTED_PIPE_CAPACITY

Otx DSP SDK Result Code: The DSP code cannot support the requested pipe capacity
Defined in: DspIoctl.h

OTXDSP_SDK_E_UNSUPPORTED_VERSION

Otx DSP SDK Result Code: The DSP code does not support this driver version
Defined in: DspIoctl.h

OTXDSP_SDK_E_WRONG_CONTEXT

Otx DSP SDK Result Code: Call not allowed here
Defined in: DspIoctl.h

OTXDSP_SDK_EVENT_BUF_ADDR

Start address for Circular buffer of event from the DSP to the host
Defined in: Dsp55Ioctl.h

OTXDSP_SDK_EVENT_BUF_LEN

Length of the Circular buffer (in words)
Defined in: Dsp55Ioctl.h

OTXDSP_SDK_EVENT_BUF_PROCESSING_ADDR

The host writes the current processing address to this location
Defined in: Dsp55Ioctl.h

OTXDSP_SDK_EVENT_NO_COMMAND

Marks the end of the pending Events to be processed by the host
Defined in: DspIoctl.h

OTXDSP_SDK_FAILURE

Generic test for success on any status value (negative numbers indicate failure).
Defined in: DspIoctl.h

OTXDSP_SDK_FRAMES_PER_BUF

Number frames in the receive and transmit
Defined in: Dsp55Def.h

OTXDSP_SDK_IO_CLOSE

Issued when OtxDrvClose() is called. Data Length 0
Defined in: DspIoctl.h

OTXDSP_SDK_IO_CONNECT

Issued when OtxDrvConnectLogicalDevice() is called. Data is OtxDspSdkIoInConnectS.
Defined in: DspIoctl.h

OTXDSP_SDK_IO_CREATE

Issued when OtxDrvCreateLogicalDevice() is called. Data Length 0
Defined in: DspIoctl.h

OTXDSP_SDK_IO_DISABLE

Issued when OtxDrvDisable() is called. Data Length 0
Defined in: DspIoctl.h

OTXDSP_SDK_IO_DISCONNECT

Issued when OtxDrvDisconnectLogicalDevice() is called. Data is OtxDspSdkIoInDisconnectS.
Defined in: DspIoctl.h

OTXDSP_SDK_IO_ENABLE

Issued when OtxDrvEnable() is called. Data Length 0
Defined in: DspIoctl.h

OTXDSP_SDK_IO_GET_FRAME_BUFFER_COUNTER

Returns the current Frame Buffer Counter from the DSP. The size of the frame buffer is set by each DSP program.
Defined in: DspIoctl.h

OTXDSP_SDK_IO_INIT_BSP

Issued internally from the driver. DSP application should call OtxDspInitBufferedSerialPorts when the driver sends this IO command. Data Length 0
Defined in: DspIoctl.h

OTXDSP_SDK_IO_INIT_TIMER

Issued internally from the driver to synchronize the timers used for timestamping. Data Length is 0.
Defined in: DspIoctl.h

OTXDSP_SDK_IO_NO_COMMAND

Reserved. Not to be used an IO Control Code. This value should be written to OTXDSP_SDK_IOCTL_CODE_ADDR when the DSP completes the IO packet.
Defined in: DspIoctl.h

OTXDSP_SDK_IO_RESET

Issued when OtxDrvReset is called. Data Length 0
Defined in: DspIoctl.h

OTXDSP_SDK_IO_START_PROGRAM

Issued internally from the driver after the program is downloaded to the DSP. DSP application should call OtxDspStartProgram when the driver sends this IO command. Data is OtxDspSdkIoInStartProgramS.
Defined in: DspIoctl.h

OTXDSP_SDK_IOCTL_CODE_ADDR

Start of the DSP IO Control packet. The host will always wait for the DSP to acknowledge the command (by writing OTXDSP_SDK_IO_NO_COMMAND to this address).
Defined in: Dsp55Ioctl.h

OTXDSP_SDK_IOCTL_DATA_ADDR

Start of data
Defined in: Dsp55Ioctl.h

OTXDSP_SDK_IOCTL_DATA_LEN_ADDR

Data length for the command issued by the host
Defined in: Dsp55Ioctl.h

OTXDSP_SDK_IOCTL_HANDLE_ADDR

Handle of the Logical device (nEventSourceId parameter of OtxDrvCreateLogicalDevice)
Defined in: Dsp55Ioctl.h

OTXDSP_SDK_IOCTL_TASKREF_ADDR

Task Reference
Defined in: Dsp55Ioctl.h

OTXDSP_SDK_MAX_TIMESLOTS

Maximum number of timeslots on any OTX highway. Some DSP code will only support maximum 64 timeslots, and some DSP code will only support a maximum of 32 timeslots.
Defined in: DspIoctl.h

Developer Notes

Structs for passing data over the DSP IOCTL interface

OTXDSP_SDK_RX_DIRECTION

Otx DSP SDK Receive Direction, i.e. data for the DSP code to process
Defined in: DspIoctl.h

OTXDSP_SDK_S_FALSE

Otx DSP SDK Result Code: Everything ok, but result is logically false
Defined in: DspIoctl.h

OTXDSP_SDK_S_OK

Otx DSP SDK Result Code: Everything ok
Defined in: DspIoctl.h

OTXDSP_SDK_S_PENDING

Otx DSP SDK Result Code: The data necessary to complete this operation is not yet available.
Defined in: DspIoctl.h

OTXDSP_SDK_S_SIGNALLED

Otx DSP SDK Result Code: An event was signalled
Defined in: DspIoctl.h

OTXDSP_SDK_S_TIMEOUT

Otx DSP SDK Result Code: An wait operation timed out
Defined in: DspIoctl.h

OTXDSP_SDK_SUCCESS

Generic test for success on any status value (non-negative numbers indicate success).
Defined in: DspIoctl.h

OTXDSP_SDK_TIMESLOTS_PER_HIGHWAY

Otx DSP SDK Number of 64kbit/s timeslots per highway
Defined in: Dsp55Ioctl.h

OTXDSP_SDK_TX_DIRECTION

Otx DSP SDK Transmit Direction, i.e. data generated by the DSP code
Defined in: DspIoctl.h

OTXDSP_SDK_WORDSLOTS_PER_HIGHWAY

Otx DSP SDK Number of 128kbit/s timeslots per highway
Defined in: Dsp55Ioctl.h

OTXDSP_TRUE

Boolean value TRUE
Defined in: Dsp55Def.h

OTXDSP_ULAW

U-Law Companding
Defined in: Dsp55Def.h

OtxDspHpiDiag

Struct for diagnostics of the HPI Event buffer (events passed from the DSP to the host)
Defined in: Dsp55Def.h

Members

nHighPart
Bit 48-63
nMidPart
Bit 32-47
nLowPart
Bit 16-31

OtxDspSdkIoInConnectS structure

struct {
	short nDirection;
	short nCapacity;
	unsigned short sqConnectMask[OTXDSP_SDK_MAX_TIMESLOTS/2];
	unsigned short coMaskSize;
	unsigned short hPipeHandleLowPart;
	unsigned short hPipeHandleHighPart;
} OtxDspSdkIoInConnectS;
Data for the OTXDSP_SDK_IO_CONNECT IO Control code
Defined in: DspIoctl.h

Members

nDirection
Either OTXDSP_SDK_RX_DIRECTION or OTXDSP_SDK_TX_DIRECTION
nCapacity
Pipe capacity in kbytes/s
sqConnectMask[OTXDSP_SDK_MAX_TIMESLOTS/2]
Timeslots to connect to on the DSP Highway
coMaskSize
Actual number of timeslots used in sqConnectMask
hPipeHandleLowPart
Lower 16 bits of the host's handle for this pipe
hPipeHandleHighPart
Upper 16 bits of the host's handle for this pipe

OtxDspSdkIoInDisconnectS structure

struct {
	short nDirection;
	short nCapacity;
	unsigned short sqConnectMask[OTXDSP_SDK_MAX_TIMESLOTS/2];
	unsigned short coMaskSize;
	unsigned short hPipeHandleLowPart;
	unsigned short hPipeHandleHighPart;
} OtxDspSdkIoInDisconnectS;
Data for the OTXDSP_SDK_IO_DISCONNECT IO Control code
Defined in: DspIoctl.h

Members

nDirection
Either OTXDSP_SDK_RX_DIRECTION or OTXDSP_SDK_TX_DIRECTION
nCapacity
Pipe capacity in kbytes/s
sqConnectMask[OTXDSP_SDK_MAX_TIMESLOTS/2]
Timeslots to connect to on the DSP Highway
coMaskSize
Actual number of timeslots used in sqConnectMask
hPipeHandleLowPart
Lower 16 bits of the host's handle for this pipe
hPipeHandleHighPart
Upper 16 bits of the host's handle for this pipe

OtxDspSdkIoInStartProgramS structure

struct {
	unsigned short nClkMdVal;
	unsigned short nHighwaySpeed;
	unsigned short nDrvRevNoMajor;
	unsigned short nDrvRevNoMinor;
	unsigned short nDrvRevNoPr;
	unsigned short nDrvRevNoPversion;
	unsigned short nReserved0;
	unsigned short nReserved1;
	unsigned short nReserved2;
	unsigned short nReserved3;
	unsigned short nReserved4;
	unsigned short nReserved5;
	unsigned short nReserved6;
	unsigned short nReserved7;
} OtxDspSdkIoInStartProgramS;
Data for the OTXDSP_SDK_IO_START_PROGRAM IO Control code
Defined in: DspIoctl.h

Members

nClkMdVal
The PLLMUL, PLLDIV, and PLLCOUNT bits of the Clock Mode Register
nHighwaySpeed
DSP Serial port highway speed in kbps (2048, 4096, or 8192 kpbs)
nDrvRevNoMajor
Driver Revision; Major
nDrvRevNoMinor
Driver Revision; Minor
nDrvRevNoPr
Driver Revision; PR (PR = 0 = Preliminary, PR = 1 = Release, If PR = 1 P-Version is always 0)
nDrvRevNoPversion
Driver Revision; P-Version: (Only valid if PR = 0)
nReserved0
Reserved for future use
nReserved1
Reserved for future use
nReserved2
Reserved for future use
nReserved3
Reserved for future use
nReserved4
Reserved for future use
nReserved5
Reserved for future use
nReserved6
Reserved for future use
nReserved7
Reserved for future use

OtxDspSdkIoOutResultS structure

struct {
	unsigned short nResult;
} OtxDspSdkIoOutResultS;
Standard return code struct
Defined in: DspIoctl.h

Members

nResult
DSP Application return code

OtxDspTimeStamp

Struct used for passing a 64 bit timestamp for each HPI Event
Defined in: Dsp55Def.h