Refactor COM port support, to get rid of global variables in library

This commit is contained in:
2024-06-12 18:02:29 +02:00
parent 91e8a86ee2
commit 906e09fd9f
8 changed files with 53 additions and 57 deletions

View File

@@ -68,8 +68,9 @@
/* PIC vector definitions */
#define PIC1_VECTOR_SPURIOUS 0x37
/* Serial port I/O addresses */
#define COMPORT_ADDRESSES {0x000, 0x3F8, 0x2F8, 0x3E8, 0x2E8, 0x5F8, 0x4F8, 0x5E8, 0x4E8}
/* Serial ports information */
#define COMPORT_ADDRESS {0x3F8, 0x2F8, 0x3E8, 0x2E8, 0x5F8, 0x4F8, 0x5E8, 0x4E8}
#define COMPORT_COUNT 8
/* Initial stall factor */
#define INITIAL_STALL_FACTOR 100

View File

@@ -23,7 +23,6 @@ HlComPortPutByte(IN PCPPORT Port,
XTCDECL
XTSTATUS
HlInitializeComPort(IN OUT PCPPORT Port,
IN ULONG PortNumber,
IN PUCHAR PortAddress,
IN ULONG BaudRate);

View File

@@ -75,8 +75,9 @@
/* PIC vector definitions */
#define PIC1_VECTOR_SPURIOUS 0x37
/* Serial port I/O addresses */
#define COMPORT_ADDRESSES {0x000, 0x3F8, 0x2F8, 0x3E8, 0x2E8, 0x5F8, 0x4F8, 0x5E8, 0x4E8}
/* Serial ports information */
#define COMPORT_ADDRESS {0x3F8, 0x2F8, 0x3E8, 0x2E8, 0x5F8, 0x4F8, 0x5E8, 0x4E8}
#define COMPORT_COUNT 8
/* Initial stall factor */
#define INITIAL_STALL_FACTOR 100