API Reference Guide for the OTX DSP C54x SDK
Odin TeleSystems Inc.
Doc. No. 1211-1-SDA-1007-1
Doc. Rev. 2.0.1.0
Doc. Date 11/05/04
Copyright \'a9 1999-2004 Odin TeleSystems Inc., All Rights Reserved
API Function Reference
DSP SDK Functions (Dsp54Api.h)
Macro, Constant and Type Reference
DSP SDK Constants, Macros, and Types (Dsp54Def.h)
Communication protocol between Host and Dsp (DspIoctl.h)
Constants, Macros, and Types (DspIoctl.h)
Host-Dsp Communication addresses (Dsp54Ioctl.h)
Header File Reference
Dsp54Api.h
Dsp54Def.h
DspIoctl.h
Dsp54Ioctl.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
*/ /*
DSP C54x SDK Macro, Constant, and Type Reference
DSP C54x SDK Functions available for custom DSP Applications
Dsp54Api Function Reference
Function index
\\*--------------------------------------------------------------------------
Dsp54Api
Filename: Dsp54Api.h
Description
DSP C54x SDK API Function Prototypes
Dsp54Def
Filename: Dsp54Def.h
Description
Constants, Macros, and Types for the DSP C54x SDK
Dsp54Ioctl.h
Filename: Dsp54Ioctl.h
Description
Macros and structs for sharing data between a C54x DSP
and the host. The following DSPs are supported by this header file: C548/C549, C54CST,
C5410A, C54V90, C5416. The destinction between each DSP is via CHIP_XXXX
or similar macros.
DspIoctl.h
Filename: DspIoctl.h
Description
Macros and structs for sharing data between the DSP and the host.
(for all C5000 DSPs)
OtxDspAlawCompress
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: Dsp54Api.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: Dsp54Api.h
Parameters
- void
- No parameters
OtxDspCommandComplete
void OtxDspCommandComplete(unsigned short hHandle)
Completes an IO Control call from the host. No data is passed back
to the host.
Defined in: Dsp54Api.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: Dsp54Api.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: Dsp54Api.h
Parameters
- hHandle
- Handle to the user defined logical device
- nResult
- Result code to be passed to the host driver
OtxDspCriticalSectionBegin
short OtxDspCriticalSectionBegin( void)
Begin a critical section.
Disables global interrupts (by setting INTM) and returns the value of
INTM (before INTM was set)
Defined in: Dsp54Api.h
Parameters
- void
- No parameters
See Also
OtxDspCriticalSectionEnd
OtxDspCriticalSectionEnd
void OtxDspCriticalSectionEnd(short intmVal)
End a critical section.
Enable global interrupts (if they were enabled when OtxDspCriticalSectionBegin
was called).
Defined in: Dsp54Api.h
Parameters
- intmVal
- INTM value returned by OtxDspCriticalSectionBegin
See Also
OtxDspCriticalSectionBegin
OtxDspInit
void OtxDspInit( void)
Run Standard OTX DSP SDK API Initializations. Calls
OtxDspInitProcessor,
OtxDspInitGlobalData,
OtxDspInitInterrupts,
OtxDspInitHostPortInterface,
OtxDspInitHostPortInterface, and
OtxDspInitBufferedSerialPorts.
Defined in: Dsp54Api.h
Parameters
- void
- No parameters
OtxDspInitBufferedSerialPorts
void OtxDspInitBufferedSerialPorts( void)
Initialize the Buffered Serial Ports (BSP or McBSP). Called by OtxDspInit.
Defined in: Dsp54Api.h
Parameters
- void
- No parameters
OtxDspInitGlobalData
void OtxDspInitGlobalData( void)
Initialize Standard Global Data. Called by OtxDspInit.
Defined in: Dsp54Api.h
Parameters
- void
- No parameters
OtxDspInitHostPortInterface
void OtxDspInitHostPortInterface( void)
Initialize the Host Port Interface. Called by OtxDspInit.
Defined in: Dsp54Api.h
Parameters
- void
- No parameters
OtxDspInitInterrupts
void OtxDspInitInterrupts(unsigned short valueIMR)
Initialize and unmask specified interrupts. Called by OtxDspInit.
Defined in: Dsp54Api.h
Parameters
- valueIMR
- Interrupts to be unmasked
OtxDspInitProcessor
void OtxDspInitProcessor( void)
Sets up the processor to the desired operating mode. Called by
OtxDspInit.
Defined in: Dsp54Api.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: Dsp54Api.h
Parameters
- void
- No parameters
OtxDspLawExpand
short OtxDspLawExpand(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: Dsp54Api.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.
OtxDspLawInit
short OtxDspLawInit(void)
Initializes the G.711 u-law and a-law functions.
Defined in: Dsp54Api.h
OtxDspResetBufferedSerialPorts
void OtxDspResetBufferedSerialPorts( void)
Reset the Buffered Serial Ports (BSP or McBSP).
Defined in: Dsp54Api.h
Parameters
- void
- No parameters
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: Dsp54Api.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: Dsp54Api.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: Dsp54Api.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: Dsp54Api.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: Dsp54Api.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: Dsp54Api.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: Dsp54Api.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: Dsp54Api.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: Dsp54Api.h
Parameters
- pSin
- returned inforamtion from host
See Also
OtxDspSdkIoInStartProgramS
OtxDspUlawCompress
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: Dsp54Api.h
Parameters
- lawCompInput
- 14 bit 2-s complement value to be companded
Comments
Value bits (0-6) are inverted
C54X_ARR_REG
ABU Address Receive Register
Defined in: Dsp54Def.h
C54X_AXR_REG
ABU Address Transmit Register
Defined in: Dsp54Def.h
C54X_BDRR_REG
Buffered Serial Port (BSP) Data Receive Register
Defined in: Dsp54Def.h
C54X_BDXR_REG
Buffered Serial Port (BSP) Data Transmit Register
Defined in: Dsp54Def.h
C54X_BKR_REG
ABU Receive Buffer Size Register
Defined in: Dsp54Def.h
C54X_BKX_REG
ABU Transmit Buffer Size Register
Defined in: Dsp54Def.h
C54X_CLKM_REG
Clock Mode Register
Defined in: Dsp54Def.h
C54X_CLR_INT_MASK_BIT
Macro for globally enable interrupts.
Defined in: Dsp54Def.h
C54X_CLR_XF_BIT
Macro for clearing the XF bit. Connected to the heart-beat LED
Defined in: Dsp54Def.h
C54X_HPIC_REG
HPI Control Register
Defined in: Dsp54Def.h
C54X_IFR_BRINT
Interrupt Flag Register, Flag for Buffered Serial Port Receive Interrupt
Defined in: Dsp54Def.h
C54X_IFR_BXINT
Interrupt Flag Register, Flag for Buffered Serial Port Transmit Interrupt
Defined in: Dsp54Def.h
C54X_IFR_HPIINT
Interrupt Flag Register, Host Port Interrupt Flag
Defined in: Dsp54Def.h
C54X_IFR_INT0
Interrupt Flag Register, Flag for External Interrupt 0
Defined in: Dsp54Def.h
C54X_IFR_INT1
Interrupt Flag Register, Flag for External Interrupt 1
Defined in: Dsp54Def.h
C54X_IFR_INT2
Interrupt Flag Register, Flag for External Interrupt 2
Defined in: Dsp54Def.h
C54X_IFR_INT3
Interrupt Flag Register, Flag for External Interrupt 3
Defined in: Dsp54Def.h
C54X_IFR_REG
Interrupt Flag Register
Defined in: Dsp54Def.h
C54X_IFR_TINT
Interrupt Flag Register, Flag for Timer Interrupt
Defined in: Dsp54Def.h
C54X_IFR_TRINT
Interrupt Flag Register, Flag for Serial Port Receive Interrupt
Defined in: Dsp54Def.h
C54X_IFR_TXINT
Interrupt Flag Register, Flag for Serial Port Transmit Interrupt
Defined in: Dsp54Def.h
C54X_IMR_REG
Interrupt Mask Register
Defined in: Dsp54Def.h
C54X_NOP
Macro for No-operation
Defined in: Dsp54Def.h
C54X_PMST_REG
Processor Mode Status Register
Defined in: Dsp54Def.h
C54X_PRD_REG
Timer Period Register
Defined in: Dsp54Def.h
C54X_SET_INT_MASK_BIT
Macro for globally disable interrupts.
Defined in: Dsp54Def.h
C54X_SET_XF_BIT
Macro for setting the XF bit. Connected to the heart-beat LED
Defined in: Dsp54Def.h
C54X_SPC0_REG
Serial Port Control Register 0
Defined in: Dsp54Def.h
C54X_SPC1_REG
Serial Port Control Register 1
Defined in: Dsp54Def.h
C54X_ST0_REG
Status Register 0
Defined in: Dsp54Def.h
C54X_ST1_FRCT
Bit in Status Register 1 (ST1) that determines whether or not the
Defined in: Dsp54Def.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
C54X_ST1_REG
Status Register 1
Defined in: Dsp54Def.h
C54X_SWWSR_REG
Software Wait State Register
Defined in: Dsp54Def.h
C54X_TCR_REG
Timer Control Register
Defined in: Dsp54Def.h
C54X_TDXV_REG
TDM Data Transmit Register
Defined in: Dsp54Def.h
C54X_TRCV_REG
TDM Data Receive Register
Defined in: Dsp54Def.h
C54X_WAIT_FOR_INT
Macro for entering idle state until an interrupt occurs.
Defined in: Dsp54Def.h
IN
Just used to specify direction of a function parameter
Defined in: Dsp54Def.h
OTXDSP_ALAW
A-Law Companding
Defined in: Dsp54Def.h
OTXDSP_BSP_RXBUF_ADDR
The starting address of the Receive buffer
Defined in: Dsp54Def.h
OTXDSP_BSP_RXBUF_SIZE
The size of the Receive buffer for the highest
Defined in: Dsp54Def.h
OTXDSP_BSP_TXBUF_ADDR
The starting address of the Transmit buffer
Defined in: Dsp54Def.h
OTXDSP_BSP_TXBUF_SIZE
The size of the Transmit buffer for the highest
Defined in: Dsp54Def.h
OTXDSP_FALSE
Boolean value TRUE
Defined in: Dsp54Def.h
OTXDSP_HWY_SPEED_2M
Highway speed 2048 kpbs is supported for this DSP program.
Defined in: Dsp54Def.h
OTXDSP_HWY_SPEED_4M
Highway speed 4096 kpbs is supported for this DSP program.
Defined in: Dsp54Def.h
OTXDSP_HWY_SPEED_8M
Highway speed 8192 kpbs is supported for this DSP program.
Defined in: Dsp54Def.h
OTXDSP_HWY_SPEEDS
Supported highway speeds for this DSP program.
Defined in: Dsp54Def.h
OTXDSP_INVALID_HANDLE
Invalid Logical Device Handle Value
Defined in: Dsp54Def.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: Dsp54Def.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: Dsp54Ioctl.h
OTXDSP_SDK_EVENT_BUF_INCLUDE_HANDLE
Define to one (1) if the DSP code delivers the logical device handle back to the host in the notify event
Defined in: Dsp54Ioctl.h
OTXDSP_SDK_EVENT_BUF_INCLUDE_TASKREF
Define to one (1) if the DSP code delivers the task reference back to the host in the notify event
Defined in: Dsp54Ioctl.h
OTXDSP_SDK_EVENT_BUF_INCLUDE_TIMESTAMP
Define to one (1) if the DSP code delivers a DSP generated timestamp back to the host in the notify event
Defined in: Dsp54Ioctl.h
OTXDSP_SDK_EVENT_BUF_LEN
Length of the Circular buffer (in words)
Defined in: Dsp54Ioctl.h
OTXDSP_SDK_EVENT_BUF_PROCESSING_ADDR
The host writes the current processing address to this location
Defined in: Dsp54Ioctl.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_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
Address to the Io Control Code word
Defined in: Dsp54Ioctl.h
OTXDSP_SDK_IOCTL_DATA_ADDR
Address to the start of data
Defined in: Dsp54Ioctl.h
OTXDSP_SDK_IOCTL_DATA_MAX_SIZE
Maximum size of Ioctl data words
Defined in: Dsp54Ioctl.h
OTXDSP_SDK_IOCTL_HANDLE_ADDR
Address to the handle of the Logical device (nEventSourceId parameter of OtxDrvCreateLogicalDevice)
Defined in: Dsp54Ioctl.h
OTXDSP_SDK_IOCTL_TASKREF_ADDR
Address to the Task Reference value
Defined in: Dsp54Ioctl.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: Dsp54Ioctl.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: Dsp54Ioctl.h
OTXDSP_TRUE
Boolean value TRUE
Defined in: Dsp54Def.h
OTXDSP_ULAW
U-Law Companding
Defined in: Dsp54Def.h
OtxDspHpiDiag
Struct for diagnostics of the HPI Event buffer (events passed from the DSP to the host)
Defined in: Dsp54Def.h
OtxDspIsrCallbackFnP
Callback function pointer for the ISRs defined in Otx54Api.c
Defined in: Dsp54Def.h
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: Dsp54Def.h
OUT
Just used to specify direction of a function parameter
Defined in: Dsp54Def.h