Applied a typo-fixing mainline PCem commit to 808x.c;
Temporarily reverted serial port and serial mouse code back to the old one until the new code is fixed; Fixed nvr_path handling - the NVR path no longer gets messed up at hard reset.
This commit is contained in:
79
src/serial.h
79
src/serial.h
@@ -1,56 +1,35 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Definitions for the SERIAL card.
|
||||
*
|
||||
* Version: @(#)serial.h 1.0.1 2017/04/14
|
||||
*
|
||||
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Copyright 2017 Fred N. van Kempen.
|
||||
*/
|
||||
#ifndef SERIAL_H
|
||||
# define SERIAL_H
|
||||
/* Copyright holders: Sarah Walker
|
||||
see COPYING for more details
|
||||
*/
|
||||
void serial1_init(uint16_t addr, int irq);
|
||||
void serial2_init(uint16_t addr, int irq);
|
||||
void serial1_set(uint16_t addr, int irq);
|
||||
void serial2_set(uint16_t addr, int irq);
|
||||
void serial1_remove();
|
||||
void serial2_remove();
|
||||
void serial_reset();
|
||||
|
||||
struct SERIAL;
|
||||
|
||||
typedef struct _serial_ {
|
||||
uint16_t port;
|
||||
int16_t irq;
|
||||
typedef struct
|
||||
{
|
||||
uint8_t lsr,thr,mctrl,rcr,iir,ier,lcr,msr;
|
||||
uint8_t dlab1,dlab2;
|
||||
uint8_t dat;
|
||||
uint8_t int_status;
|
||||
uint8_t scratch;
|
||||
uint8_t fcr;
|
||||
|
||||
int irq;
|
||||
|
||||
uint8_t lsr, thr, mctrl, rcr, iir, ier, lcr, msr;
|
||||
uint8_t dlab1, dlab2;
|
||||
uint8_t dat;
|
||||
uint8_t int_status;
|
||||
uint8_t scratch;
|
||||
uint8_t fcr;
|
||||
|
||||
void (*rcr_callback)(struct _serial_ *, void *);
|
||||
void *rcr_callback_p;
|
||||
|
||||
uint8_t hold;
|
||||
uint8_t fifo[256];
|
||||
int fifo_read, fifo_write;
|
||||
|
||||
int receive_delay;
|
||||
|
||||
void *bh;
|
||||
void (*rcr_callback)(struct SERIAL *serial, void *p);
|
||||
void *rcr_callback_p;
|
||||
uint8_t fifo[256];
|
||||
int fifo_read, fifo_write;
|
||||
|
||||
int recieve_delay;
|
||||
} SERIAL;
|
||||
|
||||
extern SERIAL serial1, serial2;
|
||||
|
||||
extern void serial1_init(uint16_t addr, int irq);
|
||||
extern void serial2_init(uint16_t addr, int irq);
|
||||
extern void serial1_set(uint16_t addr, int irq);
|
||||
extern void serial2_set(uint16_t addr, int irq);
|
||||
extern void serial1_remove();
|
||||
extern void serial2_remove();
|
||||
|
||||
extern void serial_reset();
|
||||
extern SERIAL *serial_attach(int, void *, void *);
|
||||
extern void serial_write_fifo(SERIAL *, uint8_t);
|
||||
|
||||
|
||||
#endif /*SERIAL_H*/
|
||||
void serial_write_fifo(SERIAL *serial, uint8_t dat);
|
||||
|
||||
Reference in New Issue
Block a user