/[qemu]/qemu/hw/slavio_serial.c
ViewVC logotype

Diff of /qemu/hw/slavio_serial.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by bellard, Wed Apr 6 20:42:35 2005 UTC revision 1.4 by bellard, Sun Oct 30 17:05:44 2005 UTC
# Line 195  static void slavio_serial_mem_writeb(voi Line 195  static void slavio_serial_mem_writeb(voi
195              val &= 0x38;              val &= 0x38;
196              switch (val) {              switch (val) {
197              case 8:              case 8:
198                  s->reg |= 0x8;                  newreg |= 0x8;
199                  break;                  break;
200              case 0x20:              case 0x20:
201                  s->rxint = 0;                  s->rxint = 0;
# Line 245  static void slavio_serial_mem_writeb(voi Line 245  static void slavio_serial_mem_writeb(voi
245                  handle_kbd_command(s, val);                  handle_kbd_command(s, val);
246              }              }
247              s->txint = 1;              s->txint = 1;
248              s->rregs[0] |= 4;              s->rregs[0] |= 4; // Tx buffer empty
249                s->rregs[1] |= 1; // All sent
250              // Interrupts reported only on channel A              // Interrupts reported only on channel A
251              if (s->chn == 0)              if (s->chn == 0)
252                  s->rregs[3] |= 0x10;                  s->rregs[3] |= 0x10;
# Line 278  static uint32_t slavio_serial_mem_readb( Line 279  static uint32_t slavio_serial_mem_readb(
279          s->reg = 0;          s->reg = 0;
280          return ret;          return ret;
281      case 1:      case 1:
         SER_DPRINTF("Read channel %c, ch %d\n", channel? 'b' : 'a', s->rx);  
282          s->rregs[0] &= ~1;          s->rregs[0] &= ~1;
283          if (s->type == kbd)          if (s->type == kbd)
284              ret = get_queue(s);              ret = get_queue(s);
285          else          else
286              ret = s->rx;              ret = s->rx;
287            SER_DPRINTF("Read channel %c, ch %d\n", channel? 'b' : 'a', ret);
288          return ret;          return ret;
289      default:      default:
290          break;          break;
# Line 454  static void handle_kbd_command(ChannelSt Line 455  static void handle_kbd_command(ChannelSt
455      switch (val) {      switch (val) {
456      case 1: // Reset, return type code      case 1: // Reset, return type code
457          put_queue(s, 0xff);          put_queue(s, 0xff);
         put_queue(s, 0xff);  
458          put_queue(s, 5); // Type 5          put_queue(s, 5); // Type 5
459          break;          break;
460      case 7: // Query layout      case 7: // Query layout

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26