diff --git a/src/sio/sio_82091aa.c b/src/sio/sio_82091aa.c index 97ff5f25b..5ef60d20f 100644 --- a/src/sio/sio_82091aa.c +++ b/src/sio/sio_82091aa.c @@ -54,7 +54,7 @@ fdc_handler(i82091aa_t *dev) } static void -lpt1_handler(i82091aa_t *dev) +lpt_handler(i82091aa_t *dev) { uint16_t lpt_port = LPT1_ADDR; @@ -177,7 +177,7 @@ i82091aa_write(uint16_t port, uint8_t val, void *priv) case 0x20: *reg = (val & 0xef); if (valxor & 0x07) - lpt1_handler(dev); + lpt_handler(dev); break; case 0x21: *reg = (val & 0x2f); @@ -237,7 +237,7 @@ i82091aa_reset(i82091aa_t *dev) fdc_reset(dev->fdc); fdc_handler(dev); - lpt1_handler(dev); + lpt_handler(dev); serial_handler(dev, 0); serial_handler(dev, 1); serial_set_clock_src(dev->uart[0], (24000000.0 / 13.0)); diff --git a/src/sio/sio_f82c606.c b/src/sio/sio_f82c606.c index 667955834..1e6eacccc 100644 --- a/src/sio/sio_f82c606.c +++ b/src/sio/sio_f82c606.c @@ -83,7 +83,7 @@ f82c606_update_ports(upc_t *dev, int set) { uint8_t uart1_int = 0xff; uint8_t uart2_int = 0xff; - uint8_t lpt1_int = 0xff; + uint8_t lpt_int = 0xff; int nvr_int = -1; serial_remove(dev->uart[0]); @@ -136,7 +136,7 @@ f82c606_update_ports(upc_t *dev, int set) uart1_int = 5; break; case 0x0c: - lpt1_int = LPT2_IRQ; + lpt_int = LPT2_IRQ; break; default: @@ -151,7 +151,7 @@ f82c606_update_ports(upc_t *dev, int set) uart2_int = 7; break; case 0x03: - lpt1_int = LPT1_IRQ; + lpt_int = LPT1_IRQ; break; default: @@ -175,8 +175,8 @@ f82c606_update_ports(upc_t *dev, int set) if (dev->regs[0] & 8) { lpt_port_setup(dev->lpt, ((uint16_t) dev->regs[6]) << 2); - lpt_port_irq(dev->lpt, lpt1_int); - f82c606_log("LPT1 at %04X, IRQ %i\n", ((uint16_t) dev->regs[6]) << 2, lpt1_int); + lpt_port_irq(dev->lpt, lpt_int); + f82c606_log("LPT1 at %04X, IRQ %i\n", ((uint16_t) dev->regs[6]) << 2, lpt_int); } nvr_at_handler(1, ((uint16_t) dev->regs[3]) << 2, dev->nvr); diff --git a/src/sio/sio_fdc37c6xx.c b/src/sio/sio_fdc37c6xx.c index ce6f356c3..dda74d9cd 100644 --- a/src/sio/sio_fdc37c6xx.c +++ b/src/sio/sio_fdc37c6xx.c @@ -252,8 +252,8 @@ fdc37c6xx_reset(fdc37c6xx_t *dev) serial_remove(dev->uart[1]); serial_setup(dev->uart[1], COM2_ADDR, COM2_IRQ); - lpt1_remove(); - lpt1_setup(LPT1_ADDR); + lpt_port_remove(lpt->port); + lpt_port_setup(lpt->port, LPT1_ADDR); fdc_reset(dev->fdc); fdc_remove(dev->fdc); diff --git a/src/sio/sio_pc87311.c b/src/sio/sio_pc87311.c index eca662e9f..0b59324d6 100644 --- a/src/sio/sio_pc87311.c +++ b/src/sio/sio_pc87311.c @@ -246,7 +246,7 @@ pc87311_ide_handler(pc87311_t *dev) void pc87311_enable(pc87311_t *dev) { - (FUNCTION_ENABLE & 0x01) ? pc87311_lpt_handler(dev) : lpt1_remove(); + (FUNCTION_ENABLE & 0x01) ? pc87311_lpt_handler(dev) : lpt_port_remove(dev->lpt); (FUNCTION_ENABLE & 0x02) ? pc87311_uart_handler(0, dev) : serial_remove(dev->uart[0]); (FUNCTION_ENABLE & 0x04) ? pc87311_uart_handler(1, dev) : serial_remove(dev->uart[1]); (FUNCTION_ENABLE & 0x08) ? pc87311_fdc_handler(dev) : fdc_remove(dev->fdc_controller);