/******************************************************************************/
/*                       Copyright 2001 Broadcom Corporation                  */
/*                                                                            */
/* This material is the confidential trade secret and proprietary information */
/* of Broadcom Corp.  It may not be reproduced, used, sold or transferred to  */
/* any third party without the prior written consent of Broadcom Corp.        */
/* All rights reserved.                                                       */
/******************************************************************************/
/*   FileName        : bcm_message.h                                          */
/*   Purpose         : Header for the message.c                               */
/*   Limitations     : None                                                   */
/*   Author          : Emmanuel Hanssens                                      */
/*   Creation Date   : 14-Sep-2001                                            */
/*   History         : Compiled by CVS                                        */
/******************************************************************************/
/*   $Id: bcm_message.h,v 1.11 2004/09/03 13:43:05 kdmaeyer Exp $  */
/******************************************************************************/
#ifndef BCM_MESSAGE_H
# define BCM_MESSAGE_H

# include "bcm_userdef.h"

/* return status */
# define RQUEUEFULL  0x100
# define RQUEUEEMPTY 0x101

# ifndef NO_FULL_ERROR_HANDLING
/* error codes */
#  define EHPISIZE 1
extern const char *hpiErr[];
# endif

struct MsgDev;
typedef struct MsgDev MsgDev;

void    msgDriverInit   (void);
MsgDev *msgOpen         (uint16 bcm6410Id);
void    msgInit         (MsgDev *dev);
void    msgClose        (MsgDev *dev);
int     msgPut          (MsgDev *dev,
                         uint8 *header,
                         uint16 headerSize,
                         uint8 *payload,
                         uint16 payloadSize);
int     msgGetHeader    (MsgDev *dev,
                         uint8  *headerBuffer,
                         uint16  headerSize);
int     msgGetPayload   (MsgDev *dev,
                         uint16  headerSize,
                         uint8  *payloadBuffer,
                         uint16  payloadSize);
int     msgGet          (MsgDev *dev,
                         uint8  *headerBuffer,
                         uint16  headerSize,
                         uint8  *payloadBuffer,
                         uint16  payloadSize);
int msgGetReqMsgMaxSize (MsgDev *dev);
int msgGetRepMsgMaxSize (MsgDev *dev);

#endif
