EasyManua.ls Logo

Intel 386

Intel 386
691 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Intel386™ EX EMBEDDED MICROPROCESSOR USERS MANUAL
13-28
/* 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 Defines if receiver is in Master or Slave mode
Returns:
Word read from serial port
Assumptions:
In Slave Mode, receiver must be enabled prior to this function call.
Syntax:
#define SSIO_RX_MASTR 0x1
#define SSIO_RX_SLAVE 0x0
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) );

Table of Contents

Related product manuals