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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [sim/] [dspkbd.c] - Diff between revs 8 and 25

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

Rev 8 Rev 25
Line 1... Line 1...
/*
/*
 * display.c -- display controller simulation
 * dspkbd.h -- display & keyboard controller simulation
 */
 */
 
 
 
 
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
Line 792... Line 792...
 
 
static void kbdCallback(int dev) {
static void kbdCallback(int dev) {
  if (debug) {
  if (debug) {
    cPrintf("\n**** KEYBOARD CALLBACK ****\n");
    cPrintf("\n**** KEYBOARD CALLBACK ****\n");
  }
  }
  timerStart(KEYBOARD_MSEC, kbdCallback, dev);
  timerStart(KEYBOARD_USEC, kbdCallback, dev);
  if (kbdBufWritePtr == kbdBufReadPtr) {
  if (kbdBufWritePtr == kbdBufReadPtr) {
    /* no character ready */
    /* no character ready */
    return;
    return;
  }
  }
  /* any character typed */
  /* any character typed */
Line 884... Line 884...
  }
  }
  cPrintf("Resetting Keyboard...\n");
  cPrintf("Resetting Keyboard...\n");
  kbdBufInit();
  kbdBufInit();
  kbdCtrl = 0;
  kbdCtrl = 0;
  kbdData = 0;
  kbdData = 0;
  timerStart(KEYBOARD_MSEC, kbdCallback, 0);
  timerStart(KEYBOARD_USEC, kbdCallback, 0);
}
}
 
 
 
 
void keyboardInit(void) {
void keyboardInit(void) {
  if (!installed) {
  if (!installed) {

powered by: WebSVN 2.1.0

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