Home

CPT Detection Library - Freescale Semiconductor

image

Contents

1. return value indicates one of the the CPT tones detected th return value contains one of the following defines define DIAL TONE DETECTED 0x11 define MSG WAITING TONE DETECTED Ox12 define RECALL DIAL TONE DETECTED 0x13 define BUSY TONE DETECTED 0x14 define REORDER TONE DETECTED 0x15 define RINGING TONE DETECTED 0x16 An example callback procedure is shown as a reference in Code Example 3 4 and prints the CPT detected You must write your own callback procedure 3 8 CPT Detection Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Code Example 3 4 Sample Callback Procedure Specifications include CPTdet h void CPTDetCallback void pCallbackArg UWordl6 return value switch return_value case DIAL TONE DETECTED printf Dial tone detected n n break case MSG WAITING TONE DETECTED printf Message Waiting tone detected n n break case RECALL DIAL TONE DETECTED printf Recall Dial tone detected n n break case BUSY TONE DETECTED printf Busy tone detected nn break case REORDER TONE DETECTED printf Reorder tone detected n n break case RINGING TONE DETECTED printf Audible ringing tone detected n n
2. 2 sizeof Word16 if pCPTDetr psig energy NULL flag false if memIsAligned pCPTDet gt psig energy 2 NULL flag false pCPTDet gt psik UWord16 memMallocAlignedEM 2 NO FIL sizeof Word16 if pCPTDet gt psik NULL flag false if memIsAligned pCPTDet gt psik 2 NO FIL NULL flag false pCPTDet gt pCallback CPTDet sCallback memMallocEM sizeof CPTDet sCallback if pCPTDet gt pCallback NULL flag false MOTOROLA CPT Detection Library Interfaces 3 5 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 CPT Detection Library in Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 if flag false CPTDetDestroy pCPTDet return NULL CPTDetInit pCPTDet pConfig return pCPTDet For details on the CPTDet sHandle structure refer to Code Example 3 1 If the CPTDetCreate function is called to create an instance then CPTDetDestroy see Section 3 3 4 should be used to destroy the instance Alternatively the user can allocate memory statically which requires duplicating all the statements in the CPTDetCreate function In this case the user can call the CPTDetInit function directly bypassing the CPTDetCreate function If the user dynamically allocates memory without calling CPTDetCreate then the user himself must destroy the memor
3. For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 MOTOROLA Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 J WRITEH NUM EM PARTITIONS FmemIMparti ionList WRITEH ADDR iml WRI IZEOF iml TEH ADDR im2 WRITEH SIZEOF im2 FmemEMpartitionList TEH ADDR em WRITEH SIZEOF em 2 Ja E kri L I a Ja by a j J M 2 ct by H j da data sections data fp state data rtlib data CPT external data begins here cpt data data CPT external data ends here F Xdata ROMtoRAM length 0 F bss start addr BSS ADDR rtlib bss lo bss F bss length BSS ADDR Copy DATA gt data FArchIO ADDR onchip2 Linking Applications with the CPT Library For More Information On This Product Go to www freescale com CPT Library 5 3 ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Linking Applications with Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 5 4 CPT Detection Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 6 CPT Detection Applications 6 1 T
4. 2 3 cpt Directory Structure 2 2 CPT Detection Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor ING Dikectony Structure ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 The cpt directory includes these sub directories e Api includes the APIs for CPT Detection Asm Sources includes all asm source files e C Sources includes all C source files e test_cpt includes C source files and configuration necessary for testing the CPT Detection library modules C Sources contains an example test code for CPT Detection Config contains configuration files appconfig c appconfig h and linker cmd specific to CPT Detection testing 2 3 Demo Directory Structure As shown in Figure 2 4 the CPT Detection demo demo_cpt is encapsulated in the telephony directory under applications 1 a a G a 3 dsp56803evm G dsp56805evm E dsp56824evm nos 5 02 applications 3des demo A applications Data J codec A des 3 eeprom 3 serial 3 1 telephony C dimf det C dtmf gen a 9711 a G726 demo 2 timer E v22 demo a v42bis demo H E Figure 2 4 SDK Application Directory Structure The demo_cpt directory includes the files specific to the C
5. More Information On This Product Go to www freescale com Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 vi Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 CPT Detection Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 List of Examples Code Example 3 1 C Header File cpilek s ves kaka kk aa ko kopi fk di a ak pk e GOU Example 3 2 mem LIMAY gd ai ana d bo n a af ao AA VAY Did Code Example 3 3 Useof CPT Den rene ANSYEN e 0 eu a ae r s Code Example 3 4 Sample Callback Procedure eee ee eee eee ones nesans Code Example 3 5 Useof CPTDetlnit Be a kwa k ka e SASA kra kaa se Code Example 3 6 Use of CPI Detection Interface waw nos ea va ae ava ava eya c n n Code Example 3 7 Use of CPTDetDestroy Interface 5 vwa av kan vwa da a aaa va e mate ce Code Example 5 1 linkercmd Pio soon ate ae Ge kaa zs 50 Pp dak s ES EDI AS p ka MOTOROLA List of Examples For More Information On This Product Go to www freescale com vii Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 viii Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 CPT Detection Library For More Information On This Product Go to www freescale com MOTOROLA AR
6. 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 7 1 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 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 PRO
7. break default printf Tone not Detected n n break E Special Considerations e If CPTDetCreate is called then the user need not call CPT Derlnit function as it is called internally in the CPTDetCreate function Code Example 3 5 Use of CPTDetlnit Interface include cptdet h include mem h Function prototypes void CPTDetCallback void pCallbackArg UWordl6 return value void test CPTdet void CPTDet sHandle pCPTDet CPTDet sConfigure pConfig MOTOROLA CPT Detection Library Interfaces 3 9 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc CPT Detection Library Interface 3 10 ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 pConfig CPTDet sConfigure memMallocEM sizeof CPTDet sConfigure if pConfig NULL assert Out of memory Initialize the callback function plonfig gt CPTDetCallback pCallback CPTDetCallback Create and initialize the pConfig structure pCPTDet CPTDetCreate pConfig This itself calls CPTDetlnit function CPT Detection Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 3 CPTDete
8. employed the person s making such use hereby warrants that they have 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
9. this platform config contains default hardware software configurations for this platform include contains SDK header files which define the Applicatin Programming Interface sys contains reguired system components tools contains useful utilities used by system components There are also optional directories that include domain specific libraries MOTOROLA Directory Structure 2 1 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 2 2 Optional Domain Specific Directories Figure 2 2 demonstrates how the CPT Detection algorithm is encapsulated in the domain specific directory telephony Directory Structure o a sp56803evm sp56805evm sp56824evm nos A applications E bsp 3 buildall Data E contig 3 include 3 modem 3 security 3 signal A sys 3 1 telephony A caller id kJ cpt C dtmf det Ca dtmf gen E 9165 a o 11 Ga G726 A telephony Data 3 tools a a Ea F E E F Figure 2 2 DSP56824 Directories The cpt directory includes algorithms specific to CPT Detection Figure 2 3 shows the cpt directory structure EMU telephony WO calerid EO cp H Ap M Asm Sources of C Sources A cpt Data Figure
10. 440 3 Bursts Tone Con 0 7 0 1 Sec p i firmation On 0 1 Sec a a Tone off then steady On Line Busy 480 620 0 5 Sec On 4 1 5 0 5 Sec off se repeating Re order 480 620 0 25 Sec 1 5 On 0 25 52 to 21 Sec off dbm repeating Audible 440 480 2 Sec On Ringing 4 1 6 4 Sec off gen 8 repeating 1 2 2 Features and Performance The CPT 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 CPT Detection Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 2 Directory Structure 2 1 Required Core Directories Figure 2 1 details required platform directories m sci H dsp56803evm 1 1 dsp56805evm EC dsp56824evm F 8 nos applications bsp buildall Data A config E include 3 modem A security 3 signal a sys 3 telephony E tools F FF Figure 2 1 Core Directories As shown in Figure 2 1 DSP56824EVM has no operating system nos support and contains these core directories applications contains applications software that can be exercised on this platform bsp contains board support package specific for
11. CHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 About This Document This manual describes the CPT Detection algorithm for use with Motorola s Embedded Software Development Kit SDK Audience This document targets software developers implementing CPT 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 reguired core directories Chapter 3 CPT Detection Library Interfaces describes all of the CPT Detection Library functions Chapter 4 Building the CPT Library tells how to execute the system library project build Chapter 5 Linking Applications with the CPT Library describes the organization of the CPT Detection Library Chapter 6 CPT Detection Applications describes the use of the CPT Detection Library through test demo applications Chapter 7 License provides the license reguired 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 ix For More Information On This Product Go to www freescale com Freescale Semiconductor Inc ARCHIVED BY FREESCALE S
12. CPTDet sConfigure if pConfig NULL assert Out of memory Initialize the callback function plonfig gt CPTDetCallback pCallback CPTDetCallback Create anbd initialize the pConfig structure pCPTDet CPTDetCreate pConfig This itself calls CPTDetInit function NumSamples BUFSIZE result CPTDetection pCPTDet SampleBuf NumSamples MOTOROLA CPT Detection Library Interfaces 3 11 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 CPT Detection Library in Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 4 CPTDetDestroy Call s void CPTDetDestroy CPTDet sHandle pCPTDet Reguired Header cptdet h Arguments Table 3 4 CPTDetDestroy Arguments pCPTDet in Handle to an instance of CPT Detect created by a call to CPTDetCreate Description The CPTDetDestroy function frees the instance of CPTDetect originally created by a call to CPTDetCreate Returns None Special Considerations None Code Example 3 7 Use of CPTDeiDestroy Interface include cptdet h include mem h define BUFSIZE 160 Function prototypes void CPTDetCallback void pCallbackArg UWordl6 return value void test CPTdet void Result result UWord16 NumSamples Word16 SampleBuf 160 CPTDet_sHandle pCPTDet CPTDet sConfigure pConfig pConfig CPTDet s
13. Configure memMallocEM sizeof CPTDet sConfigure if pConfig NULL assert Out of memory Initialize the callback function plonfig gt CPTDetCallback pCallback CPTDetCallback Create and initialize the pConfig structure pCPTDet CPTDetCreate pConfig This itself calls CPTDetlnit function NumSamples BUFSIZE result CPTDetection pCPTDet SampleBuf NumSamples CPTDetDestroy pCPTDet 3 12 CPT Detection Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 4 Building the CPT Library 4 1 Building the CPT Library The CPT library combines all of the components described in previous sections into one library cpt lib To build this library a Metrowerks CodeWarrior project cpt mcp is provided This project and all the necessary components to build the CPT Generation library are located in the nos telephony cpt directory of the SDK directory structure There are two methods to execute a system library project build dependency build and direct build 4 1 1 Dependency Build Dependency build is the easiest approach and requires no additional work on the user s part If you add the CPT library project cpt mcp to your application project as shown in Figure 4 1 the CPT library will automatically build when the app
14. DUCT 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 License 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 o
15. EMICONDUCTOR INC 2005 Conventions This document uses the following notational conventions Typeface Symbol or Term Meaning Examples Courier Monospaced Type Commands command parameters code examples expressions datatypes and directives Foundational include files a data structure of type vad tConfigure ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Italic Calls functions statements the pConfig argument ann e defined in the C header file aec h arguments file names an applications makes a call to the Callback procedure Bold Reference sources paths refer to the Targeting DSP56824 Platform emphasis manual see C Program Files Motorola Embedded SDK help tutorials Bold ltalic 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 3V positive value unless preceded 10 by a minus symbol to signify a i negative value DES ALL CAPITAL Variables directives defined INCLUDE DSPFUNC LETTERS constants files libraries define INCLUDE STACK CHECK Brackets Function keys by pressing function key F7 Quotation marks Returned messages the message Test Passed is display
16. FREESCALE SEMICONDUCTOR INC 2005 List of Tables Table 1 1 Table 3 1 Table 3 2 Table 3 3 Table 3 4 MOTOROLA Tope ju ili wk ak P lk ak e pe l ak a eee pk ka e ak pp e ELE TO IN API MIN w dok aa a aa anko a ae vo kaka ak eres db s OY P e ese kes CPTDetectio MMS scknakakasskadusak s kokakckdd na kk ek CPTDetDesitoy AIG ia da b nes kai dako da PAVE Dade A YA kdk List of Tables For More Information On This Product Go to www freescale com Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 CPT Detection Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 List of Figures Figure 2 1 Figure 2 2 Figure 2 3 Figure 2 4 Figure 2 5 Figure 4 1 Figure 4 2 Figure 4 3 MOTOROLA Core OTO ON ii kl v d beth e kai n a a ki pd ka e pk EE SA DON ONA va a ae ea ii a esa cat LETAN SANON aa deh a pa O a e ia SDK Application Directory Structure w w ase vans kaka ane tk ase sake kkasaon CPT Detection Demo Directory Oo 62 46 46 kan sasa na skisass rn kies Dependency Build for CPT Detection Library ss va vas sea n ava ens wa vas sos PD P s by be ai Ga ba p ke deh eh s t tee Pze Mako 92565556945 4552565455984 596 654866926 Cash eHs Hoes SES List of Figures For
17. Freescale Semiconductor Inc MOTOROLA Embedded SDK Software Development Kit CPT Detection Library SDK123 D Rev 2 07 17 2002 afe vis MOTOROLA IA Motorola Inc 2002 All rights reserved intelligence everywhere digitaldna For More Information On This Product o to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Contents About This Document A uk au n kk ee ee r ka E ee ee ai bodn 1X A P R O E O O a a ti a at ve OS 1X Suggested KOndho 645 ki ai ei a a dak a ae a a a a ke aka Kika k aka K a da da ix LAN A AA ON EEE E E E E E S E E Seer AYEN X Definitions Acronyms and Abbreviations 44244020dseieaserasienaeenes X o ee XI Chapter 1 Introduction a NO FIO fib e ned a yi a beta nase ee O O PAN ON OE ee ke 1 1 12 verven o CPT DOO key aa e ween Gk e a Ghee eee es 1 1 1 2 1 Z kom E EE E S E E E E E E E E E E 1 1 122 PR and Pec d ka kG a oe bs ws Sh Rh ho ews es 1 2 Chapter 2 Directory Structure Zak Required Core Directories vasv bidla as skud are at i igerri ii d kwape 2 1 2 2 Optional Domain Specific Directories w sea ves sussuru nearen 2 2 23 Demo Directory R kk aw k a rritet at EN o do V
18. Int16 result ptr Int16 frame info 4 CPTDet_sHandle BRK ok K ke KKK KR KKK ke ke ke ke Ke kk KKK Function Prototypes Je ake ake ake ae k kok k k k k kk ke kk kk kk kk kk EXPORT CPTDet sHandle CPTDetCreate CPTDet sConfigure pConfig EXPORT void CPTDetInit CPTDet sHandle pCPTDet CPTDet sConfigure pConfig EXPORT Result CPTDetection CPTDet sHandle pCPTDet Word16 pSamples UWord16 NumberSamples EXPORT void CPTDetDestroy CPTDet sHandle pCPTDet endif MOTOROLA CPT Detection Library Interfaces 3 3 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 CPT Detection Library in Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 Specifications The following pages describe the CPT 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 Typically inout parameters are input pointer variables in which the caller passes the address of a pre allocated data structure to a function The function stores its results within that data structure The actual value of the inout pointer parameter is n
19. LENGTH 0x0A00 hole data RW ORIGIN 0x2000 LENGTH 0xC000 data segment em RW ORIGIN 0xE000 LENGTH 0x1000 data 3 stack RW ORIGIN 0xF000 LENGTH 0x0F80 stack onchipl RW ORIGIN OxFF80 LENGTH 0x0040 on chip peripheral registers onchip2 RW ORIGIN OxFFCO LENGTH 0x0040 on chip peripheral registers FORCE ACTIVE FconfigInterruptVector SECTIONS Data X Memory Layout EX BIT 0 Internal Memory Partitions for mem h partitions NUM IM PARTITIONS 2 iml and im2 External Memory Partition for mem h partitions NUM EM PARTITIONS 1 em main application code gt text sections config c MUST be placed first otherwise the Interrupt Vector configInterruptVe address P 0x0000 text rtlib text fp engine text user text FTP pram main application data Define variables F Xdata start addr ctor will not be located at the correct for C initialization code in ROM ADDR rom SIZEOF rom 23 F StackAddr ADDR stack ADDR stack F_StackEndAddr SIZEOF stack 2 1 F Xdata start addr in RAM Memory layout data for SDK INCLUDE MEMORY mem h support FmemEXbit WRITEH _EX_BIT FmemNumIMpartitions WRITEH NUM IM PARTITIONS FmemNumEMpartitions 5 2 CPT Detection Library MOTOROLA
20. PT Detection demo Figure 2 5 the shows directory structure of demo_cpt MOTOROLA Directory Structure 2 3 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Directory Structure 3 1 telephony 5 14 demo cpt G Asm Sources a C Sources Config E Debug F demo cpt Data Figure 2 5 CPT Detection Demo Directory Structure e demo cpt includes the C sources and configuration necessary for testing CPT Detection demo modules C Sources contains an example demo code for CPT Detection Config contains configuration files appconfig c appconfig h and linker cmd specific to CPT Detection demo 2 4 CPT Detection Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 3 CPT Detection Library Interfaces 3 1 CPT Detection Services The detection of Call Progress Tones CPT is used in the telephone network The aim is to detect a signal comprised of two frequencies that represent a specific tone 3 2 Interface The C interface for the CPT Detection library services is defined in the C header file cptdet shown in Code Example 3 1 as a reference Code Example 3 1 C Header File cptdet SDK defines the C
21. PT Detection library CPT Detection Library cpt lib The interfaces and services that they provide are described below File cptdet h ifndef _cptdet_H define _cptdet_H Definitiones Used The variable return value used in CPTDet sCallback below uses one of the following definitions R define DIAL TONE DETECTED 0x11 tdefine MSG WAITING TONE DETECTED 0x12 define RECALL DIAL TONE DETECTED 0x13 define BUSY TONE DETECTED 0x14 tdefine REORDER TONE DETECTED 0x15 define RINGING TONE DETECTED Ox16 defines to be used by CPT detect algorithm only define NO FIL 10 define ANA BUF SIZE 104 define LAST BUF SIZE 24 MOTOROLA CPT Detection Library Interfaces 3 1 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 CPT Detection Library in Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 define NO FIL CPT 6 define NC CPT 80 S EE EK K Kk k k KK KK ke k ke ke ke Ke kk k k kk kk Foundational Include Files Je ake ake ake ake k kok k k k k k k ke ke kk KK kk kk kk include port h BRK a a ai ata a a a o a a a ka ka ka a ka a ka ka a A k ka tata a a ia aa a ba ka a ba ka kaka k IK Structure for CPT Detector Callback Be ake ake ake ae ok oko Fe A k kok A ee Fe A Fe Ke oko k kok ko
22. amples CPTDetDestroy should be called to destroy the instance s of CPT which are created by a CPTDetCreate function 5 1 1 Library Sections The CPT Library contains the following data ROM section that needs to be placed in memory through linker command file cpt data Data ROM See Link Code Example 5 1 for a sample linker cmd file which may be used for testing the DES library Code Example 5 1 inker 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 OxFF80 external program memory avail RW ORIGIN 0x0000 LENGTH 0x0030 available cwregs RW ORIGIN 0x0030 LENGTH 0x0010 C temp registrs in CodeWarrior iml RW ORIGIN 0x0040 LENGTH 0x07C0 data 1 rom R ORIGIN 0x0800 LENGTH 0x0800 internal data ROM MOTOROLA Linking Applications with the CPT Library 5 1 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Linking Applications with Fr epscal Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 im2 RW ORIGIN 0x1000 LENGTH 0x0600 data 2 hole R ORIGIN 0x1600
23. ccur 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
24. ction Call s Result CPTDetection CPTDet sHandle pCPTDet Wordl6 pSamples UWord16 NumSamples Specifications Required Header cptdet h Arguments Table 3 3 CPTDetection Arguments pCPTDet in Handle to an instance of CPT Detection pSamples in Pointer to Input buffer containing 16 bit linear PCM samples which are in 1 15 Q15 format NumSamples in The number of CPT samples as input Description The CPTDetection function detects whether the CPT input samples represent a Valid Tone the samples are in 1 15 format Returns Upon successful detection CPTDetection calls then passes the detected tone to the callback function If a tone is detected CPTDetection will return PASS to the calling function otherwise it returns FAIL Special Considerations The CPTDetection function expects linear 16bit PCM samples sampled at 8 KHz only As soon as a valid CPT is detected this function calls the user callback procedure and exits from further processing of samples Code Example 3 6 Use of CPTDetection Interface include cptdet h include mem h define BUFSIZE 160 Function prototypes void CPTDetCallback void pCallbackArg UWordl6 return value void test CPTdet void Result result UWord16 NumSamples Word16 SampleBuf 160 CPTDet sHandle pCPTDet CPTDet sConfigure pConfig pConfig CPTDet sConfigure memMallocEM sizeof
25. ed Jf 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 CPT Call Progress Tone DSP Digital Signal Processor or Digital Signal Processing VO Input Output IDE Integrated Development Environment LSB Least Significant Bit X CPT Detection Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 MAC MIPS MSB SDK SRC References Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Multiply Accumulate Million Instructions Per Second Most Significant Bit Software Development Kit Source The following sources were referenced to produce this book 1 DSP56800 Family Manual DSP56800FM AD 2 DSP56824 User s Manual DSP56824UM AD 3 Embedded SDK Programmer s Guide MOTOROLA Preface For More Information On This Product Go to www freescale com Xi Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 xii Freesca
26. est and Demo Applications To verify the CPT Detection 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 CPT Detection Applications 6 1 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 M Applicatio 6 ee scale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 6 2 CPT Detection Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 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
27. f the part Motorola and the Stylized M Logo are registered trademarks of Motorola Inc Motorola Inc is an Egual Opportunity Affirmative Action Employer MOTOROLA and the Stylized M Logo are registered in the US Patent amp Trademark Office All other product or service names are the property of their respective owners 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 MOTOROLA For More Information On This Product SDK123 D Go to www freescale com
28. itecture If you are developing an application for a DSP56824EVM board or any other DSP56824 development system refer to the Targeting DSP56824 Platform manual for Quick Start or other information specific to the DSP56824 1 2 Overview of CPT Detection The detection of Call Progress Tones CPT is used in the telephone network The aim is to detect a signal comprised of two freguencies that represent a specific tone The present CPT library complies with the North American Telecom standards 1 2 1 Background CPT is a set of tones which are used to indicate the current status of a call A computer system that has a DSP and is eguipped for phone line communications can use the DSP for generating and decoding CPT signals and for handling typical DSP functions Each tone consists of two frequencies and a specific temporal pattern ON amp OFF periods The specifications of each tone are listed in Table 1 1 MOTOROLA Introduction 1 1 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Introduction Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Table 1 1 Tone Specifications Signal Frequency Temporal a Name Hz Pattern Amplitude Dial Tone 350 440 Steady On 29 to 10 0 7 dbm Message 350 440 10 Bursts Waiting 0 7 0 1SecOn i Indicator 0 1 Sec off ee Tone then steady On Recall Dial 350
29. k ko kok kk kk kek f typedef struct void pCallback void pCallbackArg UWord16 return value void pCallbackArg CPTDet sCallback J EE ba a a kok ok ke ta ia ia a a A ba a a ka kaka ka a ia ka tata k a a a ba ba a ba k kaka k ka IK Structure for CPT Detector Configuration e ake ake ake K KARA A k ok ee k Fe k ok k kkk k kk kok ko kkk kk I I k f typedef struct CPTDet_sCallback CPTDetCallback CPTDet_sConfigure BRK KKK KKK KKK a ka ka a AK AK KI ba ka a ba I k I k k k Structure for CPT Detector Handle KAK ake KARA A ko k AA AA kok kk kk kk I I f typedef struct CPTDet sCallback pCallback Int16 alfa Int16 cpt on timer Int16 cpt off timer Int16 cpt state Int16 cpt last on Int16 cpt last off Int16 cpt status Int16 cpt bursts Int16 cpt last state Int16 cpt last code Int16 cpt last group Int16 previous cpt Int16 sil on timer Int16 sil off timer Int16 sil status Int16 cpt level 2 3 2 CPT Detection Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc Interface ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Int16 n e 2 Int16 decimate flag UWordl6 psik Int16 loop cntr Int16 mg energy NO FIL CPT UWordl6 psig energy Int16 ANA BUF NC CPT Int16 shift count Int16 ana buf ptr Int16 ana buf count
30. lar 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 o
31. le Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 CPT Detection Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 1 Introduction Welcome to Motorola s Family of Digital Signal Processors DSPs This document describes the Call Progress Tone CPT 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 CPT Detection Library interface and algorithms Motorola provides these algorithms to you for use on the Motorola DSPs to expedite your application development and reduce the time it takes to bring your own products to market Motorola s CPT Detection Library is licensed for your use 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 Embedded SDK is targeted to a large variety of hardware platforms To take full advantage of a particular hardware platform use Ouick Start from the Targeting DSP568xx Platform documentation For example Targeting DSP56824 Platform manual provides more specific information and examples about this hardware arch
32. lication is built MOTOROLA Building the CPT Library 4 1 For More Information On This Product Go to www freescale com i ductor Inc emicon Freescale S ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Building the CPT Library Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 File Edit Search Project Debug DSP56800 Window Help EEA eA ERR EER E demo cpt mcp Bile x Link Order Targets application la NA M gt a Dependencies DO 9KO MK m Bi HC SDK Configuration 79 D se SDK Projects 0 0 AB bsp mcp Do nfa na B sys mep n a n a tools mcp Do nfa m BB dspfunc mep Do onna n a Mi cptmep po ona n a SESOK Libs 55K 6K ON bspiib 7636 554 i 5950 438 1344 dspfuno lib 39314 SAS cpt lib DO 2300 BC MSL aK FH C Sources Do 287 A EL Figure 4 1 Dependency Build for CPT Detection Library 4 1 2 Direct Build Direct build allows you to build the CPT Detection library independently of any other build Follow these steps Step 1 Open cpt mcp project as shown in Figure 4 2 BE cpt mcp EP X Link Order Targets LEZ la OS f mE API gt Asm Sources JOUICES m 9 files 2K 280 V Figure 4 2 cpt 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 4 2 CPT Detection Library MOTOROLA For More Information On This Product Go t
33. o www freescale com Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 48 Library Freescale Semiconductor Metrowerks CodeWarrior Project m cpt mcp Link On M ake fiti ap BTC B FETE AK Eine mitini BAT DENUA Figure 4 3 Execute Make INC4 jitding the CPT Library ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 At this point the if build is successful the cpt lib library file is created in the mosVelephony epi Debug directory MOTOROLA Building the CPT Library For More Information On This Product Go to www freescale com 4 3 ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Building the CPT Library Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 4 4 CPT Detection Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 5 Linking Applications with the CPT Library 5 1 CPT Library The CPT library includes APIs which provide interface between the user application and the CPT modules To invoke CPT Detection APIs must be called in this order CPTDetCreate should be called to create an instance s of CPT CPTDetInit called within the CPTDetCreate function CPTDetection can be called per the number of s
34. oo r BC es 2 3 Chapter 3 CPT Detection Library Interfaces 3 1 CPT Dahon SONIS ai koka di need dl a ak e e ale a ak kk ka l a a ak F aa A a 3 1 3 2 r 63 5 k E EE San EEE A ese 3 1 33 PE KONDO a kob di Re kek da k e ap ak pet ok n ki kip ak ki pk A kap 3 4 Dude KE TENN NA a ii b l r E NEEE EE AEAEE ETET 3 5 3 3 2 PIDE ene ea ayen an sack hk kosa 3 8 A KI TIN 0 ew ie ya v okay PRS E YO ENG E V648 c 4V 66 3 11 3 3 4 DAUR IR O R ai ak O O a a ki A id eds 3 12 Chapter 4 Building the CPT Library 4 1 Pons the CPI w so og ok ee 8 6S 5 4 W W W REPA eee W 4 1 4 1 1 Don DANN L a koke E EE A kak Aki e AAA A 4 1 4 1 2 Dice eee kas ko ae a k bo e er dik aka kon 4 2 MOTOROLA Table of Contents For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Chapter 5 Linking Applications with the CPT Library IA VET LM E ao E E AE DEE E A ES e E E T EE Avi 2 4k DANN OOM ad seks A ar esc kode cad 66 A k d SAN YE Chapter 6 CPT Detection Applications 6 1 Test and Demo Applications kk ka ak kri a a ok kd a l aka a a kr n Chapter 7 License FA Limited Use Ligene Agreement 42 hoes sce eeree cies P S AY n EREET ji CPT Detection Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY
35. ot changed 3 4 CPT Detection Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 1 CPTDetCreate Call s Specifications EXPORT CPTDet sHandle CPTDetCreate CPTDet sConfigure pConfig Reguired Header cptdet h Arguments Table 3 1 CPTDetCreate Arguments pConfig in Points to the configuration data for CPT Detection Description The CPTDetCreate function creates an instance of the CPT Detection The pConfig argument points to CPTDet sConfigure the structure used to configure CPT Detection operation For initialization of the CPTDet_sConfigure structure please refer to CPTDetlnit Section 3 3 2 A total of 134 words are allocated per instance This function itself calls the CPTDetlnit function so the user need not call CPTDetlnit The library allocates dynamic memory using the mem library shown in Code Example 3 2 The CPT library is multichannel and re entrant Code Example 3 2 mem Library include arch h include mem h include cptdet h CPTDet sHandle CPTDetCreate CPTDet sConfigure pConfig CPTDet_sHandle pCPTDet bool flag true pCPTDet CPTDet_sHandle memMallocEM sizeof CPTDet_sHandle if pCPTDet NULL return NULL pCPTDet gt psig energy UWord1l6 memMallocAlignedEM
36. relative to the subject matter of this Agreement 7 2 CPT Detection Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Index C CPT x 1 1 CPT Detection 1 1 cpt data 5 1 CPTDetCreate 3 5 CPTDetDestroy 3 12 CPTDetection 3 11 CPTDetlnit 3 8 D DSP x DSP56800 Family Manual xi DSP56824 User s Manual xi E Embedded SDK Programmers Guide xi I I O x IDE x LSB x M MAC xi MIPS xi MSB xi S SDK xi SRC xi MOTOROLA Index For More Information On This Product Go to www freescale com Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 CPT Detection Library For More Information On This Product Go to www freescale com MOTOROLA ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 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 particu
37. tInit CPTDet sHandle pCPTDet CPTDet sConfigure pConfig Reguired Header cptdet h Arguments Table 3 2 CPTDetlnit Arguments pCPTDet in Handle to an instance of CPT Detection pConfig in A pointer to a data structure containing data for initializing the CPT Detection algorithm Description The CPTDerlnit function will initialize the CPT Detection algorithm Before calling the CPTDetlnit function a CPT instance must be created either by calling the CPTDetCreate function see Section 3 3 1 or by allocating the memory statically which does not require calling the CPTDetCreate function Section 3 3 1 also offers details on dynamic and static memory allocation During initialization all resources will be set to their initial values in preparation for CPT Detection operation The parameter pConfig points to a data structure of type CPTDet_sConfigure its fields initialize CPT Detection operation in the following manner Callback A structure of type CPTDet sCallback it describes the procedure CPT detect will call once a valid CPT is detected void pCallback void pCallbackArg UWordl6 return value The callback procedure parameter pCallbackArg is supplied by the user in the CPTDet 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 the user must write
38. y allocated Returns A pointer to an instance of CPT Detection Special Considerations e The CPT application is multichannel and re entrant e If CPTDetCreate is called then the user need not call CPTDerlnit function as it is called internally in the CPTDetCreate function Code Example 3 3 Use of CPTDetCreate Interface include cptdet h include mem h Function prototypes void CPTDetCallback void pCallbackArg UWordl6 return value void test CPTdet void CPTDet_sHandle pCPTDet CPTDet_sConfigure pConfig pConfig CPTDet sConfigure memMallocEM sizeof CPTDet_sConfigure if pConfig NULL assert Out of memory Initialize the callback function pClonfig gt CPTDetCallback pCallback CPTDetCallback 3 6 CPT Detection Library MOTOROLA For More Information On This Product Go to www freescale com ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 pCPTDet CPTDetCreate pConfig Create and initialize the pConfig structure pCPTDet CPTDetCreate pConfig MOTOROLA CPT Detection Library Interfaces For More Information On This Product Go to www freescale com Specifications 3 7 ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 CPT Detection Library in Freescale Semiconductor Inc ARCHIVED BY FREESCALE SEMICONDUCTOR INC 2005 3 3 2 CPTDetlnit Call s Result CPTDe

Download Pdf Manuals

image

Related Search

Related Contents

Husky TF2912 Instructions / Assembly  Samsung GT-B7330 دليل المستخدم  the user manual for this site here.  Toshiba Total Storage Platform  DESIGN & TECHNICAL MANUAL  1 - Dodge  Samsung CLP-310 Užívateľská príručka  FY-60MTV3 の取扱説明書  TN-5508A/5510A Series Hardware Installation Guide  FM489 User Manual  

Copyright © All rights reserved.
Failed to retrieve file