Path: blob/master/drivers/isdn/hardware/eicon/dfifo.h
15115 views
1/*2*3Copyright (c) Eicon Networks, 2002.4*5This source file is supplied for the use with6Eicon Networks range of DIVA Server Adapters.7*8Eicon File Revision : 2.19*10This program is free software; you can redistribute it and/or modify11it under the terms of the GNU General Public License as published by12the Free Software Foundation; either version 2, or (at your option)13any later version.14*15This program is distributed in the hope that it will be useful,16but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY17implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.18See the GNU General Public License for more details.19*20You should have received a copy of the GNU General Public License21along with this program; if not, write to the Free Software22Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.23*24*/25#ifndef __DIVA_IDI_DFIFO_INC__26#define __DIVA_IDI_DFIFO_INC__27#define DIVA_DFIFO_CACHE_SZ 64 /* Used to isolate pipe from28rest of the world29should be divisible by 430*/31#define DIVA_DFIFO_RAW_SZ (2512*8)32#define DIVA_DFIFO_DATA_SZ 6833#define DIVA_DFIFO_HDR_SZ 434#define DIVA_DFIFO_SEGMENT_SZ (DIVA_DFIFO_DATA_SZ+DIVA_DFIFO_HDR_SZ)35#define DIVA_DFIFO_SEGMENTS ((DIVA_DFIFO_RAW_SZ)/(DIVA_DFIFO_SEGMENT_SZ)+1)36#define DIVA_DFIFO_MEM_SZ (\37(DIVA_DFIFO_SEGMENT_SZ)*(DIVA_DFIFO_SEGMENTS)+\38(DIVA_DFIFO_CACHE_SZ)*2\39)40#define DIVA_DFIFO_STEP DIVA_DFIFO_SEGMENT_SZ41/* -------------------------------------------------------------------------42Block header layout is:43byte[0] -> flags44byte[1] -> length of data in block45byte[2] -> reserved46byte[4] -> reserved47------------------------------------------------------------------------- */48#define DIVA_DFIFO_WRAP 0x80 /* This is the last block in fifo */49#define DIVA_DFIFO_READY 0x40 /* This block is ready for processing */50#define DIVA_DFIFO_LAST 0x20 /* This block is last in message */51#define DIVA_DFIFO_AUTO 0x10 /* Don't look for 'ready', don't ack */52int diva_dfifo_create (void* start, int length);53#endif545556