Intel 386 Manual do Utilizador Página 234

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 691
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 233
9-35
INTERRUPT CONTROL UNIT
/*****************************************************************************
InitICUSlave
Description:
Initialization only the internal slave Interrupt Control Units (ICU).
This routine only initializes the internal interrupt controller,
external ICUs must be initialized separately.
Parameters:
SlaveMode Mode of operation for Slave ICU
SlaveBase Specifies the base interrupt vector number for the
Slave interrupts.
For example, if IR1 of the slave goes active and the
SlaveBase = 0x40 the processor uses interrupt
vector table entry 0x41.
SlavePins Defines what EX pins are available externally to the
chip for the Slave.
Returns:Error Code
E_OK -- Initialized OK, No error.
Assumptions:
REMAPCFG register has Expanded I/O space access enabled (ESE bit set).
Syntax:
/* ICU Modes */
#define ICU_SFNM 0x10
#define ICU_AUTOEOI 0x2
#define ICU_TRIGGER_LEVEL 0x8
#define ICU_TRIGGER_EDGE 0x0
/* ICU Slave Pins */
#define SPIN_INT4 0x1
#define SPIN_INT5 0x2
#define SPIN_INT6 0x4
#define SPIN_INT7 0x8
int error_code;
error_code = InitICUSlave(ICU_TRIGGER_EDGE, 0x30, SPIN_INT4);
Real/Protected Mode
No changes required.
*****************************************************************************/
int InitICUSlave(BYTE SlaveMode, BYTE SlaveBase, BYTE SlavePins)
{
BYTE cfg_pins;
/* Program Slave ICU */
Vista de página 233
1 2 ... 229 230 231 232 233 234 235 236 237 238 239 ... 690 691

Comentários a estes Manuais

Sem comentários