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

Subversion Repositories or1k

[/] [or1k/] [branches/] [stable_0_2_x/] [or1ksim/] [vapi/] [vapi.c] - Diff between revs 1308 and 1350

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

Rev 1308 Rev 1350
Line 412... Line 412...
    }
    }
    return;
    return;
  }
  }
 
 
  vapi_write_log_file (VAPI_COMMAND_REQUEST, id, data);
  vapi_write_log_file (VAPI_COMMAND_REQUEST, id, data);
  debug (4, "[%08x, %08x]\n", id, data);
  debug (4, "[%08lx, %08lx]\n", id, data);
 
 
  /* This packet may be for another handler */
  /* This packet may be for another handler */
  if (!handler_fits_id (t, id))
  if (!handler_fits_id (t, id))
    t = find_handler (id);
    t = find_handler (id);
  if (!t || !t->read_func)
  if (!t || !t->read_func)
Line 538... Line 538...
/* Installs a vapi handler for many VAPI id */
/* Installs a vapi handler for many VAPI id */
void vapi_install_multi_handler (unsigned long base_id, unsigned long num_ids, void (*read_func) (unsigned long, unsigned long))
void vapi_install_multi_handler (unsigned long base_id, unsigned long num_ids, void (*read_func) (unsigned long, unsigned long))
{
{
  struct vapi_handler *tt;
  struct vapi_handler *tt;
 
 
  debug(4, "vapi_install_handler %08x, %u, %08x\n", base_id, num_ids, read_func);
  debug(4, "vapi_install_handler %08lx, %lu, %08p\n", base_id, num_ids, read_func);
  if (read_func == NULL) {
  if (read_func == NULL) {
    struct vapi_handler **t = &vapi_handler;
    struct vapi_handler **t = &vapi_handler;
    while ((*t) && !handler_fits_id (*t, base_id))
    while ((*t) && !handler_fits_id (*t, base_id))
      t = &(*t)->next;
      t = &(*t)->next;
    if (!t) {
    if (!t) {
Line 586... Line 586...
}
}
 
 
/* Sends a packet to specified test */
/* Sends a packet to specified test */
int vapi_send (unsigned long id, unsigned long data)
int vapi_send (unsigned long id, unsigned long data)
{
{
  debug (4, "vapi_send [%08x %08x]\n", id, data);
  debug (4, "vapi_send [%08lx %08lx]\n", id, data);
  vapi_write_log_file (VAPI_COMMAND_SEND, id, data);
  vapi_write_log_file (VAPI_COMMAND_SEND, id, data);
  write_packet (id, data);
  write_packet (id, data);
}
}
 
 
/*
/*

powered by: WebSVN 2.1.0

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