© Motorola, Inc., 2002. All rights reserved.
Embedded SDK
(Software Development Kit)
Caller ID Detection Lib r ary
SDK112/D
Rev. 2, 07/16/2002
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MOTOROLA Table of Contents i
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 Required Core Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-1
2.2 Optional (Domain-Specific) Directories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-2
Chapter 3
Caller ID Detection Library Interfaces
3.1 Caller ID Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-1
3.2 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-1
3.3 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-5
3.3.1 CallerIDCreate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-6
3.3.2 callerIDInit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-9
3.3.3 callerIDRX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-12
3.3.4 callerIDControl. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-14
3.3.5 callerIDDestroy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-15
Chapter 4
Building the Caller ID Library
4.1 Dependency Build. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-1
4.2 Direct Build. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-2
Contents
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
ii Caller ID Detection Library MOTOROLA
Chapter 5
Linking Applications with the Caller ID Detection Library
5.1 Caller ID Detection Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-1
5.1.1 Library Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-1
Chapter 6
Caller ID Applications
6.1 Test and Demo Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-1
Chapter 7
License
7.1 Limited Use License Agreement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-1
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MOTOROLA List of Tables iii
Table 3-1 CallerIDCreate Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
Table 3-2 callerIDInit Arguments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
Table 3-3 callerIDRX Arguments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12
Table 3-4 callerIDControl Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14
Table 3-5 callerIDDestroy Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15
List of Tables
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
iv Caller ID Detection Library MOTOROLA
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MOTOROLA List of Figures v
Figure 2-1 Core Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
Figure 2-2 DSP56824 Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Figure 2-3 caller_id Directory Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Figure 4-1 Automatic Dependency on caller_id.mcp Project . . . . . . . . . . . . . . . . . . . . . . . 4-1
Figure 4-2 caller_id.mcp Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Figure 4-3 Execute Make . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
List of Figures
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
vi Caller ID Detection Library MOTOROLA
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MOTOROLA List of Examples vii
Code Example 3-1 C Header File CallerID.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
Code Example 3-2 mem Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
Code Example 3-3 Use of callerIDCreate Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
Code Example 3-4 Sample Callback Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Code Example 3-5 Use of callerIDInit Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11
Code Example 3-6 Use of callerIDRX Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12
Code Example 3-7 Use of callerIDDestroy Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15
Code Example 5-1 linker.cmd File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1
List of Examples
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
viii Caller ID Detection Library MOTOROLA
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MOTOROLA Preface ix
About This Do cument
This manual describes the Caller ID Detection algorithm for use with the Embedded Software
Develop men t Kit, (SDK).
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
Librar y functions
Chapter 4, Buil ding the Caller ID Libr ary —tell s how to execute t he system libr ary project b uild
Chapter 5, Linking Applications with the Caller ID Detection Library describes organization
of the Caller ID Detection Library
Cha pter 6, Caller ID Ap plicatio ns —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 Users Manual, DSP56824UM/AD
Inside CodeWarrior: Core Tools, Metrowerks Corp.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
xCaller ID Detection Library MOTOROLA
Conventions
This document uses the following notational conventions:
Definitions, Acron y ms, 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 Call er ID
CPE Customer Premises Equipment
DSP Digital Signal Processor or Digital Signal Processing
DTMF Dual Tone Multiple Frequency
Typeface, Symb ol
or Term Meaning Examples
Courier
Monospaced Type Commands, co mm an d
parameters , code ex ampl es,
expressions, datatypes, and
directives
...*Foundational include files...
...a data structure of type vad_tConfigure...
Italic Calls, functions, statements,
procedures, routines,
arguments, file names and
applications
...the pConfig argument...
...defined in the C header file, aec.h...
...makes a call to the Callback proc ed ure...
Bold Referenc e sour ces, paths,
emphasis ...refer to the Targeting DSP56824 Platform
manual....
... see: C:\Program Files\Motorola\Embedded
SDK\help\tutorials
Bold/Italic Directory name, project name ...and contains these core directories:
applications contains applications software....
...Code War rior proj ec t, 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 m inus symbol to signify a
negative value
3V
-10
DES-1
ALL CAPITAL
LETTERS Variables, directives, defined
constants, files libraries INCLUDE_DSPFUNC
#define INCLUDE_STACK_CHECK
Brackets [...] Function keys ...by pressing function key [F7]...
Quotation marks “... “ Returned messages ...the message, “Test Passed” is displayed....
...if unsuccessful for any reason, it will return
“NULL”....
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MOTOROLA Preface xi
FFT Fast Fourier Transforms
FIR Fini te Impul se 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
OnCE™ On-Chip Emulation
OMR Operating Mode Register
PC Program Counter
SAS Subscrib er Alerting Signal
SDK Software Development Kit
SP S ta ck Poin ter
SPI Serial Peripheral Interface
SR Status Register
SRC Source
References
The following sources were used to produce this book:
1. DSP56800 Family Manual, DSP568 00FM/AD
2. DSP56824 Users Manual, DSP56824UM/AD
3. Embedded SDK Programmer s Guide
4. Caller ID Standard GR-CORE-30
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
xii Caller ID Detection Library MOTOROLA
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MOTOROLA Introduction 1-1
Chapter 1
Introduction
Welcome to Motorolas Family of Digital Signal Processors, (DSPs). This document describes the Caller
ID Detection Library, which is a part of Motorolas 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.
Motorolas 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
Motorolas 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 Targ et ing 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 tran smissio n will not begin unt il a silent interva l of at least 50 0ms has elapsed af ter the first po wer
ringing pattern ends. Power ring de tection is not a part of this library, so the users application must
include an external m echanism to detect the powe r ring. Once power ring is detec ted, Caller ID relay
provides an offhook connection. The user must provide the Caller ID relay.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
1-2 Caller ID Detection Library MOTOROLA
Introduction
Off-hook: Off-hook Cal ler ID is data tr ansmission associat ed with the off-hook condition . When off-hoo k,
the telephone exchange sends the Subscriber Alerting Signal (SAS) and Customer Premises Equipment
Alerti ng Si gna ls (CAS) sig nal s. Al tho ugh t he user ne ed no t detect the SAS si gnal , t he CAS s ign al mu st b e
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 Calle rIDRX () function.
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.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MOTOROLA Directory Structure 2-1
Chapter 2
Directory Structure
2.1 Required Core Director ies
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 co re directorie s:
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.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
2-2 Caller ID Detection Library MOTOROLA
Directory Structu re
2.2 Optional (Domain-Specific) Directories
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 ex ampl e test cod e for C aller ID D etection
Config - contains configura tion file s appconfig.c, appconfig.h and linker.cmd specific to Caller
ID De tection.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MOTOROLA Caller ID Detection Library Interfaces 3-1
Chapter 3
Caller ID Detection Library Interfaces
3.1 Caller ID Ser vices
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 De tection L i brary (CallerID .lib)
The interfaces and services provided are described in this chapter.
Code Example 3-1. C Header File CallerID.h
#ifndef __Ca llerID_H
#define __Ca llerID_H
/***************************
Foundationa l Include Files
****************************/
#include "po rt.h"
/*************************************************
#define for CallerID receiv er configuration flag s
**************************************************/
#define CAL LERID_ONHOOK 0x0000
#define CAL LERID_OFFHOOK 0x0001
/* Status in the Callback pr ocedure has the follo wing bits */
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
3-2 Caller ID Detection Library MOTOROLA
Caller ID Detection Library Interfaces
#define CAL LERID_DATA_READY 0x0001
#define CAL LERID_TIMEOUT 0x0002
#define CAL LERID_ERROR 0x0004
#define CAL LERID_NO_TRANSMI T 0x0008
#define CAL LERID_CHECKSUM_E RROR 0x0010
#define CAL LERID_CSS_ERROR 0x0020
#define CAL LERID_MARK_ERROR 0x0040
#define CAL LERID_LENGTH_ERR OR 0x0080
/********************************************
Command s for callerIDCo ntrol. Currently
callerI DControl () retu rns PASS and does
not per form any action. The following
#define s are only for t he future use and
to be u sed as arguments when calling
callerI DControl ().
*********************************************/
#define CALL ERID_ACTIVATE 1
#define CALL ERID_DEACTIVATE 2
#define CALL ERID_STATUS 3 /* Returns Call erID Status */
/********************************************
CallerI D callback routi ne structure
*********************************************/
/* The statu s in the Callbac k routine below has 2 categories
1. CALLER ID_DATA_READY
2. CALLER ID_ERROR
If the st atus is CALLERID _ERROR, the bit posit ions in the
status re present the type of the error occured .
For examp le if there is C SS_ERROR (refer to th e status bits
defined a bove), the CALLE RID_CSS_ERROR and the CALLERID_ERROR
bits are set in the statu s.
*/
typedef stru ct
{void (*pCa llback) ( void * pCallbackArg,
UWord16 Status,
UWord16 * pChar ,
UWord16 Numchar s );
void * pCa llbackArg;
} callerID_sCallba ck;
/*************************************************
Structu re for CallerID receiver Configuratio n
**************************************************/
typedef stru ct
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Interface
MOTOROLA Caller ID Detection Library Interfaces 3-3
{UWord16 Flags;
callerID_sCal lback callerID Callback;
} callerID_sConfig ure;
/****************************************************
Structu re for CallerID context information. This
structu re should not be altered by the user
****************************************************/
typedef stru ct
{
Word16 * contextbuff;
UWord16 length;
callerID _sCallback *pCal lBck;
Word16 CID_SMPL_GRID[3 ];
Word16 CID_PREV_ENER[2 1];
Word16 CID_PREV_EXTREM E[4];
Word16 CID_OFST_9OR10;
Word16 CID_LMT_9OR10;
Word16 CID_CAR_SUM1;
Word16 CID_CAR_SUM2;
Word16 CID_FRAME_CNT;
Word16 CID_DATA_BYTE;
Word16 CID_CSS_CNT;
Word16 CID_CSS_ERR_CNT ;
Word16 CID_MARK_CNT;
Word16 CID_DC_FRM_CNT;
Word16 CID_CODEC_IGAIN ;
Word16 CID_MARK_ERR_CN T;
Word16 CID_BITS_REG;
Word16 CID_BITS_CNT;
Word16 CID_CRC_WORD;
Word16 CID_FRM_LEN;
Word16 CID_BYTE_CNT;
Word16 CID_FRM_STG;
Word16 CID_ZERO_CROSS;
Word16 CID_AMP_FRM_CNT ;
Word16 CID_SILEN_THRES ;
Word16 CID_DC_SUM2;
Word16 CID_DC_SUM1;
Word16 CID_DC_SUM0;
Word16 CID_DC_VAL;
Word16 *CID_SIN1_DLY_B UFF_PTR;
Word16 CID_SIN1_DLY_PT R;
Word16 CID_COS1_DLY_PT R;
Word16 *CID_COS1_DLY_B UFF_PTR;
Word16 CID_SIN0_DLY_PT R;
Word16 CID_COS0_DLY_PT R;
Word16 *CID_SIN0_DLY_B UFF_PTR;
Word16 CID_SMPL_OUT_PT R;
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
3-4 Caller ID Detection Library MOTOROLA
Caller ID Detection Library Interfaces
Word16 *CID_COS0_DLY_B UFF_PTR;
Word16 CID_AVER_PTR;
Word16 *CID_AVER_BUFF_ PTR;
Word16 CID_ENER_BUFF_P TR;
Word16 CID_DATA_BUFF_C NT;
Word16 CID_STATE;
Word16 CID_STATUS;
Word16 CID_samplecount er;
Word16 CID_samplebuffe r[20];
Word16 CID_sampleptr;
Word16 CID_DATA_BUFF_P TR;
Word16 CID_DATA_TMP_PT R;
Word16 CID_TIMER_CNT;
Word16 CID_WAIT_TMR;
UWord16 CID_DATA_BUFF[2 58];
Word16 CID_DATA_OUT_PT R;
Word16 status;
UWord16 NumberSamples;
UWord16 numchars;
} callerID_sHandle ;
/***************************
Function Pr ototypes
****************************/
EXPORT calle rID_sHandle *cal lerIDCreate (callerID _sConfigure *);
EXPORT Resul t callerIDInit (callerID_sHandle *, callerID_sConfigure* );
EXPORT Resul t callerIDRX (callerID_sHandle *, Word16 *,
UWord16);
EXPORT void callerIDdet Destroy (callerID_sHandle * );
EXPORT Resul t callerIDContro l (UWord16 Command);
#endif
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Specifications
MOTOROLA Caller ID Detection Library Interfaces 3-5
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
outpu t o nly fr om the fu nction. An inout argumen t mea ns that a par amet er val ue i s a n i nput to the f unct io n,
but the same parameter is also an output from the function.
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 th e inout pointer parameter is not changed.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
3-6 Caller ID Detection Library MOTOROLA
Caller ID Detection Library Interfaces
3.3.1 CallerIDCreate
Call(s):
callerID_sHa ndle *callerIDCreate (callerID_sConfi gure *pConfig);
Required Header: CallerID.h
Arguments:
Table 3-1. CallerIDCreate Arguments
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_sHa ndle *callerIDCreate (callerID_sConfi gure *pConfig)
{
Result result = PASS;
bool fla g = true;
callerID _sHandle * pcall erIDdet;
pcallerI Ddet = (callerID _sHandle *) memMalloc EM (sizeof (callerID_ sHandle));
if (pcal lerIDdet == NULL )
retur n (NULL);
pcallerI Ddet->contextbuf f = (Word16 *) memMal locEM (sizeof (Word16 ) * 2);
if (pcal lerIDdet->contex tbuff == NULL)
flag = false;
pcallerI Ddet->pCallBck = (callerID_sCallback *) memMallocEM (sizeo f
(callerID_sCallback));
if (pcal lerIDdet->pCallB ck == NULL)
flag = false;
pcallerI Ddet->CID_SIN0_D LY_BUFF_PTR = (Word16 *) memMallocAlignedE M ( 6 *
sizeof(Word16));
if (pcal lerIDdet->CID_SI N0_DLY_BUFF_PTR == NU LL)
flag = false;
flag &= memIsAligned (p callerIDdet->CID_SIN0 _DLY_BUFF_PTR, 6 * si zeof(Word16));
pcallerI Ddet->CID_SIN1_D LY_BUFF_PTR = (Word16 *) memMallocAlignedE M ( 6 *
sizeof(Word16));
if (pcal lerIDdet->CID_SI N1_DLY_BUFF_PTR == NU LL)
flag = false;
flag &= memIsAligned (p callerIDdet->CID_SIN1 _DLY_BUFF_PTR, 6 * si zeof(Word16));
pcallerI Ddet->CID_COS0_D LY_BUFF_PTR = (Word16 *) memMallocAlignedE M ( 6 *
sizeof(Word16));
if (pcal lerIDdet->CID_CO S0_DLY_BUFF_PTR == NU LL)
flag = false;
flag &= memIsAligned (pc allerIDdet->CID_COS0_ DLY_BUFF_PTR, 6 * siz eof(Word16));
pcallerI Ddet->CID_COS1_D LY_BUFF_PTR = (Word16 *) memMallocAlignedE M ( 6 *
sizeof(Word16));
pConfig in Points to the configuration data for Caller ID
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Specifications
MOTOROLA Caller ID Detection Library Interfaces 3-7
if (pcal lerIDdet->CID_CO S1_DLY_BUFF_PTR == NU LL)
flag = false;
flag &= memIsAligned (pc allerIDdet->CID_COS1_ DLY_BUFF_PTR, 6 * siz eof(Word16));
pcallerI Ddet->CID_AVER_B UFF_PTR = (Word16 *) memMallocAlignedEM ( 6 *
sizeof(Word16));
if (pcal lerIDdet->CID_AV ER_BUFF_PTR == NULL)
flag = false;
flag &= memIsAligned (pc allerIDdet->CID_AVER_ BUFF_PTR, 6 * sizeof( Word16));
if (flag == false)
{
call erIDdetDestroy ( pcallerIDdet);
retu rn (NULL);
}
else
{
resu lt = callerIDIni t (pcallerIDdet, pCon fig);
retu rn (pcallerIDdet );
}
}
For details on the callerID_sHandle structure, re fer 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 ca l led to create an in stance, 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 func tion. If th e user dynamically allocates memory without call ing callerIDCreate, then
the user hims elf must des troy the memo ry allocated.
Returns: Upon successful completion, this function returns a pointer to a structure of type
callerID_sHandle; otherwise, NULL is returned.
Special Co nsi dera ti ons:
The C aller ID appl ication 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 “Ca llerID.h”
#include “me m.h”
{callerID_sCo nfigure *pConfig ;
/* Initializ e pConfig struct ure for ON-HOOK. This needs to be done aft er 500 ms
of silent in terval after the end of first power r ing */
/* Allocate memory for the i nit structure */
pConfig = me mMallocEM( sizeo f(callerID_sConfigure ));
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
3-8 Caller ID Detection Library MOTOROLA
Caller ID Detection Library Interfaces
pConfig->Fla gs = CALLERID_OF FHOOK;
pConfig ->ca llerIDCallback.p Callback = CallerIDRX Callback;
/* Refer to CallerIDInit () described above [3.3. 2] for an example
CallerIDRXCallback function */
/* Create an d initialize all the variables of Cal lerID library */
callerIDCrea te (pConfig);
...
}
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Specifications
MOTOROLA Caller ID Detection Library Interfaces 3-9
3.3.2 callerIDInit
Call(s):
Result callerIDIni t (callerID_sHandle *pCallerID, callerID_sConf igure
*pConfig);
Required Header: CallerID.h
Arguments:
Table 3-2. callerIDInit Arguments
Description: The callerIDInit function w ill initialize the Calle r ID D etection algorithm. D uring the
initialization, all resources will b e set to the ir initial values in prep aration fo r Caller I D De tection
operati on. The Caller ID ins tan ce (pCallerID) can be cr ea te d either by callin g t he 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 fi elds initi alize
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 struc ture 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 (*pCallb ack) (void *pCa llbackArg,char *pChar s,UWord16 Status,
UWord16 NumCh ars);
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 form at, re fer to Caller ID Standard GR-CORE-30.
Status - The status in the Callback routine has 2 categories
CALLERID_DATA_READY
CALLERID_ERRO R
If the sta tu s is CALLERID_ERROR, the bit posi t ion s in th e status, shown below,
indicate the type of the error which occured:
#define CALL ERID_TIMEOUT 0 x0002
#define CALL ERID_NO_TRANSMI T 0x0008
#define CALL ERID_CHECKSUM_E RROR 0x0010
#define CALL ERID_CSS_ERROR 0x0020
#define CALL ERID_MARK_ERROR 0x0040
#define CALL ERID_LENGTH_ERR OR 0x0080
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.
pCallerID in A pointer to an instan ce of Caller ID dete ction, crea ted by a call to the
callerIDCreate function
pConfig in A pointer to a data structure containing data for initializing the Caller
ID algorithm
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
3-10 Caller ID Detection Library MOTOROLA
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 examp le ca ll back proc edur e is shown below for ref er enc e. The user mus t write hi s/ her
own callback pr oce dur e. This ca ll back proce dur e c hecks for t he e rr or condit i on a nd prints
the appro priate error m essage. If the data receiv ed has no error, the n it prints the type of
caller ID, the length of the message and the message itself.
Code Example 3-4. Sample Callback Procedure
void CallerI DRXCallback ( void * pCallbackArg,
UWord16 Sta tus,
UWord16 * p Char,
UWord16 Num chars )
{
UWord16 lengt h,i;
if ( Status = = CALLERID_ERRO R )
{
CallerIDStatu s = FAIL;
if (Status & CALLERID_CHECKS UM_ERROR =
CALLERID_CHECKSUM_ERROR)
testComment ( &testRec, " Che cksum Error");
if (Status & CALLERID_CSS_ER ROR == CALLERID_CSS_E RROR)
testComment ( &testRec, " CSS Error");
if (Status & CALLERID_MARK_E RROR ==
CALLERID_MARK_ERROR)
testComment (&test Rec, " Mark Erro r");
if (Status & CALLERID_LENGTH _ERROR ==
CALLERID_LENGTH_ERROR)
testComment ( &testRec, " Len gth Error");
}
if ( Status = = CALLERID_DATA _READY )
{
if (*pChar++ == 04 )
{
printf("Messa ge Type is = ON_HOOK\ n");
}
else
{
printf("Messa ge Type is = OF F_HOOK\n");
}
length = *pChar++;
printf("Lengt h of the caller id is = %02d\n",leng th);
for (i = 0;i < length;i++)
printf("%c",* pChar++);
}
}
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Specifications
MOTOROLA Caller ID Detection Library Interfaces 3-11
Returns: Upon successful completion, a value of PASS will be returned; otherwise, a value of FAIL
will be returned.
Special Co nsi dera ti ons: None
If callerIDCreate is ca lled, then the user ne ed not c all callerIDInit function as it is called internally
in the callerIDCreate function.
Code Example 3-5. Use of callerIDInit In terf ace
#include CallerID.h
void testCal lerID (void)
{callerID_sCo nfigure * pConfi g;
/* Initializ e pConfig struct ure for ON-HOOK. This needs to be done aft er 500 ms
of silent in terval after the end of first power r ing */
/* Allocate memory for the i nit structure */
pConfig = me mMallocEM( sizeo f(callerID_sConfigure ));
pConfig->Fla gs = CALLERID_OF FHOOK;
pConfig ->ca llerIDCallback.p Callback = CallerIDRX Callback;
/* Refer to CallerIDInit () described above [3.3. 2] for an example
CallerIDRXCallback function */
/* Create an d Initialize all the variables of Cal lerID library */
callerIDCrea te (pConfig);
...
}
For details on structures used in the above example, refer to Code Example 3-1
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
3-12 Caller ID Detection Library MOTOROLA
Caller ID Detection Library Interfaces
3.3.3 callerIDRX
Call(s):
Result callerIDRX (callerID_sHandle *pCallerID, Word16 *pSamples ,
UWord16 NumberSam ples);
Required Header: CallerID.h
Arguments:
Table 3-3. callerIDRX Arguments
Description: The callerIDRX function will process the samples supplied. These are linear 16-bit PCM
samples from the c odec, sample d at 8KHz. Once the pro cessing is co mple te, the re sult is returne d to the
user by callin g the Callback procedur e. Th e us er can cal l the callerIDRX funct ion any number of ti mes, a s
long as the user has data. The Callback procedure is called when the CallerID data is compl etely received
without any error or if there is any error in the data received. The argument Status in t he 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 procedu re is eit he r
CALLERID_DATA_READY or CALLERID_ERROR, stop calling the callerIDRX functi on.
Returns: After successfully processing each frame, callerIDRX will return PASS; if any erro r occurr ed,
callerIDRX will return FAIL”.
Special Co nsi dera ti ons: None
Code Example 3-6. Use of callerIDRX Interface
#include CallerID.h
#define NUMBER_SAMPLES_PERCALL 20
void testCal lerID (void)
{callerID_sCo nfigure * pConfi g;
Result res;
Int16 samplebuffer[NUMBER_SAMPLES_PERCALL];
/* Initializ e pConfig struct ure for ON-HOOK. This needs to be done aft er 500 ms
of silent in terval after the end of first power r ing */
/* Allocate memory for the i nit structure */
pConfig = me mMallocEM( sizeo f(callerID_sConfigure ));
pConfig->Fla gs = CALLERID_OF FHOOK;
pConfig ->ca llerIDCallback.p Callback = CallerIDRX Callback;
/* Refer to CallerIDInit () described above [3.3. 2] for an example
CallerIDRXCallback function */
pCallerID in A pointer to an instan ce of Caller ID dete ction, crea ted 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
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Specifications
MOTOROLA Caller ID Detection Library Interfaces 3-13
/* Create an d initialize all the variables of Cal lerID library */
callerIDCrea te (pConfig);
...
/* Collect N UMBER_SAMPLES_PE RCALL number of sampl es and call callerIDR X () */
res = caller IDRX (sample_buf fer, NUMBER_SAMPLES_P ERCALL);
}
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
3-14 Caller ID Detection Library MOTOROLA
Caller ID Detection Library Interfaces
3.3.4 callerIDControl
Call(s):
UWord16 cal lerIDControl( UW ord16 Command);
Required Header:CallerID.h
Arguments:
Table 3-4. callerIDControl Arguments
Description: Currently not supported; this is for future use.
Returns: Always returns PASS”.
Special Co nsi dera ti ons: None
Code Example: None
Command in Commands to control caller ID detection
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Specifications
MOTOROLA Caller ID Detection Library Interfaces 3-15
3.3.5 callerIDDestroy
Call(s):
void callerI DDestroy (caller ID_sHandle *pCallerID );
Required Header:CallerID.h
Arguments:
Table 3-5. callerIDDestroy Arguments
Description: Destroys an instance of Caller ID detection originally created by a call to the callerIDCreate
function.
Returns: Non e
Special Co nsi dera ti ons: None
Code Example 3-7. Use of callerIDDestroy Interface
#include CallerID.h
{callerID_sCo nfigure * pConfi g;
Result res;
Int16 samplebuffer[NUMBER_SAMPLES_PERCALL];
/* Initializ e pConfig struct ure for ON-HOOK. This needs to be done aft er 500 ms
of silent in terval after the end of first power r ing */
/* Allocate memory for the i nit structure */
pConfig = me mMallocEM( sizeo f(callerID_sConfigure ));
pConfig->Fla gs = CALLERID_OF FHOOK;
pConfig ->ca llerIDCallback.p Callback = CallerIDRX Callback;
/* Refer to CallerIDInit () described above [3.3. 2] for an example
CallerIDRXCallback function */
/* Create an d initialize all the variables of Cal lerID library */
callerIDCrea te (pConfig);
...
/* Collect N UMBER_SAMPLES_PE RCALL number of sampl es and call callerIDR X () */
res = caller IDRX (sample_buf fer, NUMBER_SAMPLES_P ERCALL);
...
callerIDDest roy (pCallerID);
}
pCallerID in A pointer to an instan ce of Caller ID dete ction, crea ted by a call to the
callerIDCreate function
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
3-16 Caller ID Detection Library MOTOROLA
Caller ID Detection Library Interfaces
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MOTOROLA Building the Caller ID Library 4-1
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 Dependen cy B uild
Dependency build i s th e easiest approach and req uires no addi t ion al wor k 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 Ca ller ID
library will automatically build when the application is built.
Figure 4-1. Automatic Dependency on caller_id.mcp Project
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
4-2 Caller ID Detection Library MOTOROLA
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:
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.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MOTOROLA Linking Applications with the Caller ID Detection Library 5-1
Chapter 5
Linking Ap plications with the Ca ller 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 b e com pleted before calli ng the callerIDCreate function. Refer to Chapter 3 for detai ls of the Call er
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 (.......);
caller IDDe str oy (.......);
5.1.1 Library Sections
The Call er ID Library cont ains the f ollowing dat a ROM section that needs to be placed in memory through
linker command file.
CID_DC contai ns t he defini ti ons of l ow pa ss filter a nd demod sin/c os values. This must be pl aced
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 DSP568 24EVM External RAM
# using both internal and ex ternal data memory (E X = 0)
# and using external program memory (Mode = 3)
MEMORY {
.pram (RWX ) : ORIGIN = 0x0 000, LENGTH = 0xFF80 # ? external program memory
.avail (RW) : ORIGIN = 0x0 000, LENGTH = 0x0030 # available
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
5-2 Caller ID Detection Library MOTOROLA
Linking Applications with the Caller ID Detection Library
.cwregs (RW) : ORIGIN = 0x0 030, LENGTH = 0x0010 # C temp registrs in
CodeWarrior
.im1 (RW) : ORIGIN = 0x0 040, LENGTH = 0x07C0 # data 1
.rom (R) : ORIGIN = 0x0 800, LENGTH = 0x0800 # internal data ROM
.im2 (RW) : ORIGIN = 0x1 000, LENGTH = 0x0600 # data 2
.hole (R) : ORIGIN = 0x1 600, LENGTH = 0x0A00 # hole
.data (RW) : ORIGIN = 0x2 000, LENGTH = 0xC000 # data segment
.em (RW) : ORIGIN = 0xE 000, LENGTH = 0x1000 # data 3
.stack (RW) : ORIGIN = 0xF 000, LENGTH = 0x0F80 # stack
.onchip1(RW) : ORIGIN = 0xF F80, LENGTH = 0x0040 # on-chip peripheral
registers
.onchip2(RW) : ORIGIN = 0xF FC0, LENGTH = 0x0040 # on-chip peripheral
registers
}
FORCE_ACTIVE {FconfigInterru ptVector}
SECTIONS {
#
# Data (X) Memory Layout
#_EX_BIT = 0;
# Internal Memory Partitions (for mem.h partitions)
_NUM_IM_PARTI TIONS = 1; # . im1 and .im2
# External Memory Partition (for mem.h parti tions)
_NUM_EM_PARTI TIONS = 1; # .em
.main_applica tion_code :
{# .text sections
# config.c M UST be placed f irst, otherwise the I nterrupt Vector
# configInte rruptVector wil l not be located at t he correct
address, P:0x 0000
config.c (.te xt)
* (.text)
* (rtlib.text)
* (fp_engine.text)
* (user.text)
} > .pram
.main_applica tion_data :
{#
# Define vari ables for C ini tialization 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 layo ut data for SDK INCLUDE_MEMORY (mem. h) support
#
FmemEXbit = . ;
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Caller ID Detectio n Library
MOTOROLA Linking Applications with the Caller ID Detection Library 5-3
WRITEH(_EX_BIT);
FmemNumIMpart itions = .;
WRITEH(_NUM_IM_PARTITIONS);
FmemNumEMpart itions = .;
WRITEH(_NUM_EM_PARTITIONS);
FmemIMpartiti onList = .;
# WRITEH(ADDR(.im1));
# WRITEH(SIZEOF (.im1) / 2);
WRITEH(ADDR(.im2));
WRITEH(SIZEOF (.im2) / 2);
FmemEMpartiti onList = .;
WRITEH(ADDR(.em));
WRITEH(SIZEOF (.em) /2);
# .data sections
* (.data)
* (fp_state.data)
* (rtlib.data)
F_Xdata_ROMto RAM_length = 0;
F_bss_start_a ddr = .;
_BSS_ADDR = . ;
* (rtlib. bss.lo)
* (.bss)
F_bss_length = . - _BSS_ADDR ; # Copy DATA
} > .data
FArchIO = A DDR(.onchip2);
# Caller ID i nternal data st arts here
#------------------------------------
.cid_int_data :
{* (CID_DC.data)
* (CID_DC.bss)
} > .im1
# Caller ID i nternal data en ds here
#----------------------------------
}
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
5-4 Caller ID Detection Library MOTOROLA
Linking Applications with the Caller ID Detection Library
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MOTOROLA Caller ID Applications 6-1
Chapter 6
Caller ID Applications
6.1 Test and Demo Applications
To verify the Caller ID al gorithm, test and demo applica tions have be en developed . Refer to the Targeting
Motorola DSP568xx Platf or m Manual for the DSP you are usi ng to see if the test and demo appli cations
are available for your target.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
6-2 Caller ID Detection Library MOTOROLA
Caller ID Applications
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MOTOROLA License 7-1
Chapter 7
License
7.1 Limited Use Licens e 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
hereina fter "Soft ware ") is pro vide d under a licen se agre ement ("Agreemen t") a s des cribed her ein. Any us e
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
agree men t. If Licen see does n ot a gree w ith and ac cep t the t erm s of th is Ag reem ent, Lice nse e mus t ret urn
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 Mo toro la.
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 a nd Derivativ e Ob jec t, Motorola gra nts Lice nsee a pe rsonal, n on-e x cl us ive , no n-a ssi gnable,
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.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
7-2 Caller ID Detection Library MOTOROLA
License
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 i t mee ts any part icu la r r equirement s o r n eed of the Li cens ee , or that it con for ms t o any documen tat i on,
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
applica tion in which the fai lure of the Softwar e could cr eate a situa tion wh ere pers onal inj ury or deat h may
occur. Shoul d License e p urc hase or u se the Softwa re fo r any suc h uni nt ended or unauthori zed app li cation,
Licensee shall indemnify and hold Motorola and its officers, employees, subsidiaries, affiliates, and
distri but or s har m le ss against all claims, cost s, da mages, and expen ses, and reas onab le att orn ey fees ari si ng
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 Ag reem ent is for as lo ng as L icensee u ses the S oftware fo r its intende d purpose and is not
in de fault of any pro visions of t his Ag reemen t. M otorol a may term inate th is Ag reem ent if L icen see 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.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
MOTOROLA Index i
A
API Sources 2-2
Applications 6-1
asm Sources 2-2
C
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
D
Dependency Build 4-1
Direct Build 4-2
dom a i n sp ecific di r e c t o ry 2-2
DSP x
DSP56800 Family Manual xi
DSP56824 Users Manual xi
DTMF x
E
Embedded SDK Programmers Guide xi
Execute Make 4-2
F
Features 1-2
FFT xi
FIR xi
I
I/O xi
IDE xi
IIR xi
Interfaces 3-1
L
Library Secti on s 5-1
License 7-1
License Agreement 7-1
Linking 5-1
LSB xi
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
S
SAS xi
SDK xi
SDK directory structure 4-1
SP xi
SPI xi
SR xi
SRC xi
T
Targeting DSP56824 Platform 1-1
telephony 2-2
Index
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
ii Caller ID Detection Library MOTOROLA
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
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
respec tive owne rs. © Mot oro la, Inc. 200 2.
How to reach us:
USA/EUROPE/Locations Not Listed: Motorola Literature Distribution; P.O. Box 5405, Denver, Colorado 80217. 13036752140 or 18004412447
JAPAN: Motorola Japan Ltd.; SPS, Technical Information Center, 3201, MinamiAzabu. Minatoku, Tokyo 1068573 Japan. 81–3–34403569
ASIA/PACIFIC:
Motorola Sem i co nduc to rs H.K . Ltd.; Silicon Harbour Ce ntre, 2 Dai King Street, Ta i Po In dustrial Estate, Tai P o , N.T., Hon g Kon g. 85226668334
Technical Information Center: 1–800–521–6274
HOME PAGE: http://www.motorola.com/semiconductors/
Motorola reserves the right to make changes without fur ther notice to any products herei n. Motorola makes no warranty, representation or guarantee regarding th e
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 limit ation 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 customers 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 negli gent regarding the design or manufactur e of the part. Mot orola and the
Stylized M Logo
are registered tr ademarks of Motorola, I nc. Motorola,
Inc. is an Equal Opportunity/Affir mat ive Action Employer.
SDK112/D
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...