/***************************************************************************/ /* */ /* PROXIM RANGELAN2 LOW LEVEL DRIVER */ /* */ /* PROXIM, INC. CONFIDENTIAL AND PROPRIETARY. This source is the */ /* sole property of PROXIM, INC. Reproduction or utilization of */ /* this source in whole or in part is forbidden without the written*/ /* consent of PROXIM, INC. */ /* */ /* */ /* (c) Copyright PROXIM, INC. 1994 */ /* All Rights Reserved */ /* */ /***************************************************************************/ /***************************************************************************/ /* */ /* $Header: J:\pvcs\archive\clld\lld.h_v 1.18 27 Sep 1996 09:32:00 */ /* */ /* */ /***************************************************************************/ #ifndef LLD_H #define LLD_H /*--------------------------------------------*/ /* Exclude the PCMCIA code for Serial builds. */ /*--------------------------------------------*/ #ifndef SERIAL #define CSS 1 #endif #define NUMCARDS 2 /*-------------------------------------------------------------------------*/ /* Important Note: */ /* */ /* This file defines packet descriptor structures specific to the */ /* ODI driver only. */ /* */ /*-------------------------------------------------------------------------*/ #ifdef ODI #define FAR __far #else #define FAR #endif #define NIL ( (void *) 0 ) /***************************************************************************/ /* */ /* These size declarations are made so that the code can be easily */ /* ported across different compilers and processors. These should be */ /* changed to match your configuration. */ /* */ /***************************************************************************/ typedef unsigned char unsigned_8; #ifndef MULTI typedef unsigned short unsigned_16; #else typedef unsigned int unsigned_16; #endif typedef unsigned int unsigned_32; typedef char signed_8; typedef short signed_16; typedef int signed_32; /*----------------------------------------------------------*/ /* */ /* This typedef is used save and restore processor flags. */ /* */ /*----------------------------------------------------------*/ typedef unsigned long FLAGS; /***************************************************************************/ /* */ /* These constants are used to define the maximum sizes of the various */ /* parts of the packet descriptors. These can be changed to match your */ /* needs. */ /* */ /***************************************************************************/ #define MAX_IMMED 0 #define MAX_FRAGS 1 /***************************************************************************/ /* */ /* Equates for the OpMode variable. */ /* */ /***************************************************************************/ #define OP_NORMAL 0 #define OP_PROMISC 1 #define OP_PROTOCOL 2 /***************************************************************************/ /* */ /* These are the structures that must be defined to link to the LLD. */ /* */ /***************************************************************************/ struct FragStruc { unsigned_8 FAR *FSDataPtr; /* Ptr to the fragment data */ unsigned_16 FSDataLen; /* Length of the data */ }; /*-------------------------------------------------------------------------*/ /* */ /* ODI Transmit Packet descriptor structure definition */ /* */ /*-------------------------------------------------------------------------*/ struct LLDTxPacketDescriptor { unsigned_8 LLDTxdriverWS[6]; unsigned_16 LLDTxDataLength; /* Length of total TX data */ struct LLDTxFragmentList FAR *LLDTxFragmentListPtr; /* Ptr to list of fragments */ unsigned_16 LLDImmediateDataLength; /* Length of immediate data */ unsigned_8 LLDImmediateData [MAX_IMMED]; /* Immediate data */ }; struct LLDTxFragmentList { unsigned_16 LLDTxFragmentCount; /* Num of fragment descriptors */ struct FragStruc LLDTxFragList [MAX_FRAGS]; /* List of fragments */ }; /*-------------------------------------------------------------------------*/ /* */ /* ODI Receive Packet descriptor structure definition */ /* */ /*-------------------------------------------------------------------------*/ struct LLDRxPacketDescriptor { unsigned_8 LLDRxDriverWS [8]; unsigned_8 LLDRxReserved [36]; unsigned_16 LLDRxFragCount; /* Num of fragment descriptors */ struct FragStruc LLDRxFragList [MAX_FRAGS]; /* List of fragments */ }; /**************************************************************************/ /* */ /* Prototype definitions of LLD procedures called by the LLS. */ /* */ /**************************************************************************/ unsigned_16 LLDInit (void); void LLDIsr (void); unsigned_16 LLDReceive (struct LLDRxPacketDescriptor FAR *PktDesc, unsigned_16 Offset, unsigned_16 Length); unsigned_16 LLDRawReceive (struct LLDRxPacketDescriptor FAR *PktDesc, unsigned_16 Offset, unsigned_16 Length); unsigned_8 LLDSend (struct LLDTxPacketDescriptor FAR *PktDesc); unsigned_8 LLDRawSend (unsigned_8 Packet [], unsigned_16 Length); unsigned_8 LLDReset (void); void LLDPoll (void); unsigned_8 LLDMulticast (unsigned_8 OnOrOff); unsigned_8 LLDPromiscuous (unsigned_8 OnOrOff); unsigned_8 LLDStop (void); void LLDOutOfStandby (void); /**************************************************************************/ /* */ /* Prototype definitions of LLS procedures called by the LLD. */ /* */ /**************************************************************************/ void LLSReceiveLookAhead (unsigned_8 *Buffer, unsigned_16 Length, unsigned_16 Status, unsigned_16 RSSI); void LLSRawReceiveLookAhead (unsigned_8 Buffer[], unsigned int Length); unsigned_8 LLDPacketizeSend (unsigned_8 *PtrToPkt, unsigned_16 PktLength); unsigned_16 LLSSendComplete (struct LLDTxPacketDescriptor FAR *PktDesc); unsigned_16 LLSRawSendComplete (unsigned_8 *Buffer); unsigned_8 LLSRegisterInterrupt (unsigned_8 IntNum, void (*CallBackFunc) ()); unsigned_8 LLSDeRegisterInterrupt (unsigned_8 IntNum); unsigned_16 LLSGetCurrentTime (void); unsigned_32 LLSGetCurrentTimeLONG(void); void fmemcpy (unsigned_8 FAR *, unsigned_8 FAR *, unsigned_16); void InitLLDVars (unsigned_8 Card); #ifdef PROTOCOL void LLSReceiveProt (unsigned char *Buffer, unsigned int Length, unsigned long TimeStamp); #endif #endif /* LLD_H */