⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 common.h

📁 seed的滤波器设计程序
💻 H
字号:
/*****************************************************************//* Copyright (c) Texas Instruments, Incorporated  2000           *//*****************************************************************//******************************************************************************/
/******************************************************************************/
/*  COMMON.H - This file contains macros and data structures used to implement */
/*             the fifo.                                                      *
/*                                                                            */
/*                                                                            */
/******************************************************************************/
#ifndef _COMMON_H_
#define _COMMON_H_

#include <type.h>

/*----------------------------------------------------------------------------*/
/* MACRO DEFINITIONS                                                          */
/*----------------------------------------------------------------------------*/
#define OK                       0
#undef  ERROR
#define ERROR                   -1

#define CLOSED                   0
#define OPEN                     1
#define BUSY                     2


//these two will be properly defined later
#define  FIFO_ADDR               0x043a
//#define  CIO_ADDR                0x02fe 

#define FIFO_SIZE                32

#define ABORT                    -2

/*----------------------------------------------------------------------------*/
/* ERROR CODES                                                                */
/*----------------------------------------------------------------------------*/
#define ERR_BOARD_NOT_INITIALIZED  -1
#define ERR_CODEC_NOT_OPENED       -2
#define ERR_INVALID_CMD            -5


typedef struct _FifoChannel{
   u16	state;					   //indicates state of I/O 
   u16	takePtr;				   //ptr to end of written data
   u16	putPtr;					   //ptr to beginning of non-read data
   u16	data[FIFO_SIZE];		   //fifo buffer
} FifoChannel, *PFifoChannel;

typedef struct _FIFO {
   FifoChannel dsp_ch;
   FifoChannel host_ch;
} FIFO, *PFIFO;

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -