/******************************************************************************/
/*                 Copyright C 1998-2002 Broadcom Corporation                 */
/*                                                                            */
/* This material is the confidential trade secret and proprietary information */
/* of Broadcom Corporation.  It may not be reproduced, used, sold or          */
/* transferred to any third party without the prior written consent of        */
/* Broadcom Corporation.   All rights reserved.                               */
/******************************************************************************/
/*   FileName        : bcm_lineObject.h                                       */
/*   Purpose         : Header for the line object                             */
/*   Limitations     : None                                                   */
/*   Author          : Emmanuel Hanssens                                      */
/*   Creation Date   : 04-Apr-2002                                            */
/*   History         : Compiled by RCS                                        */
/******************************************************************************/
/*   $Id: bcm_lineObject.h,v 1.6 2004/09/17 12:43:46 hanssens Exp $  */
/******************************************************************************/
#ifndef BCM_LINE_OBJECT_H
# define BCM_LINE_OBJECT_H

# include "bcm_userdef.h"
# include "bcm_types.h"

# define getLinePtr(lineId) (&lineObjects[lineId])

# define IS_VALID_LINE_NB(lineNb) ((lineNb) < NB_LINES)

/* {{{ semaphore macros: empties as this minimal version is for no OS */

/* object sem */
# define CREATE_LINE_OBJECT_SEMAPHORE(name, linePtr)

# define LOCK_LINE_OBJECT(linePtr)

# define RELEASE_LINE_OBJECT(linePtr)

/* }}} */

typedef enum {LINE_STATE_NOT_CONFIG = 0,
              LINE_STATE_CONFIG     = 1,
              LINE_STATE_INIT       = 2, 
              LINE_STATE_SHOWTIME   = 3} LineState;
              
struct LineObject
{
  unsigned long                 lineId;
  DevObject                    *devPtr;
  LineState                     lineState;
  uint8                         debugModeOn;
};

/* global objects */
extern LineObject lineObjects[];

void initLineObject(uint8 lineId, DevObject *devPtr);
#endif
