/****************************************************************************/
/* Copyright 1990 MBARI                                                     */
/****************************************************************************/
/* Summary  : FIFO buffer definitions for Microcontroller Board             */
/* Filename : fifo.h                                                        */
/* Author   : Andrew Pearce                                                 */
/* Project  : Tiburon ROV                                                   */
/* Version  : 1.0                                                           */
/* Created  : 11/21/90                                                      */
/* Modified : 06/13/91                                                      */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/* $Header: /usr/tiburon/.cvsroot/micro/h/fifo.h,v 1.1.1.1 1997/05/02 17:15:37 pean Exp $
 * $Log: fifo.h,v $
 * Revision 1.1.1.1  1997/05/02 17:15:37  pean
 * Initial release of the microcontroller software after Tiburon
 * Moolpool Dive to test IView, Lapboxes, modified Power can
 * GF/5V using bus capacitance mode.
 *
 * Revision 1.1  92/05/14  09:17:47  09:17:47  pean (Andrew Pearce 408-647-3746)
 * Initial revision
 *
*/
/****************************************************************************/

#ifndef FIFO_H
#define FIFO_H

typedef struct
{
    Byte    *base_ptr;                  /* Points to base address of fifo   */
    Byte    *input_ptr;                 /* fifo input pointer - for reads   */
    Byte    *output_ptr;                /* fifo output pointer - for writes */
    Nat16   fifo_size;                  /* Declared size of fifo in bytes   */
} fifo;                                 /* Data structure for fifo buffer   */

#ifdef __STDC__                         /* ANSI C function prototypes       */

    Void
init_fifo(fifo *fifo_ptr, Byte *faddress, Nat16 fsize);

    Int16
fifo_entries(fifo *fifo_ptr);           /* Pointer to fifo data structure   */

    Int16
fifo_room(fifo *fifo_ptr);              /* Pointer to fifo data structure   */

    Int16
fifo_input(fifo *fifo_ptr);             /* Pointer to fifo data structure   */

#endif /* __STDC__ */

#endif
