Table of Contents        Previous topic       Next topic       

Virtual Workshop Interface->General Purpose Interface Calls->GetSerialInputWord()

extern "C" LONG GetSerialInputWord(LONG nExtensionState, LONG nBuffAddress, WORD* pnWord)

The simulator will call GetSerialInputWord to ask for serial input data.  It is an alternative to GetSerialInput and allows the extension to provide the simulator with 10 bits of input data.  The extension can place the data in *pnWord and return one.

If the UART is in multiprocessor communication mode with SM2 set, the simulator will use the ninth bit (RB8) to determine whether or not the RI interrupt flag should be set.

If the variant supports framing error detection, then the simulator will use the ninth bit (mode 1) or tenth bit (modes 2 and 3) as the stop bit.  If this stop bit is not set and framing error detection is enabled, then the frame error flag will be set.

If a variant supports more than one serial port, the extension can test the value of nBuffAddress to determine which serial port will receive the data from this call.

The extension should return zero if it does not want to handle this call.