aboutsummaryrefslogtreecommitdiff
path: root/vl.h
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-05-03 23:18:25 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-05-03 23:18:25 +0000
commitec844b96c083340a4c04849c2c1cdc09e85e0595 (patch)
treebffd30b677c4423be290835456621c7f06725809 /vl.h
parentf72e8ff4a698c13c69b9f3f06a56b60ca5af3a78 (diff)
pit fixes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@781 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.h')
-rw-r--r--vl.h26
1 files changed, 6 insertions, 20 deletions
diff --git a/vl.h b/vl.h
index 7fb81c8392..639b473cd5 100644
--- a/vl.h
+++ b/vl.h
@@ -481,26 +481,12 @@ void pic_info(void);
#define PIT_FREQ 1193182
-typedef struct PITChannelState {
- int count; /* can be 65536 */
- uint16_t latched_count;
- uint8_t rw_state;
- uint8_t mode;
- uint8_t bcd; /* not supported */
- uint8_t gate; /* timer start */
- int64_t count_load_time;
- /* irq handling */
- int64_t next_transition_time;
- QEMUTimer *irq_timer;
- int irq;
-} PITChannelState;
-
-extern PITChannelState pit_channels[3];
-
-void pit_init(int base, int irq);
-void pit_set_gate(PITChannelState *s, int val);
-int pit_get_out(PITChannelState *s, int64_t current_time);
-int pit_get_out_edges(PITChannelState *s);
+typedef struct PITState PITState;
+
+PITState *pit_init(int base, int irq);
+void pit_set_gate(PITState *pit, int channel, int val);
+int pit_get_gate(PITState *pit, int channel);
+int pit_get_out(PITState *pit, int channel, int64_t current_time);
/* pc.c */
void pc_init(int ram_size, int vga_ram_size, int boot_device,