|
| 1 | +/* |
| 2 | + * PROJECT: ReactOS ComPort Library |
| 3 | + * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) |
| 4 | + * or MIT (https://spdx.org/licenses/MIT) |
| 5 | + * PURPOSE: Default UART Settings |
| 6 | + * COPYRIGHT: Copyright 2022-2026 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org> |
| 7 | + */ |
| 8 | + |
| 9 | +#pragma once |
| 10 | + |
| 11 | +/* Serial debug connection */ |
| 12 | +#if defined(SARCH_PC98) |
| 13 | +#define DEFAULT_DEBUG_PORT 2 /* COM2 */ |
| 14 | +#define DEFAULT_DEBUG_COM1_IRQ 4 |
| 15 | +#define DEFAULT_DEBUG_COM2_IRQ 5 |
| 16 | +#define DEFAULT_DEBUG_BAUD_RATE 9600 |
| 17 | +#else |
| 18 | +#define DEFAULT_DEBUG_PORT 2 /* COM2 */ |
| 19 | +#define DEFAULT_DEBUG_COM1_IRQ 4 |
| 20 | +#define DEFAULT_DEBUG_COM2_IRQ 3 |
| 21 | +#define DEFAULT_DEBUG_BAUD_RATE 115200 |
| 22 | +#endif |
| 23 | + |
| 24 | +/* Serial connection */ |
| 25 | +#if defined(SARCH_PC98) |
| 26 | +#define DEFAULT_BAUD_RATE 9600 |
| 27 | +#else |
| 28 | +#define DEFAULT_BAUD_RATE 19200 |
| 29 | +#endif |
| 30 | + |
| 31 | +#if defined(_M_IX86) || defined(_M_AMD64) |
| 32 | +#if defined(SARCH_PC98) |
| 33 | +static const ULONG BaseArray[] = {0, 0x30, 0x238}; |
| 34 | +#else |
| 35 | +static const ULONG BaseArray[] = {0, 0x3F8, 0x2F8, 0x3E8, 0x2E8}; |
| 36 | +#endif |
| 37 | +#elif defined(_M_PPC) |
| 38 | +static const ULONG BaseArray[] = {0, 0x800003F8}; |
| 39 | +#elif defined(_M_MIPS) |
| 40 | +static const ULONG BaseArray[] = {0, 0x80006000, 0x80007000}; |
| 41 | +#elif defined(_M_ARM) |
| 42 | +static const ULONG BaseArray[] = {0, 0xF1012000}; |
| 43 | +// #define QEMUUART ((ULONG)0x09000000) |
| 44 | +#else |
| 45 | +#error Unknown architecture |
| 46 | +#endif |
| 47 | + |
| 48 | +#define MAX_COM_PORTS (sizeof(BaseArray) / sizeof(BaseArray[0]) - 1) |
| 49 | + |
| 50 | +/* EOF */ |
0 commit comments