OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [branches/] [stable_0_2_x/] [or1ksim/] [peripheral/] [ps2kbd.c] - Diff between revs 1371 and 1390

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 1371 Rev 1390
Line 257... Line 257...
  kbd_int = kbd->kresp || kbd->buf_count ? kbd->ccmdbyte & KBD_CCMDBYTE_INT : 0;
  kbd_int = kbd->kresp || kbd->buf_count ? kbd->ccmdbyte & KBD_CCMDBYTE_INT : 0;
  if (config.sim.verbose && kbd_int)
  if (config.sim.verbose && kbd_int)
    PRINTF("Keyboard Interrupt.... kbd_kresp %lx  kbd_buf_count %lx \n",
    PRINTF("Keyboard Interrupt.... kbd_kresp %lx  kbd_buf_count %lx \n",
           kbd->kresp, kbd->buf_count);
           kbd->kresp, kbd->buf_count);
  if (kbd_int) report_interrupt(kbd->irq);
  if (kbd_int) report_interrupt(kbd->irq);
  SCHED_ADD(kbd_job, dat, runtime.sim.cycles + kbd->slowdown);
  SCHED_ADD(kbd_job, dat, kbd->slowdown);
}
}
 
 
/* Reset all (simulated) ps2 controlers/keyboards */
/* Reset all (simulated) ps2 controlers/keyboards */
void kbd_reset (void *dat)
void kbd_reset (void *dat)
{
{
Line 278... Line 278...
    fprintf (stderr, "WARNING: Keyboard has problems with RX file stream.\n");
    fprintf (stderr, "WARNING: Keyboard has problems with RX file stream.\n");
    return;
    return;
  }
  }
  kbd->slowdown = (long) ((config.sim.system_kfreq * 1000.) / KBD_BAUD_RATE);
  kbd->slowdown = (long) ((config.sim.system_kfreq * 1000.) / KBD_BAUD_RATE);
  if (kbd->slowdown <= 0) kbd->slowdown = 1;
  if (kbd->slowdown <= 0) kbd->slowdown = 1;
  SCHED_ADD(kbd_job, dat, runtime.sim.cycles + kbd->slowdown);
  SCHED_ADD(kbd_job, dat, kbd->slowdown);
}
}
 
 
 
 
void kbd_info(void *dat)
void kbd_info(void *dat)
{
{

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.