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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_67/] [or1ksim/] [peripheral/] [16450.c] - Diff between revs 549 and 713

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

Rev 549 Rev 713
Line 377... Line 377...
    uarts[i].istat.txbuf_head = uarts[i].istat.txbuf_tail = 0;
    uarts[i].istat.txbuf_head = uarts[i].istat.txbuf_tail = 0;
 
 
    uarts[i].istat.break_set = 0;
    uarts[i].istat.break_set = 0;
    uarts[i].istat.timeout_count = 0;
    uarts[i].istat.timeout_count = 0;
    uarts[i].istat.thre_int = 1; /* FIFO is empty at start */
    uarts[i].istat.thre_int = 1; /* FIFO is empty at start */
 
    uarts[i].slowdown = UART_FGETC_SLOWDOWN;
 
 
    uarts[i].regs.lcr = UART_LCR_RESET;
    uarts[i].regs.lcr = UART_LCR_RESET;
    uarts[i].vapi.cur_break = uarts[i].vapi.cur_break_cnt = uarts[i].vapi.next_break = 0;
    uarts[i].vapi.cur_break = uarts[i].vapi.cur_break_cnt = uarts[i].vapi.next_break = 0;
    uarts[i].vapi.next_break_cnt = -1;
    uarts[i].vapi.next_break_cnt = -1;
  }
  }
Line 482... Line 483...
      uarts[i].iregs.rxser = uarts[i].iregs.loopback;
      uarts[i].iregs.rxser = uarts[i].iregs.loopback;
      uarts[i].istat.rxser_full = 1;
      uarts[i].istat.rxser_full = 1;
    } else {
    } else {
      if (!config.uarts[i].vapi_id) {
      if (!config.uarts[i].vapi_id) {
        if(uarts[i].istat.rxser_full == 0) {
        if(uarts[i].istat.rxser_full == 0) {
          if((retval = fgetc(uarts[i].rxfs)) != EOF) {
          if (uarts[i].slowdown)
 
            uarts[i].slowdown--;
 
          else if((retval = fgetc(uarts[i].rxfs)) != EOF) {
            uarts[i].iregs.rxser = (char)retval;
            uarts[i].iregs.rxser = (char)retval;
            uarts[i].istat.rxser_full = 1;
            uarts[i].istat.rxser_full = 1;
          }
          } else uarts[i].slowdown = UART_FGETC_SLOWDOWN;
        }
        }
      } else { /* VAPI */
      } else { /* VAPI */
        int received = 0;
        int received = 0;
        /* do not handle commands while receiving */
        /* do not handle commands while receiving */
        if (uarts[i].istat.rxser_full)
        if (uarts[i].istat.rxser_full)

powered by: WebSVN 2.1.0

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