mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
io port API change
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@664 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
c4b1fcc0f9
commit
b41a2cd1e4
7 changed files with 192 additions and 157 deletions
10
hw/i8254.c
10
hw/i8254.c
|
@ -201,7 +201,7 @@ static inline void pit_load_count(PITChannelState *s, int val)
|
|||
}
|
||||
}
|
||||
|
||||
void pit_ioport_write(CPUState *env, uint32_t addr, uint32_t val)
|
||||
static void pit_ioport_write(void *opaque, uint32_t addr, uint32_t val)
|
||||
{
|
||||
int channel, access;
|
||||
PITChannelState *s;
|
||||
|
@ -246,7 +246,7 @@ void pit_ioport_write(CPUState *env, uint32_t addr, uint32_t val)
|
|||
}
|
||||
}
|
||||
|
||||
uint32_t pit_ioport_read(CPUState *env, uint32_t addr)
|
||||
static uint32_t pit_ioport_read(void *opaque, uint32_t addr)
|
||||
{
|
||||
int ret, count;
|
||||
PITChannelState *s;
|
||||
|
@ -279,7 +279,7 @@ uint32_t pit_ioport_read(CPUState *env, uint32_t addr)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void pit_init(void)
|
||||
void pit_init(int base)
|
||||
{
|
||||
PITChannelState *s;
|
||||
int i;
|
||||
|
@ -291,7 +291,7 @@ void pit_init(void)
|
|||
pit_load_count(s, 0);
|
||||
}
|
||||
|
||||
register_ioport_write(0x40, 4, pit_ioport_write, 1);
|
||||
register_ioport_read(0x40, 3, pit_ioport_read, 1);
|
||||
register_ioport_write(base, 4, 1, pit_ioport_write, NULL);
|
||||
register_ioport_read(base, 3, 1, pit_ioport_read, NULL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue