Freescale Semiconductor, Inc... Freescale Semiconductor, Inc. Embedded SDK (Software Development Kit) Caller ID Detection Library SDK112/D Rev. 2, 07/16/2002 (c) Motorola, Inc., 2002. All rights reserved. For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc... Freescale Semiconductor, Inc. For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. Contents Freescale Semiconductor, Inc... About This Document Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix Suggested Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x Definitions, Acronyms, and Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Chapter 1 Introduction 1.1 Quick Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 1.2 Overview of Caller ID Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 1.2.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 1.2.2 Features and Performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2 Chapter 2 Directory Structure 2.1 2.2 Required Core Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 Optional (Domain-Specific) Directories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-2 Chapter 3 Caller ID Detection Library Interfaces 3.1 3.2 3.3 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 Caller ID Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5 CallerIDCreate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6 callerIDInit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9 callerIDRX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12 callerIDControl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14 callerIDDestroy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15 Chapter 4 Building the Caller ID Library 4.1 4.2 Dependency Build. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 Direct Build. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 MOTOROLA Table of Contents For More Information On This Product, Go to: www.freescale.com i Freescale Semiconductor, Inc. Chapter 5 Linking Applications with the Caller ID Detection Library 5.1 5.1.1 Caller ID Detection Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1 Library Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1 Chapter 6 Caller ID Applications 6.1 Test and Demo Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1 Freescale Semiconductor, Inc... Chapter 7 License 7.1 ii Limited Use License Agreement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1 Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. List of Tables CallerIDCreate Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6 callerIDInit Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9 callerIDRX Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12 callerIDControl Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14 callerIDDestroy Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15 Freescale Semiconductor, Inc... Table 3-1 Table 3-2 Table 3-3 Table 3-4 Table 3-5 MOTOROLA List of Tables For More Information On This Product, Go to: www.freescale.com iii Freescale Semiconductor, Inc... Freescale Semiconductor, Inc. iv Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. List of Figures Core Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DSP56824 Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . caller_id Directory Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Automatic Dependency on caller_id.mcp Project . . . . . . . . . . . . . . . . . . . . . . . caller_id.mcp Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Execute Make . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 2-2 2-2 4-1 4-2 4-2 Freescale Semiconductor, Inc... Figure 2-1 Figure 2-2 Figure 2-3 Figure 4-1 Figure 4-2 Figure 4-3 MOTOROLA List of Figures For More Information On This Product, Go to: www.freescale.com v Freescale Semiconductor, Inc... Freescale Semiconductor, Inc. vi Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... List of Examples Code Example Code Example Code Example Code Example Code Example Code Example Code Example Code Example MOTOROLA 3-1 3-2 3-3 3-4 3-5 3-6 3-7 5-1 C Header File CallerID.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 mem Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6 Use of callerIDCreate Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7 Sample Callback Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10 Use of callerIDInit Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11 Use of callerIDRX Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12 Use of callerIDDestroy Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15 linker.cmd File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1 List of Examples For More Information On This Product, Go to: www.freescale.com vii Freescale Semiconductor, Inc... Freescale Semiconductor, Inc. viii Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. About This Document This manual describes the Caller ID Detection algorithm for use with the Embedded Software Development Kit, (SDK). Freescale Semiconductor, Inc... Audience This document targets software developers implementing Caller ID Detection within software applications. Organization This manual is arranged in the following sections: * Chapter 1, Introduction --provides a brief overview of this document * Chapter 2, Directory Structure --provides a description of the required core directories * Chapter 3, Caller ID Detection Library Interfaces --describes all of the Caller ID Detection Library functions * Chapter 4, Building the Caller ID Library --tells how to execute the system library project build * Chapter 5, Linking Applications with the Caller ID Detection Library --describes organization of the Caller ID Detection Library * Chapter 6, Caller ID Applications --describes the use of Caller ID library through test/demo applications * Chapter 7, License --provides the license required to use this product Suggested Reading We recommend that you have a copy of the following references: * DSP56800 Family Manual, DSP56800FM/AD * DSP56824 User's Manual, DSP56824UM/AD * Inside CodeWarrior: Core Tools, Metrowerks Corp. MOTOROLA Preface For More Information On This Product, Go to: www.freescale.com ix Freescale Semiconductor, Inc. Conventions This document uses the following notational conventions: Freescale Semiconductor, Inc... Typeface, Symbol or Term Meaning Examples Courier Monospaced Type Commands, command parameters, code examples, expressions, datatypes, and directives ...*Foundational include files... Italic Calls, functions, statements, procedures, routines, arguments, file names and applications ...the pConfig argument... Reference sources, paths, emphasis ...refer to the Targeting DSP56824 Platform manual.... Bold ...a data structure of type vad_tConfigure... ...defined in the C header file, aec.h... ...makes a call to the Callback procedure... ... see: C:\Program Files\Motorola\Embedded SDK\help\tutorials Bold/Italic Directory name, project name ...and contains these core directories: applications contains applications software.... ...CodeWarrior project, 3des.mcp, is..... Blue Text Linkable on-line ...refer to Chapter 7, License... Number Any number is considered a positive value, unless preceded by a minus symbol to signify a negative value 3V ALL CAPITAL LETTERS Variables, directives, defined constants, files libraries INCLUDE_DSPFUNC Brackets [...] Function keys ...by pressing function key [F7]... Quotation marks "... " Returned messages ...the message, "Test Passed" is displayed.... -10 DES-1 #define INCLUDE_STACK_CHECK ...if unsuccessful for any reason, it will return "NULL".... Definitions, Acronyms, and Abbreviations The following list defines the acronyms and abbreviations used in this document. As this template develops, this list will be generated from the document. As we develop more group resources, these acronyms will be easily defined from a common acronym dictionary. Please note that while the acronyms are in solid caps, terms in the definition should be initial capped ONLY IF they are trademarked names or proper nouns. CAS Customer Premises Equipment (CPE) Alerting Signal CID Caller ID CPE Customer Premises Equipment DSP Digital Signal Processor or Digital Signal Processing DTMF Dual Tone Multiple Frequency x Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc... Freescale Semiconductor, Inc. FFT Fast Fourier Transforms FIR Finite Impulse Response I/O Input/Output IDE Integrated Development Environment IIR Infinite Impulse Response LSB Least Significant Bit MAC Multiply/Accumulate MIPS Million Instructions Per Second MSB Most Significant Bit OnCETM On-Chip Emulation OMR Operating Mode Register PC Program Counter SAS Subscriber Alerting Signal SDK Software Development Kit SP Stack Pointer SPI Serial Peripheral Interface SR Status Register SRC Source References The following sources were used to produce this book: 1. DSP56800 Family Manual, DSP56800FM/AD 2. DSP56824 User's Manual, DSP56824UM/AD 3. Embedded SDK Programmer's Guide 4. Caller ID Standard GR-CORE-30 MOTOROLA Preface For More Information On This Product, Go to: www.freescale.com xi Freescale Semiconductor, Inc... Freescale Semiconductor, Inc. xii Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... Chapter 1 Introduction Welcome to Motorola's Family of Digital Signal Processors, (DSPs). This document describes the Caller ID Detection Library, which is a part of Motorola's comprehensive Software Development Kit (SDK) for its DSPs. In this document, you will find all the information required to use and maintain the Caller ID Detection Library interface and algorithms. Motorola provides these algorithms to you for use on the Motorola Digital Signal Processors to expedite your application development and reduce the time it takes to bring your own products to market. Motorola's Caller ID Detection Library is licensed for your use at no charge on Motorola processors. Please refer to the standard Software License Agreement in Chapter 7 for license terms and conditions; please consult with your Motorola representative for premium product licensing. 1.1 Quick Start Motorola's Embedded SDK is targeted to a large variety of hardware platforms. To take full advantage of a particular hardware platform, use Quick Start from the Targeting DSP568xx Platform documentation. For example, the Targeting DSP56824 Platform manual provides more specific information and examples about this hardware architecture. If you are developing an application for the DSP56824EVM board or any other DSP56824 development system, refer to the Targeting DSP56824 Platform manual for Quick Start or other DSP56824-specific information. 1.2 Overview of Caller ID Detection The standard, GR-CORE-30, is a Bellcore standard to receive the on-hook/off-hook data transmission of Caller ID information. This document describes Caller ID data detection only. Such associated functionalities as ring detection when ONHOOK and SAS / CAS tone detection when OFFHOOK are not part of this library. 1.2.1 Background On-hook: On-hook Caller ID is data transmission associated with power ringing. Caller ID data transmission occurs during the long silent interval between the first and second power ringing patterns. Data transmission will not begin until a silent interval of at least 500ms has elapsed after the first power ringing pattern ends. Power ring detection is not a part of this library, so the user's application must include an external mechanism to detect the power ring. Once power ring is detected, Caller ID relay provides an offhook connection. The user must provide the Caller ID relay. MOTOROLA Introduction For More Information On This Product, Go to: www.freescale.com 1-1 Introduction Freescale Semiconductor, Inc. Off-hook: Off-hook Caller ID is data transmission associated with the off-hook condition. When off-hook, the telephone exchange sends the Subscriber Alerting Signal (SAS) and Customer Premises Equipment Alerting Signals (CAS) signals. Although the user need not detect the SAS signal, the CAS signal must be detected in the presence of speech. After detecting the CAS signal, the Dual Tone Multiple Frequency (DTMF)-D tone must be sent to the telephone exchange as a part of acknowledgement. Neither detection of CAS nor generation of DTMF-D tone are a part of Caller ID library; however, these libraries are a part of the SDK and may be used to detect CAS and to generate DTMF-D. After detecting the DTMF-D tone sent by the Customer Premises Equipment (CPE), the telephone exchange sends the Caller ID data. Once the DTMF-D tone has been sent, the user can call the CallerIDInit () function. The codec must be configured by the user to sample the telephone channel data at 8KHz. When data is available from the codec, the user can call the CallerIDRX () function. Freescale Semiconductor, Inc... 1.2.2 Features and Performance The Caller ID library is multichannel and re-entrant. For details on memory and MIPS for a particular DSP, refer to the Libraries chapter of the appropriate Targeting manual. 1-2 Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... Chapter 2 Directory Structure 2.1 Required Core Directories Figure 2-1 details required platform directories: Figure 2-1. Core Directories As shown in Figure 2-1, DSP56824EVM has no operating system (nos) support. This platform contains these core directories: * applications contains applications software that can be exercised on this platform * bsp contains board support package specific for this platform * config contains default HW/SW configurations for this platform * include contains SDK header files which define the Application Programming Interface * sys contains required system components * tools contains utilities used by system components There are also optional directories that include domain-specific libraries. MOTOROLA Directory Structure For More Information On This Product, Go to: www.freescale.com 2-1 Directory Structure Freescale Semiconductor, Inc. 2.2 Optional (Domain-Specific) Directories Freescale Semiconductor, Inc... Figure 2-2 demonstrates how the Caller ID Detection algorithm is encapsulated in the domain-specific directory telephony. Figure 2-2. DSP56824 Directories The caller_id directory includes algorithms specific to Caller ID; the directory structure is shown in Figure 2-3. Figure 2-3. caller_id Directory Structure The caller_id directory includes the following sub-directories: * API Sources - includes APIs for Caller ID Detection * asm Sources - includes all asm sources * test - includes C source files and configuration necessary for testing caller ID library modules -- c_sources - contains an example test code for Caller ID Detection -- Config - contains configuration files appconfig.c, appconfig.h and linker.cmd specific to Caller ID Detection. 2-2 Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... Chapter 3 Caller ID Detection Library Interfaces 3.1 Caller ID Services The Caller ID Detection library receives the on-hook/off-hook data transmission of the Caller ID information. 3.2 Interface The C interface for the Caller ID Detection library services is defined in the C header file CallerID.h, shown in Code Example 3-1 as a reference. SDK defines the Caller ID Detection library: Caller ID Detection Library (CallerID.lib) The interfaces and services provided are described in this chapter. Code Example 3-1. C Header File CallerID.h #ifndef __CallerID_H #define __CallerID_H /*************************** Foundational Include Files ****************************/ #include "port.h" /************************************************* #define for CallerID receiver configuration flags **************************************************/ #define #define CALLERID_ONHOOK CALLERID_OFFHOOK 0x0000 0x0001 /* Status in the Callback procedure has the following bits */ MOTOROLA Caller ID Detection Library Interfaces For More Information On This Product, Go to: www.freescale.com 3-1 Freescale Semiconductor, Inc. Caller ID Detection Library Interfaces Freescale Semiconductor, Inc... #define #define #define #define #define #define #define #define CALLERID_DATA_READY CALLERID_TIMEOUT CALLERID_ERROR CALLERID_NO_TRANSMIT CALLERID_CHECKSUM_ERROR CALLERID_CSS_ERROR CALLERID_MARK_ERROR CALLERID_LENGTH_ERROR 0x0001 0x0002 0x0004 0x0008 0x0010 0x0020 0x0040 0x0080 /******************************************** Commands for callerIDControl. Currently callerIDControl () returns PASS and does not perform any action. The following #defines are only for the future use and to be used as arguments when calling callerIDControl (). *********************************************/ #define CALLERID_ACTIVATE #define CALLERID_DEACTIVATE #define CALLERID_STATUS 1 2 3 /* Returns CallerID Status */ /******************************************** CallerID callback routine structure *********************************************/ /* The status in the Callback routine below has 2 categories 1. CALLERID_DATA_READY 2. CALLERID_ERROR If the status is CALLERID_ERROR, the bit positions in the status represent the type of the error occured. For example if there is CSS_ERROR (refer to the status bits defined above), the CALLERID_CSS_ERROR and the CALLERID_ERROR bits are set in the status. */ typedef struct { void void } callerID_sCallback; (*pCallback) ( void * pCallbackArg, UWord16 Status, UWord16 * pChar, UWord16 Numchars ); * pCallbackArg; /************************************************* Structure for CallerID receiver Configuration **************************************************/ typedef struct 3-2 Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Interface { UWord16 callerID_sCallback } callerID_sConfigure; Flags; callerIDCallback; Freescale Semiconductor, Inc... /**************************************************** Structure for CallerID context information. This structure should not be altered by the user ****************************************************/ typedef struct { Word16 *contextbuff; UWord16 length; callerID_sCallback *pCallBck; Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 CID_SMPL_GRID[3]; CID_PREV_ENER[21]; CID_PREV_EXTREME[4]; CID_OFST_9OR10; CID_LMT_9OR10; CID_CAR_SUM1; CID_CAR_SUM2; CID_FRAME_CNT; CID_DATA_BYTE; CID_CSS_CNT; CID_CSS_ERR_CNT; CID_MARK_CNT; CID_DC_FRM_CNT; CID_CODEC_IGAIN; CID_MARK_ERR_CNT; CID_BITS_REG; CID_BITS_CNT; CID_CRC_WORD; CID_FRM_LEN; CID_BYTE_CNT; CID_FRM_STG; CID_ZERO_CROSS; CID_AMP_FRM_CNT; CID_SILEN_THRES; Word16 Word16 Word16 Word16 CID_DC_SUM2; CID_DC_SUM1; CID_DC_SUM0; CID_DC_VAL; Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 *CID_SIN1_DLY_BUFF_PTR; CID_SIN1_DLY_PTR; CID_COS1_DLY_PTR; *CID_COS1_DLY_BUFF_PTR; CID_SIN0_DLY_PTR; CID_COS0_DLY_PTR; *CID_SIN0_DLY_BUFF_PTR; CID_SMPL_OUT_PTR; MOTOROLA Caller ID Detection Library Interfaces For More Information On This Product, Go to: www.freescale.com 3-3 Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... Caller ID Detection Library Interfaces Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 Word16 *CID_COS0_DLY_BUFF_PTR; CID_AVER_PTR; *CID_AVER_BUFF_PTR; CID_ENER_BUFF_PTR; CID_DATA_BUFF_CNT; CID_STATE; CID_STATUS; CID_samplecounter; CID_samplebuffer[20]; CID_sampleptr; Word16 Word16 Word16 Word16 UWord16 Word16 Word16 UWord16 UWord16 CID_DATA_BUFF_PTR; CID_DATA_TMP_PTR; CID_TIMER_CNT; CID_WAIT_TMR; CID_DATA_BUFF[258]; CID_DATA_OUT_PTR; status; NumberSamples; numchars; } callerID_sHandle; /*************************** Function Prototypes ****************************/ EXPORT callerID_sHandle *callerIDCreate (callerID_sConfigure *); EXPORT Result callerIDInit (callerID_sHandle *, callerID_sConfigure*); EXPORT Result callerIDRX (callerID_sHandle *, Word16 UWord16); *, EXPORT void callerIDdetDestroy (callerID_sHandle * ); EXPORT Result callerIDControl (UWord16 Command); #endif 3-4 Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Specifications 3.3 Specifications The following pages describe the Caller ID Detection library functions. Function arguments for each routine are described as in, out, or inout. An in argument means that the parameter value is an input only to the function. An out argument means that the parameter value is an output only from the function. An inout argument means that a parameter value is an input to the function, but the same parameter is also an output from the function. Freescale Semiconductor, Inc... Typically, inout parameters are input pointer variables in which the caller passes the address of a preallocated data structure to a function. The function stores its results within that data structure. The actual value of the inout pointer parameter is not changed. MOTOROLA Caller ID Detection Library Interfaces For More Information On This Product, Go to: www.freescale.com 3-5 Freescale Semiconductor, Inc. Caller ID Detection Library Interfaces 3.3.1 CallerIDCreate Call(s): callerID_sHandle *callerIDCreate (callerID_sConfigure *pConfig); Required Header: "CallerID.h" Arguments: Table 3-1. CallerIDCreate Arguments pConfig in Points to the configuration data for Caller ID Freescale Semiconductor, Inc... Description: The CallerIDCreate function creates an instance of Caller ID detection. 393 words are allocated per instance. The library allocates memory dynamically using the mem library routines shown in Code Example 3-3. The library is multichannel and re-entrant. The pConfig argument points to the callerID_sConfigure structure used to configure Caller ID Detection operation. Code Example 3-2. mem Library callerID_sHandle *callerIDCreate (callerID_sConfigure *pConfig) { Result result = PASS; bool flag = true; callerID_sHandle * pcallerIDdet; pcallerIDdet = (callerID_sHandle *) memMallocEM (sizeof (callerID_sHandle)); if (pcallerIDdet == NULL) return (NULL); pcallerIDdet->contextbuff = (Word16 *) memMallocEM (sizeof (Word16) * 2); if (pcallerIDdet->contextbuff == NULL) flag = false; pcallerIDdet->pCallBck = (callerID_sCallback *) memMallocEM (sizeof (callerID_sCallback)); if (pcallerIDdet->pCallBck == NULL) flag = false; pcallerIDdet->CID_SIN0_DLY_BUFF_PTR = (Word16 *) memMallocAlignedEM ( 6 * sizeof(Word16)); if (pcallerIDdet->CID_SIN0_DLY_BUFF_PTR == NULL) flag = false; flag &= memIsAligned (pcallerIDdet->CID_SIN0_DLY_BUFF_PTR, 6 * sizeof(Word16)); pcallerIDdet->CID_SIN1_DLY_BUFF_PTR = (Word16 *) memMallocAlignedEM ( 6 * sizeof(Word16)); if (pcallerIDdet->CID_SIN1_DLY_BUFF_PTR == NULL) flag = false; flag &= memIsAligned (pcallerIDdet->CID_SIN1_DLY_BUFF_PTR, 6 * sizeof(Word16)); pcallerIDdet->CID_COS0_DLY_BUFF_PTR = (Word16 *) memMallocAlignedEM ( 6 * sizeof(Word16)); if (pcallerIDdet->CID_COS0_DLY_BUFF_PTR == NULL) flag = false; flag &= memIsAligned (pcallerIDdet->CID_COS0_DLY_BUFF_PTR, 6 * sizeof(Word16)); pcallerIDdet->CID_COS1_DLY_BUFF_PTR = (Word16 *) memMallocAlignedEM ( 6 * sizeof(Word16)); 3-6 Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Specifications if (pcallerIDdet->CID_COS1_DLY_BUFF_PTR == NULL) flag = false; flag &= memIsAligned (pcallerIDdet->CID_COS1_DLY_BUFF_PTR, 6 * sizeof(Word16)); pcallerIDdet->CID_AVER_BUFF_PTR = (Word16 *) memMallocAlignedEM ( 6 * sizeof(Word16)); if (pcallerIDdet->CID_AVER_BUFF_PTR == NULL) flag = false; Freescale Semiconductor, Inc... flag &= memIsAligned (pcallerIDdet->CID_AVER_BUFF_PTR, 6 * sizeof(Word16)); if (flag == false) { callerIDdetDestroy (pcallerIDdet); return (NULL); } else { result = callerIDInit (pcallerIDdet, pConfig); return (pcallerIDdet); } } For details on the callerID_sHandle structure, refer to Code Example 3-1. The pConfig argument above points to the callerID_sConfigure structure used to configure Caller ID operation; see Code Example 3-3. If a callerIDCreate function is called to create an instance, then callerIDDestroy (Section 3.3.5) should be used to destroy the instance. Alternatively, the user can allocate memory statically which requires duplicating all statements in the callerIDCreate function. In this case, the user can call the callerIDInit function directly, bypassing the callerIDCreate function. If the user dynamically allocates memory without calling callerIDCreate, then the user himself must destroy the memory allocated. Returns: Upon successful completion, this function returns a pointer to a structure of type callerID_sHandle; otherwise, "NULL" is returned. Special Considerations: * The Caller ID application is multichannel and re-entrant. * If callerIDCreate is called, then the user need not call callerIDInit function as it is called internally in the callerIDCreate function. Code Example 3-3. Use of callerIDCreate Interface #include "CallerID.h" #include "mem.h" { callerID_sConfigure *pConfig; /* Initialize pConfig structure for ON-HOOK. This needs to be done after 500 ms of silent interval after the end of first power ring */ /* Allocate memory for the init structure */ pConfig = memMallocEM( sizeof(callerID_sConfigure)); MOTOROLA Caller ID Detection Library Interfaces For More Information On This Product, Go to: www.freescale.com 3-7 Freescale Semiconductor, Inc. Caller ID Detection Library Interfaces pConfig->Flags = CALLERID_OFFHOOK; pConfig ->callerIDCallback.pCallback = CallerIDRXCallback; /* Refer to CallerIDInit () described above [3.3.2] for an example CallerIDRXCallback function */ /* Create and initialize all the variables of CallerID library */ callerIDCreate (pConfig); ... Freescale Semiconductor, Inc... } 3-8 Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Specifications 3.3.2 callerIDInit Call(s): Result callerIDInit (callerID_sHandle *pCallerID, callerID_sConfigure *pConfig); Required Header: "CallerID.h" Arguments: Freescale Semiconductor, Inc... Table 3-2. callerIDInit Arguments pCallerID in A pointer to an instance of Caller ID detection, created by a call to the callerIDCreate function pConfig in A pointer to a data structure containing data for initializing the Caller ID algorithm Description: The callerIDInit function will initialize the Caller ID Detection algorithm. During the initialization, all resources will be set to their initial values in preparation for Caller ID Detection operation. The Caller ID instance (pCallerID) can be created either by calling the callerIDCreate function (see Section 3.3.1), or by statically allocating memory, which does not require calling the callerIDCreate function. The parameter pConfig points to a data structure of type callerID_sConfigure; its fields initialize caller ID operation in the following manner: Flags - A set of configuration options for Caller ID Detection. Flags options include: CALLERID_ONHOOK CALLERID_OFFHOOK Callback - A structure of type callerID_sCallback; it describes the procedure which caller ID will call once the data bytes are processed by the algorithm. The callback procedure has the following declaration: void (*pCallback) (void *pCallbackArg,char *pChars,UWord16 Status, UWord16 NumChars); The callback procedure parameter, pCallbackArg, is supplied by the user in the callerID_sCallback structure; this value is passed back to the user during the call to the Callback procedure. Typically, pCallbackArg points to context information used by the callback procedure which must be written by the user. pChars - This is a pointer to the character buffer containing the Caller ID data. For message format, refer to Caller ID Standard GR-CORE-30. Status - The status in the Callback routine has 2 categories CALLERID_DATA_READY CALLERID_ERROR If the status is CALLERID_ERROR, the bit positions in the status, shown below, indicate the type of the error which occured: #define #define #define #define #define #define CALLERID_TIMEOUT 0x0002 CALLERID_NO_TRANSMIT 0x0008 CALLERID_CHECKSUM_ERROR 0x0010 CALLERID_CSS_ERROR 0x0020 CALLERID_MARK_ERROR 0x0040 CALLERID_LENGTH_ERROR0x0080 If the status is CALLERID_DATA_READY, the data in the buffer pointed to by pChars is a valid message. NumChars - The number of characters in the message buffer pointed to by pChars. The number includes the message type and the message length byte. MOTOROLA Caller ID Detection Library Interfaces For More Information On This Product, Go to: www.freescale.com 3-9 Freescale Semiconductor, Inc. Caller ID Detection Library Interfaces Since the buffer is a memory of 16-bit word, the least significant byte of each word holds the valid data and the most significant byte is invalid. An example callback procedure is shown below for reference. The user must write his/her own callback procedure. This callback procedure checks for the error condition and prints the appropriate error message. If the data received has no error, then it prints the type of caller ID, the length of the message and the message itself. Code Example 3-4. Sample Callback Procedure Freescale Semiconductor, Inc... void CallerIDRXCallback ( void UWord16 UWord16 UWord16 * pCallbackArg, Status, * pChar, Numchars ) { UWord16 length,i; if ( Status == CALLERID_ERROR ) { CallerIDStatus = FAIL; if (Status & CALLERID_CHECKSUM_ERROR = CALLERID_CHECKSUM_ERROR) testComment (&testRec, " Checksum Error"); if (Status & CALLERID_CSS_ERROR == CALLERID_CSS_ERROR) testComment (&testRec, " CSS Error"); if (Status & CALLERID_MARK_ERROR == CALLERID_MARK_ERROR) testComment (&testRec, " Mark Error"); if (Status & CALLERID_LENGTH_ERROR == CALLERID_LENGTH_ERROR) testComment (&testRec, " Length Error"); } if ( Status == CALLERID_DATA_READY ) { if (*pChar++ == 04 ) { printf("Message Type is = ON_HOOK\n"); } else { printf("Message Type is = OFF_HOOK\n"); } length = *pChar++; printf("Length of the caller id is = %02d\n",length); for (i = 0;i < length;i++) printf("%c",*pChar++); } } 3-10 Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Specifications Returns: Upon successful completion, a value of "PASS" will be returned; otherwise, a value of "FAIL" will be returned. Special Considerations: None * If callerIDCreate is called, then the user need not call callerIDInit function as it is called internally in the callerIDCreate function. Code Example 3-5. Use of callerIDInit Interface #include "CallerID.h" void testCallerID (void) Freescale Semiconductor, Inc... { callerID_sConfigure * pConfig; /* Initialize pConfig structure for ON-HOOK. This needs to be done after 500 ms of silent interval after the end of first power ring */ /* Allocate memory for the init structure */ pConfig = memMallocEM( sizeof(callerID_sConfigure)); pConfig->Flags = CALLERID_OFFHOOK; pConfig ->callerIDCallback.pCallback = CallerIDRXCallback; /* Refer to CallerIDInit () described above [3.3.2] for an example CallerIDRXCallback function */ /* Create and Initialize all the variables of CallerID library */ callerIDCreate (pConfig); ... } For details on structures used in the above example, refer to Code Example 3-1 MOTOROLA Caller ID Detection Library Interfaces For More Information On This Product, Go to: www.freescale.com 3-11 Freescale Semiconductor, Inc. Caller ID Detection Library Interfaces 3.3.3 callerIDRX Call(s): Result callerIDRX (callerID_sHandle *pCallerID, Word16 *pSamples, UWord16 NumberSamples); Required Header: "CallerID.h" Arguments: Freescale Semiconductor, Inc... Table 3-3. callerIDRX Arguments pCallerID in A pointer to an instance of Caller ID detection, created by a call to the callerIDCreate function pSamples in Pointer to the input data buffer. Input data buffer contains the 16-bit linear PCM samples from the codec, sampled at 8KHz NumberSamples in Number of samples in the input data buffer Description: The callerIDRX function will process the samples supplied. These are linear 16-bit PCM samples from the codec, sampled at 8KHz. Once the processing is complete, the result is returned to the user by calling the Callback procedure. The user can call the callerIDRX function any number of times, as long as the user has data. The Callback procedure is called when the CallerID data is completely received without any error or if there is any error in the data received. The argument Status in the Callback procedure indicates whether data is received correctly or if there is any error. Refer to Section 3.3.2 for details on the Callback procedure. Once the Status on the Callback procedure is either CALLERID_DATA_READY or CALLERID_ERROR, stop calling the callerIDRX function. Returns: After successfully processing each frame, callerIDRX will return "PASS"; if any error occurred, callerIDRX will return "FAIL". Special Considerations: None Code Example 3-6. Use of callerIDRX Interface #include "CallerID.h" #define NUMBER_SAMPLES_PERCALL 20 void testCallerID (void) { callerID_sConfigure * pConfig; Result res; Int16 samplebuffer[NUMBER_SAMPLES_PERCALL]; /* Initialize pConfig structure for ON-HOOK. This needs to be done after 500 ms of silent interval after the end of first power ring */ /* Allocate memory for the init structure */ pConfig = memMallocEM( sizeof(callerID_sConfigure)); pConfig->Flags = CALLERID_OFFHOOK; pConfig ->callerIDCallback.pCallback = CallerIDRXCallback; /* Refer to CallerIDInit () described above [3.3.2] for an example CallerIDRXCallback function */ 3-12 Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Specifications /* Create and initialize all the variables of CallerID library */ callerIDCreate (pConfig); ... /* Collect NUMBER_SAMPLES_PERCALL number of samples and call callerIDRX () */ res = callerIDRX (sample_buffer, NUMBER_SAMPLES_PERCALL); Freescale Semiconductor, Inc... } MOTOROLA Caller ID Detection Library Interfaces For More Information On This Product, Go to: www.freescale.com 3-13 Freescale Semiconductor, Inc. Caller ID Detection Library Interfaces 3.3.4 callerIDControl Call(s): UWord16 callerIDControl( UWord16 Command); Required Header: "CallerID.h" Arguments: Table 3-4. callerIDControl Arguments Command in Commands to control caller ID detection Description: Currently not supported; this is for future use. Freescale Semiconductor, Inc... Returns: Always returns "PASS". Special Considerations: None Code Example: None 3-14 Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Specifications 3.3.5 callerIDDestroy Call(s): void callerIDDestroy (callerID_sHandle *pCallerID); Required Header: "CallerID.h" Arguments: Table 3-5. callerIDDestroy Arguments pCallerID in A pointer to an instance of Caller ID detection, created by a call to the callerIDCreate function Freescale Semiconductor, Inc... Description: Destroys an instance of Caller ID detection originally created by a call to the callerIDCreate function. Returns: None Special Considerations: None Code Example 3-7. Use of callerIDDestroy Interface #include "CallerID.h" { callerID_sConfigure * pConfig; Result res; Int16 samplebuffer[NUMBER_SAMPLES_PERCALL]; /* Initialize pConfig structure for ON-HOOK. This needs to be done after 500 ms of silent interval after the end of first power ring */ /* Allocate memory for the init structure */ pConfig = memMallocEM( sizeof(callerID_sConfigure)); pConfig->Flags = CALLERID_OFFHOOK; pConfig ->callerIDCallback.pCallback = CallerIDRXCallback; /* Refer to CallerIDInit () described above [3.3.2] for an example CallerIDRXCallback function */ /* Create and initialize all the variables of CallerID library */ callerIDCreate (pConfig); ... /* Collect NUMBER_SAMPLES_PERCALL number of samples and call callerIDRX () */ res = callerIDRX (sample_buffer, NUMBER_SAMPLES_PERCALL); ... callerIDDestroy (pCallerID); } MOTOROLA Caller ID Detection Library Interfaces For More Information On This Product, Go to: www.freescale.com 3-15 Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... Caller ID Detection Library Interfaces 3-16 Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... Chapter 4 Building the Caller ID Library The Caller ID library combines all of the components described in Chapter 3 into one library, CallerID.lib. To build this library, a Metrowerks' CodeWarrior project, caller_id.mcp, is provided. This project and all the necessary components to build the CallerID library are located in the ...\nos\telephony\caller_id directory of the SDK directory structure. There are two methods of executing system library project build: dependency build and direct build. 4.1 Dependency Build Dependency build is the easiest approach and requires no additional work on the user's part. If you add the CallerID library project, caller_id.mcp, to your application project, as shown in Figure 4-1, the Caller ID library will automatically build when the application is built. Figure 4-1. Automatic Dependency on caller_id.mcp Project MOTOROLA Building the Caller ID Library For More Information On This Product, Go to: www.freescale.com 4-1 Freescale Semiconductor, Inc. Building the Caller ID Library 4.2 Direct Build Direct build allows you to build a Caller ID library independently of any other build. Follow these steps: Freescale Semiconductor, Inc... Step 1. Open caller_id.mcp project, as shown in Figure 4-2. Figure 4-2. caller_id.mcp Project Step 2. Execute the build by pressing function key [F7] or by choosing the Make command from the Project menu; see Figure 4-3. Figure 4-3. Execute Make At this point, if the build is successful, the CallerID.lib library file is created in the ..\nos\telephony\caller_id\Debug directory. 4-2 Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... Chapter 5 Linking Applications with the Caller ID Detection Library 5.1 Caller ID Detection Library Caller ID Detection library consists of two modes: on-hook and off-hook. The configuration of the mode can be completed before calling the callerIDCreate function. Refer to Chapter 3 for details of the Caller ID Detection interface. The library consists of APIs, which provide an interface between the user application and the Caller ID Detection modules. To invoke Caller ID Detection, the following APIs must be called in this order: -- callerIDCreate (.......); -- callerIDInit (.......); -- callerIDRX (.......); -- callerIDDestroy (.......); 5.1.1 Library Sections The Caller ID Library contains the following data ROM section that needs to be placed in memory through linker command file. * CID_DC contains the definitions of low pass filter and demod sin/cos values. This must be placed in the internal memory. See Code Example 5-1 for a sample linker.cmd file, which may be used for testing the Caller ID library. Code Example 5-1. linker.cmd File # Linker.cmd file for DSP56824EVM External RAM # using both internal and external data memory (EX = 0) # and using external program memory (Mode = 3) MEMORY { .pram (RWX) : ORIGIN = 0x0000, LENGTH = 0xFF80 # ? external program memory .avail (RW) # available MOTOROLA : ORIGIN = 0x0000, LENGTH = 0x0030 Linking Applications with the Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com 5-1 Freescale Semiconductor, Inc. Linking Applications with the Caller ID Detection Library .cwregs (RW) .im1 (RW) .rom (R) .im2 (RW) .hole (R) .data (RW) .em (RW) .stack (RW) .onchip1(RW) .onchip2(RW) : ORIGIN = 0x0030, LENGTH CodeWarrior : ORIGIN = 0x0040, LENGTH : ORIGIN = 0x0800, LENGTH : ORIGIN = 0x1000, LENGTH : ORIGIN = 0x1600, LENGTH : ORIGIN = 0x2000, LENGTH : ORIGIN = 0xE000, LENGTH : ORIGIN = 0xF000, LENGTH : ORIGIN = 0xFF80, LENGTH registers : ORIGIN = 0xFFC0, LENGTH registers = 0x0010 # C temp registrs in = = = = = = = = # # # # # # # # 0x07C0 0x0800 0x0600 0x0A00 0xC000 0x1000 0x0F80 0x0040 = 0x0040 data 1 internal data ROM data 2 hole data segment data 3 stack on-chip peripheral # on-chip peripheral } Freescale Semiconductor, Inc... FORCE_ACTIVE {FconfigInterruptVector} SECTIONS { # # Data (X) Memory Layout # _EX_BIT = 0; # Internal Memory Partitions (for mem.h partitions) _NUM_IM_PARTITIONS = 1; # .im1 and .im2 # External Memory Partition (for mem.h partitions) _NUM_EM_PARTITIONS = 1; # .em .main_application_code : { # .text sections # # config.c MUST be placed first, otherwise the Interrupt Vector configInterruptVector will not be located at the correct address, P:0x0000 config.c (.text) * (.text) * (rtlib.text) * (fp_engine.text) * (user.text) } > .pram .main_application_data : { # # Define variables for C initialization code # F_Xdata_start_addr_in_ROM = ADDR(.rom) + SIZEOF(.rom) / 2; F_StackAddr = ADDR(.stack); F_StackEndAddr = ADDR(.stack) + SIZEOF(.stack) / 2 - 1; F_Xdata_start_addr_in_RAM = .; # # Memory layout data for SDK INCLUDE_MEMORY (mem.h) support # FmemEXbit = .; 5-2 Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Caller ID Detection Library WRITEH(_EX_BIT); FmemNumIMpartitions = .; WRITEH(_NUM_IM_PARTITIONS); FmemNumEMpartitions = .; WRITEH(_NUM_EM_PARTITIONS); FmemIMpartitionList = .; # WRITEH(ADDR(.im1)); # WRITEH(SIZEOF(.im1) / 2); WRITEH(ADDR(.im2)); WRITEH(SIZEOF(.im2) / 2); FmemEMpartitionList = .; WRITEH(ADDR(.em)); WRITEH(SIZEOF(.em) /2); Freescale Semiconductor, Inc... # .data sections * (.data) * (fp_state.data) * (rtlib.data) F_Xdata_ROMtoRAM_length = 0; F_bss_start_addr = .; _BSS_ADDR = .; * (rtlib.bss.lo) * (.bss) F_bss_length = . - _BSS_ADDR; # Copy DATA } > .data FArchIO = ADDR(.onchip2); # Caller ID internal data starts here #-----------------------------------.cid_int_data : { * (CID_DC.data) * (CID_DC.bss) } > .im1 # Caller ID internal data ends here #---------------------------------} MOTOROLA Linking Applications with the Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com 5-3 Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... Linking Applications with the Caller ID Detection Library 5-4 Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... Chapter 6 Caller ID Applications 6.1 Test and Demo Applications To verify the Caller ID algorithm, test and demo applications have been developed. Refer to the Targeting Motorola DSP568xx Platform Manual for the DSP you are using to see if the test and demo applications are available for your target. MOTOROLA Caller ID Applications For More Information On This Product, Go to: www.freescale.com 6-1 Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... Caller ID Applications 6-2 Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... Chapter 7 License 7.1 Limited Use License Agreement LIMITED USE LICENSE AGREEMENT PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THIS SOFTWARE. BY USING OR COPYING THE SOFTWARE, YOU AGREE TO THE TERMS OF THIS AGREEMENT. The software in either source code form ("Source") or object code form ("Object") (cumulatively hereinafter "Software") is provided under a license agreement ("Agreement") as described herein. Any use of the Software, including copying, modifying, or installing the Software so that it is usable by or accessible by a central processing unit, constitutes acceptance of the terms of the Agreement by the person or persons making such use or, if employed, the employer thereof ("Licensee") and if employed, the person(s) making such use hereby warrants that he has the authority of their employer to enter this license agreement. If Licensee does not agree with and accept the terms of this Agreement, Licensee must return or destroy any media containing the Software or materials related thereto, and destroy all copies of the Software. The Software is licensed to Licensee by Motorola Incorporated ("Motorola") for use under the terms of this Agreement. Motorola retains ownership of the Software. Motorola grants only the rights specifically granted in this Agreement and grants no other rights. Title to the Software, all copies thereof and all rights therein, including all rights in any intellectual property including patents, copyrights, and trade secrets applicable thereto, shall remain vested in Motorola. For the Source, Motorola grants Licensee a personal, non-exclusive, non-assignable, revocable, royalty-free right to use, copy, and make derivatives of the Source solely in a development system environment in order to produce object code solely for operating on a Motorola semiconductor device having a central processing unit ("Derivative Object"). For the Object and Derivative Object, Motorola grants Licensee a personal, non-exclusive, non-assignable, revocable, royalty-free right to copy, use, and distribute the Object and the Derivative Object solely for operating on a Motorola semiconductor device having a central processing unit. Licensee agrees to: (a) not use, modify, or copy the Software except as expressly provided herein, (b) not distribute, disclose, transfer, sell, assign, rent, lease, or otherwise make available the Software, any derivatives thereof, or this license to a third party except as expressly provided herein, (c) not remove, obliterate, or otherwise defeat any copyright, trademark, patent or proprietary notices related to the Software (d) not in any form export, re-export, resell, ship or divert or cause to be exported, re-exported, resold, shipped, or diverted, directly or indirectly, the Software or a direct product thereof to any country which the United States government or any agency thereof at the time of export or re-export requires an export license or other government approval without first obtaining such license or approval. MOTOROLA License For More Information On This Product, Go to: www.freescale.com 7-1 License Freescale Semiconductor, Inc. Freescale Semiconductor, Inc... THE SOFTWARE IS PROVIDED ON AN "AS IS" BASIS AND WITHOUT WARRANTY OF ANY KIND INCLUDING (WITHOUT LIMITATION) ANY WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY LIABILITY OR DAMAGES OF ANY KIND INCLUDING, WITHOUT LIMITATION, DIRECT OR INDIRECT OR INCIDENTAL OR CONSEQUENTIAL OR PUNITIVE DAMAGES OR LOST PROFITS OR LOSS OF USE ARISING FROM USE OF THE SOFTWARE OR THE PRODUCT REGARDLESS OF THE FORM OF ACTION OR THEORY OF LIABILITY (INCLUDING WITHOUT LIMITATION, ACTION IN CONTRACT, NEGLIGENCE, OR PRODUCT LIABILITY) EVEN IF MOTOROLA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THIS DISCLAIMER OF WARRANTY EXTENDS TO LICENSEE OR USERS OF PRODUCTS AND IS IN LIEU OF ALL WARRANTIES WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR PARTICULAR PURPOSE. Motorola does not represent or warrant that the Software is free of infringement of any third party patents, copyrights, trade secrets, or other intellectual property rights or that Motorola has the right to grant the licenses contained herein. Motorola does not represent or warrant that the Software is free of defect, or that it meets any particular requirements or need of the Licensee, or that it conforms to any documentation, or that it meets any standards. Motorola shall not be responsible to maintain the Software, provide upgrades to the Software, or provide any field service of the Software. Motorola reserves the right to make changes to the Software without further notice to Licensee. The Software is not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Software could create a situation where personal injury or death may occur. Should Licensee purchase or use the Software for any such unintended or unauthorized application, Licensee shall indemnify and hold Motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Motorola was negligent regarding the design or manufacture of the Software. The term of this Agreement is for as long as Licensee uses the Software for its intended purpose and is not in default of any provisions of this Agreement. Motorola may terminate this Agreement if Licensee is in default of any of the terms and conditions of this Agreement. This Agreement shall be governed by and construed in accordance with the laws of the State of Arizona and can only be modified in a writing signed by both parties. Licensee agrees to jurisdiction and venue in the State of Arizona. By using, modifying, installing, compiling, or copying the Software, Licensee acknowledges that this Agreement has been read and understood and agrees to be bound by its terms and conditions. Licensee agrees that this Agreement is the complete and exclusive statement of the agreement between Licensee and Motorola and supersedes any earlier proposal or prior arrangement, whether oral or written, and any other communications relative to the subject matter of this Agreement. 7-2 Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc. Index A IDE xi IIR xi Interfaces 3-1 API Sources 2-2 Applications 6-1 asm Sources 2-2 L Freescale Semiconductor, Inc... C Library Sections 5-1 License 7-1 License Agreement 7-1 Linking 5-1 LSB xi c_sources 2-2 Caller ID Demo 6-1 Caller ID Detection 1-1, 2-2 Caller ID Detection Library 5-1 Caller ID Detection Services 3-1 Caller ID Directory Structure 2-2 caller_id.mcp 4-2 CallerID Library 4-1 CallerID.lib 3-1 callerIDCreate 3-6 callerIDDestroy 3-15 callerIDInit 3-9 callerIDRX 3-12 CAS x CID x CID_DC 5-1 Config 2-2 Core Directories 2-1 CPE x M MAC xi Make 4-2 Make command 4-2 MIPS xi MSB xi O Off-hook 1-2 OMR xi OnCE xi P PC xi Performance 1-2 D S Dependency Build 4-1 Direct Build 4-2 domain specific directory 2-2 DSP x DSP56800 Family Manual xi DSP56824 User's Manual xi DTMF x SAS xi SDK xi SDK directory structure 4-1 SP xi SPI xi SR xi SRC xi E Embedded SDK Programmer's Guide xi Execute Make 4-2 F T Targeting DSP56824 Platform 1-1 telephony 2-2 Features 1-2 FFT xi FIR xi I I/O xi MOTOROLA Index For More Information On This Product, Go to: www.freescale.com i Freescale Semiconductor, Inc... Freescale Semiconductor, Inc. ii Caller ID Detection Library For More Information On This Product, Go to: www.freescale.com MOTOROLA Freescale Semiconductor, Inc... Freescale Semiconductor, Inc. For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc... Freescale Semiconductor, Inc. Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Motorola assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. "Typical" parameters which may be provided in Motorola data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including "Typicals" must be validated for each customer application by customer's technical experts. Motorola does not convey any license under its patent rights nor the rights of others. Motorola products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Motorola product could create a situation where personal injury or death may occur. Should Buyer purchase or use Motorola products for any such unintended or unauthorized application, Buyer shall indemnify and hold Motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Motorola was negligent regarding the design or manufacture of the part. Motorola and the Stylized M Logo are registered trademarks of Motorola, Inc. Motorola, Inc. is an Equal Opportunity/Affirmative Action Employer. MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. (c) Motorola, Inc. 2002. How to reach us: USA/EUROPE/Locations Not Listed: Motorola Literature Distribution; P.O. Box 5405, Denver, Colorado 80217. 1-303-675-2140 or 1-800-441-2447 JAPAN: Motorola Japan Ltd.; SPS, Technical Information Center, 3-20-1, Minami-Azabu. Minato-ku, Tokyo 106-8573 Japan. 81-3-3440-3569 ASIA/PACIFIC: Motorola Semiconductors H.K. Ltd.; Silicon Harbour Centre, 2 Dai King Street, Tai Po Industrial Estate, Tai Po, N.T., Hong Kong. 852-26668334 Technical Information Center: 1-800-521-6274 HOME PAGE: http://www.motorola.com/semiconductors/ For More Information On This Product, Go to: www.freescale.com SDK112/D