/[gxemul]/trunk/src/devices/dev_dc7085.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/devices/dev_dc7085.c

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

revision 31 by dpavlin, Mon Oct 8 16:20:40 2007 UTC revision 32 by dpavlin, Mon Oct 8 16:20:58 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_dc7085.c,v 1.56 2006/07/23 14:37:34 debug Exp $   *  $Id: dev_dc7085.c,v 1.58 2006/09/06 04:55:35 debug Exp $
29   *     *  
30   *  DC7085 serial controller, used in some DECstation models.   *  DC7085 serial controller, used in some DECstation models.
31   */   */
# Line 46  Line 46 
46    
47  #define DC_TICK_SHIFT           14  #define DC_TICK_SHIFT           14
48    
49  #define MAX_QUEUE_LEN           4096  #define MAX_QUEUE_LEN           32768
50    
51  struct dc_data {  struct dc_data {
52          struct dc7085regs       regs;          struct dc7085regs       regs;
# Line 78  void add_to_rx_queue(void *e, int ch, in Line 78  void add_to_rx_queue(void *e, int ch, in
78          struct dc_data *d = (struct dc_data *) e;          struct dc_data *d = (struct dc_data *) e;
79          int entries_in_use = d->cur_rx_queue_pos_write -          int entries_in_use = d->cur_rx_queue_pos_write -
80              d->cur_rx_queue_pos_read;              d->cur_rx_queue_pos_read;
81    
82          while (entries_in_use < 0)          while (entries_in_use < 0)
83                  entries_in_use += MAX_QUEUE_LEN;                  entries_in_use += MAX_QUEUE_LEN;
84    
# Line 146  DEVICE_TICK(dc7085) Line 147  DEVICE_TICK(dc7085)
147                          return;                          return;
148          }          }
149    
150          lk201_tick(&d->lk201);          lk201_tick(cpu->machine, &d->lk201);
151    
152          avail = d->cur_rx_queue_pos_write != d->cur_rx_queue_pos_read;          avail = d->cur_rx_queue_pos_write != d->cur_rx_queue_pos_read;
153    

Legend:
Removed from v.31  
changed lines
  Added in v.32

  ViewVC Help
Powered by ViewVC 1.1.26