aboutsummaryrefslogtreecommitdiff
path: root/sim/m68hc11/sim-main.h
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2002-03-07 19:12:44 +0000
committerStephane Carrez <stcarrez@nerim.fr>2002-03-07 19:12:44 +0000
commit827ec39a5a8af8821006d93978623dc1ababdac1 (patch)
tree7f3e2c7e8cad430e5fa9bccc996f55a8d1f5d942 /sim/m68hc11/sim-main.h
parent5abb9efa086f5bd9eeacf3911d0b528cc522b870 (diff)
downloadgdb-827ec39a5a8af8821006d93978623dc1ababdac1.zip
gdb-827ec39a5a8af8821006d93978623dc1ababdac1.tar.gz
gdb-827ec39a5a8af8821006d93978623dc1ababdac1.tar.bz2
* interp.c (sim_hw_configure): Save the HW cpu pointer in the
cpu struct. (sim_hw_configure): Connect the capture input/output events. * sim-main.h (_sim_cpu): New member hw_cpu. (m68hc11cpu_set_oscillator): Declare. (m68hc11cpu_clear_oscillator): Declare. (m68hc11cpu_set_port): Declare. * dv-m68hc11.c (m68hc11_options): New for oscillator commands. (m68hc11cpu_ports): New input ports and output ports to reflect the HC11 IOs. (m68hc11_delete): Cleanup any running oscillator. (attach_m68hc11_regs): Create the input oscillators. (make_oscillator): New function. (find_oscillator): New function. (oscillator_handler): New function. (reset_oscillators): New function. (m68hc11cpu_port_event): Handle the new input ports. (m68hc11cpu_set_oscillator): New function. (m68hc11cpu_clear_oscillator): New function. (get_frequency): New function. (m68hc11_option_handler): New function. (m68hc11cpu_set_port): New function. (m68hc11cpu_io_write): Post the port output events. * dv-m68hc11spi.c (set_bit_port): Use m68hc11cpu_set_port to set the output port value. * dv-m68hc11tim.c (m68hc11tim_port_event): Handle CAPTURE event by latching the TCNT value in the register.
Diffstat (limited to 'sim/m68hc11/sim-main.h')
-rw-r--r--sim/m68hc11/sim-main.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/sim/m68hc11/sim-main.h b/sim/m68hc11/sim-main.h
index 21c1fc9..a47e7aa 100644
--- a/sim/m68hc11/sim-main.h
+++ b/sim/m68hc11/sim-main.h
@@ -204,7 +204,9 @@ struct _sim_cpu {
uint8 cpu_use_local_config;
uint8 ios[MAX_PORTS];
-
+
+ struct hw *hw_cpu;
+
/* ... base type ... */
sim_cpu_base base;
};
@@ -530,6 +532,13 @@ extern void emul_os (int op, sim_cpu *cpu);
extern void cpu_interp_m6811 (sim_cpu *cpu);
extern void cpu_interp_m6812 (sim_cpu *cpu);
+extern int m68hc11cpu_set_oscillator (SIM_DESC sd, const char *port,
+ double ton, double toff,
+ signed64 repeat);
+extern int m68hc11cpu_clear_oscillator (SIM_DESC sd, const char *port);
+extern void m68hc11cpu_set_port (struct hw *me, sim_cpu *cpu,
+ unsigned addr, uint8 val);
+
/* The current state of the processor; registers, memory, etc. */
#define CIA_GET(CPU) (cpu_get_pc (CPU))