Intel 386 User Manual page 427

Embedded microprocessor
Table of Contents

Advertisement

Intel386™ EX EMBEDDED MICROPROCESSOR USER'S MANUAL
/* Init Baud Rate Generator */
_SetEXRegByte(SSIOBAUD,BaudValue);
}
_SetEXRegByte(SSIOCON1,Mode);
_SetEXRegByte(SSIOCON2,MasterTxRx);
}/* InitSSIO */
/*****************************************************************************
SSerialReadWord:
Description:
Is a Polled serial port read function that will wait forever
or until a character has been received from the serial port.
Parameters:
MasterSlave
Returns:
Word read from serial port
Assumptions:
In Slave Mode, receiver must be enabled prior to this function call.
Syntax:
#define SSIO_RX_MASTR
#define SSIO_RX_SLAVE
WORD character;
character = SSerialReadWord( SSIO_RX_MASTR );
Real/Protected Mode:
No changes required.
******************************************************************************/
WORD SSerialReadWord(BYTE MasterSlave)
{
register BYTE SSControl;
if(MasterSlave == SSIO_RX_MASTR)
{
/* Save Control Register */
SSControl = _GetEXRegByte(SSIOCON1);
/* Get Control Register Ready to disable */
SSControl &= (~SSIO_RX_ENAB);// Clear the bit
/* Enable Receiver */
_SetEXRegByte(SSIOCON1, SSControl | SSIO_RX_ENAB);
/* Wait until Receive Holding Buffer is Full */
while( !(_GetEXRegByte(SSIOCON1) & SSIO_RHBF) );
13-28
Defines if receiver is in Master or Slave mode
0x1
0x0

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Intel386 exIntel386 extbIntel386 extc

Table of Contents