More serial cleanups

This commit is contained in:
Jasmine Iwanek
2022-07-28 16:50:49 -04:00
parent b1c2b2fef5
commit 8b33566187
8 changed files with 30 additions and 23 deletions

View File

@@ -101,8 +101,7 @@ extern int vid_cga_contrast, /* (C) video */
video_framerate, /* (C) video */
gfxcard; /* (C) graphics/video card */
extern char video_shader[512]; /* (C) video */
extern int serial_enabled[], /* (C) enable serial ports */
bugger_enabled, /* (C) enable ISAbugger */
extern int bugger_enabled, /* (C) enable ISAbugger */
postcard_enabled, /* (C) enable POST card */
isamem_type[], /* (C) enable ISA mem cards */
isartc_type; /* (C) enable ISA RTC card */

View File

@@ -111,8 +111,6 @@ typedef struct {
# ifdef USE_SERIAL_DEVICES
char serial_devices[SERIAL_MAX][32]; /* Serial device names */
# endif
int serial_enabled[SERIAL_MAX], /* Serial ports 1, 2, 3, 4 enabled */
parallel_enabled[PARALLEL_MAX]; /* LPT1, LPT2, LPT3, LPT4 enabled */
/* Other peripherals category */
int fdc_type, /* Floppy disk controller type */

View File

@@ -74,6 +74,12 @@ typedef struct serial_device_s {
serial_t *serial;
} serial_device_t;
typedef struct {
uint8_t enabled;
} serial_port_t;
extern serial_port_t com_ports[SERIAL_MAX];
extern serial_t *serial_attach(int port,
void (*rcr_callback)(struct serial_s *serial, void *p),
void (*dev_write)(struct serial_s *serial, void *p, uint8_t data),