Application Programming Interface (API)
EXAMPLE 4-2:
LIBRARY USAGE EXAMPLE
// Channel 1 memory structures.
int ecStateMemX1 [EC_XSTATE_MEM_SIZE_INT]
// Channel 2 memory structures
int ecStateMemX2 [EC_XSTATE_MEM_SIZE_INT]
_XBSS(2); /* Step 2 */
_XBSS(2); /* Step 2 */
// Each instance can share the same X and Y scratch memory
int ecScratchX [EC_XSCRATCH_MEM_SIZE_INT] _XBSS(2); /* Step 3 */
int ecScratchY [EC_YSCRATCH_MEM_SIZE_INT] _YBSS(2); /* Step 3 */
.
.
.
void main()
{
EC_init(ecStateMemX1, ecScratchX, EC_ORDER); /* Step 4 */
EC_init(ecStateMemX2, ecScratchX, EC_ORDER); /* Step 4 */
.
.
.
While(1)
{
EC_apply(ecStateMemX1, ecScratchY, nearEndIn1, farEndIn1, EC_TRUE); /* Step 5 */
EC_applyNLP(ecStateMemX1, nearEndIn1, EC_TRUE); /* Step 6 */
EC_apply(ecStateMemX2, ecScratchY, nearEndIn2, farEndIn2, EC_TRUE); /* Step 5 */
EC_applyNLP(ecStateMemX2, nearEndIn2, EC_TRUE); /* Step 6 */
}
}
4.5
REGISTER USAGE
The dsPIC DSC Acoustic Echo Cancellation Library uses and modifies the MODCON,
CORCON, XMODSRT, XMODEND, YMODSRT, YMODEND, and PSVPAG registers.
These registers are saved and restored to their original values after the library has used
them. If these registers are modified by the application in an Interrupt Service
Routine (ISR), the application must save and restore these registers while entering and
exiting the ISR. This will prevent the ISR from corrupting the execution context,
especially if the interrupt has occurred while a library function is executing.
An ISR may access constants in program memory through a Program Space
Visibility (PSV) read operation. In case of dsPIC33F, it is suggested that the application
explicitly manage PSV operations while using the AEC library. The application should
ensure that PSV access is enabled and that the PSVPAG register contains the required
value. In case of dsPIC33E, the library does not use PSV.
? 2004-2011 Microchip Technology Inc.
DS70134F-page 37
相关PDF资料
ACM-16 CABLE MODULE FR3 16BIT 40-DIP
ACM-2X8 ACTIVE CABLE MODULE DUAL 8 BIT
ACM-8 CABLE MODULE FR3 8BIT 28/32-DIP
ACS9510EVB EVALUATION BOARD FOR ACS9510
ACS9550EVB EVALUATION BOARD FOR ACS9550
ACS9593EVB EVALUATION BOARD FOR ACS9593
AD-CCES-CORP-UNL CORP LICENSE FOR CCES UNLIMITED
AD-UCFS-SPRD PRD LIC UCFS CORE CCES 1 PROD
相关代理商/技术参数
AC300031 制造商:Microchip Technology Inc 功能描述:ACOUSTIC ACCESSORY KIT SPEECH RECOGNITION - Boxed Product (Development Kits) 制造商:Microchip Technology Inc 功能描述:SPEECH RECOGNIZE KIT ACOUSTIC
AC3000-52 制造商:GE Energy (formerly Lineage Power) 功能描述:Front-End Power Supply 制造商:Lineage Power 功能描述:Front-End Power Supply
AC3000A 制造商:Black Box Corporation 功能描述:HD VIEW TRANSMITTER
AC3000A-R2 制造商:Black Box Corporation 功能描述:HD VIEW TRANSMITTER
AC3000A-R2-W1 制造商:Black Box Corporation 功能描述:1 YEAR WARRANTY FOR AC3000A-R2
AC3000A-R2-W3 制造商:Black Box Corporation 功能描述:3 YEAR WARRANTY FOR AC3000A-R2
AC3000A-W1 制造商:Black Box Corporation 功能描述:1 year warranty for AC3000A
AC3000A-W3 制造商:Black Box Corporation 功能描述:3 year warranty for AC3000A