Home |
RTTarget-32 Programming Manual Function RTPCSetConfigRegister Function RTPCMapUART System Management BIOS (SMBIOS) Advanced Programmable Interrupt Controller (APIC) |
Function RTPCMapUARTThis function maps and enables all required resources to use a serial port PCMCIA card: void RTPCMapUART(int Socket, WORD IOBase, int IRQ); This function should be called after an application has verified that a serial port card type has been inserted. ParametersSocketSpecifies the socket of the card to map. IOBaseSpecifies the I/O address at which the serial port should appear. IRQThe interrupt to be used by the port to signal interrupts. For example, if you want to use the port as COM2, use: RTPCMapUART(Socket, 0x2F8, 3); Function RTPCMapUART's source code is: void RTPCMapUART(int Socket, WORD IOBase, int IRQ) { RTPCSetConfigRegister(Socket, RTPC_CFGREG_OPTION, 0x41); RTPCUnmapCIS(Socket); RTPCMapIOWindow(Socket, 0, IOBase, IOBase, 8, RTPC_IO_WINDOW_8BIT | RTPC_IO_WINDOW_TIMER1); RTPCEnableIRQ(Socket, IRQ); }
|