Removed all model-based one-line header files and moved their info to model.h. Added static to handler functions where needed.
This commit is contained in:
14
src/ps2.c
14
src/ps2.c
@@ -1,20 +1,25 @@
|
||||
#include "ibm.h"
|
||||
#include "cpu/cpu.h"
|
||||
#include "io.h"
|
||||
#include "mem.h"
|
||||
#include "ps2.h"
|
||||
#include "rom.h"
|
||||
#include "device.h"
|
||||
#include "model.h"
|
||||
#include "lpt.h"
|
||||
#include "serial.h"
|
||||
|
||||
|
||||
static uint8_t ps2_92, ps2_94, ps2_102, ps2_103, ps2_104, ps2_105, ps2_190;
|
||||
|
||||
|
||||
static struct
|
||||
{
|
||||
uint8_t status, int_status;
|
||||
uint8_t attention, ctrl;
|
||||
} ps2_hd;
|
||||
|
||||
uint8_t ps2_read(uint16_t port, void *p)
|
||||
|
||||
static uint8_t ps2_read(uint16_t port, void *p)
|
||||
{
|
||||
uint8_t temp;
|
||||
|
||||
@@ -53,7 +58,7 @@ uint8_t ps2_read(uint16_t port, void *p)
|
||||
return temp;
|
||||
}
|
||||
|
||||
void ps2_write(uint16_t port, uint8_t val, void *p)
|
||||
static void ps2_write(uint16_t port, uint8_t val, void *p)
|
||||
{
|
||||
switch (port)
|
||||
{
|
||||
@@ -114,7 +119,8 @@ void ps2_write(uint16_t port, uint8_t val, void *p)
|
||||
}
|
||||
}
|
||||
|
||||
void ps2board_init()
|
||||
|
||||
void ps2board_init(void)
|
||||
{
|
||||
io_sethandler(0x0091, 0x0001, ps2_read, NULL, NULL, ps2_write, NULL, NULL, NULL);
|
||||
io_sethandler(0x0092, 0x0001, ps2_read, NULL, NULL, ps2_write, NULL, NULL, NULL);
|
||||
|
||||
Reference in New Issue
Block a user