* 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.
This commit is contained in:
parent
5abb9efa08
commit
827ec39a5a
6 changed files with 579 additions and 16 deletions
|
@ -208,6 +208,7 @@ sim_hw_configure (SIM_DESC sd)
|
|||
/* M68hc11 Timer configuration. */
|
||||
sim_hw_parse (sd, "/m68hc11/m68hc11tim/reg 0x1b 0x5");
|
||||
sim_hw_parse (sd, "/m68hc11 > cpu-reset reset /m68hc11/m68hc11tim");
|
||||
sim_hw_parse (sd, "/m68hc11 > capture capture /m68hc11/m68hc11tim");
|
||||
}
|
||||
|
||||
/* Create the SPI device. */
|
||||
|
@ -229,6 +230,7 @@ sim_hw_configure (SIM_DESC sd)
|
|||
sim_hw_parse (sd, "/m68hc11/m68hc11eepr/reg 0xb000 512");
|
||||
sim_hw_parse (sd, "/m68hc11 > cpu-reset reset /m68hc11/m68hc11eepr");
|
||||
}
|
||||
cpu->hw_cpu = sim_hw_parse (sd, "/m68hc11");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -281,6 +283,8 @@ sim_hw_configure (SIM_DESC sd)
|
|||
sim_hw_parse (sd, "/m68hc12/m68hc12eepr/reg 0x0800 2048");
|
||||
sim_hw_parse (sd, "/m68hc12 > cpu-reset reset /m68hc12/m68hc12eepr");
|
||||
}
|
||||
|
||||
cpu->hw_cpu = sim_hw_parse (sd, "/m68hc12");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue