Skip to content

Commit 01ff8b6

Browse files
authored
Add support for COM3 & COM4 (#22)
1 parent 95af17c commit 01ff8b6

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Code for FujiNet RS-232 Version
55

66
The current code which is built against FUJICOM reacts to the following environment variables
77

8-
| Variable | Default | Description |
9-
|-----------|---------|---------------------------------|
10-
| FUJI_PORT | 1 | The Serial port to use, 1 or 2. |
11-
| FUJI_BAUD | 9600 | The Baud rate to use. |
8+
| Variable | Default | Description |
9+
|-----------|---------|-------------------------------------|
10+
| FUJI_PORT | 1 | The Serial port to use, 1, 2, 3, 4. |
11+
| FUJI_BAUD | 9600 | The Baud rate to use. |
1212

fujicom/com.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,16 @@ extern int port_identify_uart(PORT far *port);
7676

7777
/*
7878
* These are the standard UART addresses and interrupt
79-
* numbers for the two IBM compatible COM ports.
79+
* numbers for the four IBM compatible COM ports.
8080
*/
8181
#define COM1_UART 0x3f8
8282
#define COM1_INTERRUPT 12
8383
#define COM2_UART 0x2f8
8484
#define COM2_INTERRUPT 11
85+
#define COM3_UART 0x3e8
86+
#define COM3_INTERRUPT 12
87+
#define COM4_UART 0x2e8
88+
#define COM4_INTERRUPT 11
8589

8690
enum {
8791
UART_8250 = 0,

fujicom/fujicom.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ void fujicom_init(void)
5454
base = COM2_UART;
5555
irq = COM2_INTERRUPT;
5656
break;
57+
case 3:
58+
base = COM3_UART;
59+
irq = COM3_INTERRUPT;
60+
break;
61+
case 4:
62+
base = COM4_UART;
63+
irq = COM4_INTERRUPT;
64+
break;
5765
}
5866

5967
port = port_open(&fn_port, base, irq);

sys/commands.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ uint16_t Output_cmd(SYSREQ far *req)
196196
return ERROR_BIT | UNKNOWN_UNIT;
197197
}
198198

199-
if (disk_slots[req->unit].mode != MODE_READWRITE)
199+
if (disk_slots[req->unit].mode != SLOT_READWRITE)
200200
return ERROR_BIT | WRITE_PROTECT;
201201

202202
if (req->length > 22)

0 commit comments

Comments
 (0)