25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: dev_dc7085.c,v 1.54 2006/01/01 13:17:16 debug Exp $ |
* $Id: dev_dc7085.c,v 1.56 2006/07/23 14:37:34 debug Exp $ |
29 |
* |
* |
30 |
* DC7085 serial controller, used in some DECstation models. |
* DC7085 serial controller, used in some DECstation models. |
31 |
*/ |
*/ |
96 |
} |
} |
97 |
|
|
98 |
|
|
99 |
/* |
DEVICE_TICK(dc7085) |
|
* dev_dc7085_tick(): |
|
|
* |
|
|
* This function is called "every now and then". |
|
|
* If a key is available from the keyboard, add it to the rx queue. |
|
|
* If other bits are set, an interrupt might need to be caused. |
|
|
*/ |
|
|
void dev_dc7085_tick(struct cpu *cpu, void *extra) |
|
100 |
{ |
{ |
101 |
|
/* |
102 |
|
* If a key is available from the keyboard, add it to the rx queue. |
103 |
|
* If other bits are set, an interrupt might need to be caused. |
104 |
|
*/ |
105 |
struct dc_data *d = extra; |
struct dc_data *d = extra; |
106 |
int avail; |
int avail; |
107 |
|
|
158 |
} |
} |
159 |
|
|
160 |
|
|
|
/* |
|
|
* dev_dc7085_access(): |
|
|
*/ |
|
161 |
DEVICE_ACCESS(dc7085) |
DEVICE_ACCESS(dc7085) |
162 |
{ |
{ |
163 |
uint64_t idata = 0, odata = 0; |
uint64_t idata = 0, odata = 0; |
314 |
|
|
315 |
memory_device_register(mem, "dc7085", baseaddr, DEV_DC7085_LENGTH, |
memory_device_register(mem, "dc7085", baseaddr, DEV_DC7085_LENGTH, |
316 |
dev_dc7085_access, d, DM_DEFAULT, NULL); |
dev_dc7085_access, d, DM_DEFAULT, NULL); |
317 |
machine_add_tickfunction(machine, dev_dc7085_tick, d, DC_TICK_SHIFT); |
machine_add_tickfunction(machine, dev_dc7085_tick, d, |
318 |
|
DC_TICK_SHIFT, 0.0); |
319 |
|
|
320 |
return d->console_handle; |
return d->console_handle; |
321 |
} |
} |