* configure.in: Remove target-libstdc++-v3 from noconfigdirs for
[deliverable/binutils-gdb.git] / sim / m68hc11 / dv-m68hc11spi.c
index abde515131b192c1d1fe111c660cf0874d971ea4..619a2d31fcb06764a564a41862445fdce4a5b21a 100644 (file)
@@ -1,6 +1,6 @@
 /*  dv-m68hc11spi.c -- Simulation of the 68HC11 SPI
-    Copyright (C) 2000 Free Software Foundation, Inc.
-    Written by Stephane Carrez (stcarrez@worldnet.fr)
+    Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
+    Written by Stephane Carrez (stcarrez@nerim.fr)
     (From a driver model Contributed by Cygnus Solutions.)
 
     This file is part of the program GDB, the GNU debugger.
@@ -192,14 +192,16 @@ m68hc11spi_port_event (struct hw *me,
 static void
 set_bit_port (struct hw *me, sim_cpu *cpu, int port, int mask, int value)
 {
-  /* TODO: Post an event to inform other devices that pin 'port' changes.
-     This has only a sense if we provide some device that is logically
-     connected to these pin ports (SCLK and MOSI) and that handles
-     the SPI protocol.  */
+  uint8 val;
+  
   if (value)
-    cpu->ios[port] |= mask;
+    val = cpu->ios[port] | mask;
   else
-    cpu->ios[port] &= ~mask;
+    val = cpu->ios[port] & ~mask;
+
+  /* Set the new value and post an event to inform other devices
+     that pin 'port' changed.  */
+  m68hc11cpu_set_port (me, cpu, port, val);
 }
 
 
@@ -356,11 +358,11 @@ m68hc11spi_info (struct hw *me)
                      controller->tx_bit + 1);
       t = hw_event_remain_time (me, controller->spi_event);
       sim_io_printf (sd, "  SPI current bit-cycle finished in %s\n",
-                    cycle_to_string (cpu, t));
+                    cycle_to_string (cpu, t, PRINT_TIME | PRINT_CYCLE));
 
       t += (controller->tx_bit + 1) * 2 * controller->clock;
       sim_io_printf (sd, "  SPI operation finished in %s\n",
-                    cycle_to_string (cpu, t));
+                    cycle_to_string (cpu, t, PRINT_TIME | PRINT_CYCLE));
     }
 }
 
@@ -527,7 +529,8 @@ m68hc11spi_io_write_buffer (struct hw *me,
 
 
 const struct hw_descriptor dv_m68hc11spi_descriptor[] = {
-  { "m68hc11spi", m68hc11spi_finish, },
+  { "m68hc11spi", m68hc11spi_finish },
+  { "m68hc12spi", m68hc11spi_finish },
   { NULL },
 };
 
This page took 0.024357 seconds and 4 git commands to generate.