?? ale.h
字號:
///////////////////////////////////////////////////////////////////////////////
//
//
// Experiment 4.5_BF537 Adaptive line enhancer (ALE) with BF537 EZ-KIT
// FILE name: ALE.h
//
// Description: Perform real-time ALE to remove noisy signal.
// Header file to perform necessary variable declaration
//
// For the book "Embedded Signal Processing with the Micro Signal Architecture"
// By Woon-Seng Gan and Sen M. Kuo
// Publisher: John Wiley and Sons, Inc.
//
// Tools used: VisualDSP++ v4.0 (running on BF537 EZ-KIT)
//
///////////////////////////////////////////////////////////////////////////////
#ifndef __ALE_DEFINED
#define __ALE_DEFINED
#ifndef ETSI_SOURCE
#define ETSI_SOURCE
#endif
//--------------------------------------------------------------------------//
// Header files //
//--------------------------------------------------------------------------//
#include <sys\exception.h>
#include <cdefBF537.h>
#include <fract.h>
#include <filter.h>
#include <sysreg.h>
#include <ccblkfn.h>
#include <stats.h>
#include <libetsi.h>
//--------------------------------------------------------------------------//
// Symbolic constants //
//--------------------------------------------------------------------------//
// names for registers in AD1854/AD187 converters
#define INTERNAL_ADC_L0 0
#define INTERNAL_ADC_R0 1
#define INTERNAL_DAC_L0 0
#define INTERNAL_DAC_R0 1
#define delay 0xf00
// SPORT0 word length
#define SLEN_24 0x0017
// DMA flow mode
#define FLOW_1 0x1000
//--------------------------------------------------------------------------//
// Global variables //
//--------------------------------------------------------------------------//
#define INPUT_SIZE 256
#define TOTAL_FRAME 2
#define TAPS 32
#define DELAY_SIZE 100
#define BETA 0x0080 // 1/256
#define BETA1 0x7F80 // 1-(1/256)
extern short sCh0LeftIn[];
extern short sCh0RightIn[];
extern short sCh0LeftOut[];;
extern short sCh0RightOut[];
extern int iRxBuffer1[];
extern int iTxBuffer1[];
extern fract16 coefL[];
extern fract16 coefR[];
extern fract16 lmsdelayL[];
extern fract16 lmsdelayR[];
extern unsigned char ucMode;
#define OUT1 0x4 // Passthrough mode
#define OUT2 0x8 // Prediction (adaptive filter output)
#define OUT3 0x10 // Error (input-prediction)
extern fract16 LMSOutPredL[];
extern fract16 LMSOutPredR[];
extern fract16 LMSOutErrL[];
extern fract16 LMSOutErrR[];
extern fir_state_fr16 firstateL;
extern fir_state_fr16 firstateR;
extern fract16 firdelayL[];
extern fract16 firdelayR[];
//--------------------------------------------------------------------------//
// Prototypes //
//--------------------------------------------------------------------------//
// in file Initialize.c
void Init_Flags(void);
void Audio_Reset(void);
void Init_Sport0(void);
void Init_DMA(void);
void Init_Interrupts(void);
void Init_PF(void);
void Init_Filter(void);
void Enable_DMA_Sport0(void);
// in file Process_data.c
void Process_Data(void);
// in file ISRs.c
EX_INTERRUPT_HANDLER(Sport0_RX_ISR);
EX_INTERRUPT_HANDLER(Switch_ISR);
#endif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -