[277] | 1 | ; Project name : AssemblyLibrary |
---|
| 2 | ; Description : Defines for display library. |
---|
| 3 | |
---|
| 4 | %ifndef SERIAL_INC |
---|
| 5 | %define SERIAL_INC |
---|
| 6 | |
---|
| 7 | ;--------------- UART Equates ----------------------------- |
---|
| 8 | ; |
---|
| 9 | ; Serial Programming References: |
---|
| 10 | ; http://en.wikibooks.org/wiki/Serial_Programming |
---|
| 11 | ; |
---|
| 12 | |
---|
| 13 | Serial_UART_base EQU 0 |
---|
| 14 | Serial_UART_transmitByte EQU 0 |
---|
| 15 | Serial_UART_receiveByte EQU 0 |
---|
| 16 | |
---|
| 17 | ; |
---|
| 18 | ; Values for UART_divisorLow: |
---|
| 19 | ; 60h = 1200, 30h = 2400, 18h = 4800, 0ch = 9600, 6 = 19200, 4 = 28800, 3 = 38400, 2 = 57600, 1 = 115200 |
---|
| 20 | ; |
---|
| 21 | Serial_UART_divisorLow EQU 0 |
---|
| 22 | |
---|
| 23 | ; |
---|
| 24 | ; UART_divisorHigh is zero for all speeds including and above 1200 baud (which is all we do) |
---|
| 25 | ; |
---|
| 26 | Serial_UART_divisorHigh EQU 1 |
---|
| 27 | |
---|
| 28 | Serial_UART_interruptIdent EQU 2 |
---|
| 29 | Serial_UART_FIFOControl EQU 2 |
---|
| 30 | |
---|
| 31 | Serial_UART_lineControl EQU 3 |
---|
| 32 | |
---|
| 33 | Serial_UART_modemControl EQU 4 |
---|
| 34 | |
---|
| 35 | Serial_UART_lineStatus EQU 5 |
---|
| 36 | |
---|
| 37 | Serial_UART_modemStatus EQU 6 |
---|
| 38 | |
---|
| 39 | Serial_UART_scratch EQU 7 |
---|
| 40 | |
---|
| 41 | ;---------------------------------------------------------------------- |
---|
| 42 | ; |
---|
| 43 | ; COM Number to I/O Port Address Mapping |
---|
| 44 | ; |
---|
| 45 | ; COM Number: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 |
---|
| 46 | ; Corresponds to I/O port: 3f8, 2f8, 3e8, 2e8, 2f0, 3e0, 2e0, 260, 368, 268, 360, 270 |
---|
| 47 | ; Corresponds to Packed I/O port (hex): 37, 17, 35, 15, 16, 34, 14, 4, 25, 5, 24, 6 |
---|
| 48 | ; |
---|
| 49 | SERIAL_COM1_IOADDRESS EQU 3f8h |
---|
| 50 | SERIAL_COM2_IOADDRESS EQU 2f8h |
---|
| 51 | SERIAL_COM3_IOADDRESS EQU 3e8h |
---|
| 52 | SERIAL_COM4_IOADDRESS EQU 2e8h |
---|
| 53 | SERIAL_COM5_IOADDRESS EQU 2f0h |
---|
| 54 | SERIAL_COM6_IOADDRESS EQU 3e0h |
---|
| 55 | SERIAL_COM7_IOADDRESS EQU 2e0h |
---|
| 56 | SERIAL_COM8_IOADDRESS EQU 260h |
---|
| 57 | SERIAL_COM9_IOADDRESS EQU 368h |
---|
| 58 | SERIAL_COMA_IOADDRESS EQU 268h |
---|
| 59 | SERIAL_COMB_IOADDRESS EQU 360h |
---|
| 60 | SERIAL_COMC_IOADDRESS EQU 270h |
---|
| 61 | |
---|
| 62 | %endif |
---|