Intel 386 Manuale Utente Pagina 427

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 691
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 426
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) );
Vedere la pagina 426
1 2 ... 422 423 424 425 426 427 428 429 430 431 432 ... 690 691

Commenti su questo manuale

Nessun commento