📄 ofdm_old.h
字号:
//ofdm.h
//Group Red 2002
//
#ifndef OFDM
#define OFDM
#define _TI_ENHANCED_MATH_H 1
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <dma.h> /* TMS320C6x Peripheral Support Library DMA Support */
#include <intr.h> /* TMS320C6x Peripheral Support Library Interrupt Support */
#include <mcbsp.h> /* TMS320C6x Peripheral Support Library McBSP Support */
#include <regs.h> /* TMS320C6x Peripheral Support Library CPU Register Support */
#include <board.h> /* TMS320C6x Peripheral Support Library Board Support */
#include <codec.h> /* Codec Library API Functions */
//Get data from host
#define FillHostBuffer1_MM 1
#define FillHostBuffer2_MM 2
#define HostBufferSize 10 //numbers of 32 bit segments in each HostBuffer
#define HostBufferBitLength (HostBufferSize*32) //numbers of bits in HostBuffer
extern volatile unsigned int HostBuffer1[HostBufferSize]; //buffer 1
extern volatile unsigned int HostBuffer2[HostBufferSize]; //buffer 2
extern volatile unsigned int *CurrentHostBuffer; //current buffer used
//codec
#define SAMPLING_FREQ 8000
#define MIC_SELECT 1 /* Input source: Mic-1, Line-0 */
//fft
#define FFT_SIZE 256
#define PREFIX_LENGTH 32
#define BUFFER_SIZE FFT_SIZE
#define BLOCK_SIZE BUFFER_SIZE * 2 /* Total number of both left and right short elements in a buffer */
#define NR_OF_CHANNELS (FFT_SIZE/2 -1) //Number of channels
#define FRAME_LENGTH (PREFIX_LENGTH + BLOCK_SIZE)
#define N FFT_SIZE /* N point DFT */
#define n 16 /* Size of index, calculate using formula in bitrev.asm */
#define PI 3.14159265358979323846264338327950288419716939937510
#define DELTA 2 * PI / N
#define ONE_OVER_SQRT_N 0.0625 /* 1/sqrt(N) */
//modulation
#define QAM_AMPLITUDE 1000 // bit amplitude
//extern short InBuffer1[BLOCK_SIZE];
//extern short InBuffer2[BLOCK_SIZE];
//extern short OutBuffer1[10*BLOCK_SIZE];
//extern short OutBuffer2[BLOCK_SIZE];
//extern short *InBufferPtr;
//extern short *OutBufferPtr;
extern volatile float signalf[BLOCK_SIZE];
extern float dft[N]; /* Number of coefficients needed for the DFT routine is N */
extern float idft[N]; /* Number of coefficients needed for the IDFT routine is N */
extern const short index[n];
extern int exponent2;
#define TRUE 1
#define FALSE 0
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -