AliM1543C_usb.h

Go to the documentation of this file.
00001 /* ES40 emulator.
00002  * Copyright (C) 2007-2008 by the ES40 Emulator Project
00003  *
00004  * WWW    : http://sourceforge.net/projects/es40
00005  * E-mail : camiel@camicom.com
00006  * 
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  * 
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  * 
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00020  * 
00021  * Although this is not required, the author would appreciate being notified of, 
00022  * and receiving any modifications you may make to the source code that might serve
00023  * the general public.
00024  */
00025 
00048 #if !defined(INCLUDED_ALIM1543C_USB_H_)
00049 #define INCLUDED_ALIM1543C_USB_H
00050 
00051 #include "PCIDevice.h"
00052 
00063 class CAliM1543C_usb : public CPCIDevice
00064 {
00065   public:
00066     virtual int   SaveState(FILE* f);
00067     virtual int   RestoreState(FILE* f);
00068 
00069     CAliM1543C_usb(CConfigurator*  cfg, class CSystem*  c, int pcibus, int pcidev);
00070     virtual       ~CAliM1543C_usb();
00071     virtual void  WriteMem_Bar(int func, int bar, u32 address, int dsize,
00072                                u32 data);
00073     virtual u32   ReadMem_Bar(int func, int bar, u32 address, int dsize);
00074   private:
00075     u64   usb_hci_read(u64 address, int dsize);
00076     void  usb_hci_write(u64 address, int dsize, u64 data);
00077 
00079     struct SUSB_state
00080     {
00081       u32 usb_data[0x110 / 4];
00082     } state;
00083 };
00084 #endif // !defined(INCLUDED_ALIM1543C_USB_H)

SourceForge.net Logo
Project space on SourceForge.net