adding i18n strings
[open-ps2-loader.git] / modules / network / SMSMAP / smap.h
blob20e803f980cbb410785edcf10392281df5cf1461
1 /* ps2-load-ip
3 smap.h
5 Copyright (c)2001 Sony Computer Entertainment Inc.
6 Copyright (c)2001 YAEGASHI Takeshi
7 Copyright (2)2002 Dan Potter
8 Copyright (c)2003 T Lindstrom
9 License: GPL
11 $Id: smap.h 360 2004-05-16 13:57:25Z oobles $
15 * smap.h -- PlayStation 2 Ethernet device driver header file
17 * Copyright (C) 2001 Sony Computer Entertainment Inc.
19 * This file is subject to the terms and conditions of the GNU General
20 * Public License Version 2. See the file "COPYING" in the main
21 * directory of this archive for more details.
23 * Modified for ps2-load-ip by Dan Potter
26 #ifndef __SMAP_H__
27 #define __SMAP_H__
29 #include "types.h"
32 struct pbuf;
34 typedef enum SMapStatus {SMap_OK,SMap_Err,SMap_Con,SMap_TX} SMapStatus;
37 //Function prototypes
38 int SMap_Init(void);
39 void SMap_Start(void);
40 void SMap_Stop(void);
41 int SMap_CanSend(void);
42 SMapStatus SMap_Send(struct pbuf* pPacket);
43 int SMap_HandleTXInterrupt(int iFlags);
44 int SMap_HandleRXEMACInterrupt(int iFlags);
45 u8 const* SMap_GetMACAddress(void);
46 void SMap_EnableInterrupts(int iFlags);
47 void SMap_DisableInterrupts(int iFlags);
48 int SMap_GetIRQ(void);
49 void SMap_ClearIRQ(int iFlags);
52 #if defined(DEBUG)
53 #define dbgprintf(args...) printf(args)
54 #else
55 #define dbgprintf(args...) ((void)0)
56 #endif
59 #define INTR_EMAC3 (1<<6)
60 #define INTR_RXEND (1<<5)
61 #define INTR_TXEND (1<<4)
62 #define INTR_RXDNV (1<<3) //descriptor not valid
63 #define INTR_TXDNV (1<<2) //descriptor not valid
64 #define INTR_CLR_ALL (INTR_RXEND|INTR_TXEND|INTR_RXDNV)
65 #define INTR_ENA_ALL (INTR_EMAC3|INTR_CLR_ALL)
66 #define INTR_BITMSK 0x7C
68 #endif /* __SMAP_H__ */