RAM 6.0 BUX II Series Guia do Utilizador Página 102

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 189
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 101
VxWorks
BSP Developer’s Guide, 6.0
94
* the interrupt assignment correctly. The design of this
* routine should handle any board design.
*
* RETURNS: N/A
*/
UCHAR sysPciAutoconfigIntrAssign
(
PCI_SYSTEM * pSys, /* input: AutoConfig system information */
PCI_LOC * pFunc,
UCHAR intPin /* input: interrupt pin number */
)
{
UCHAR irqValue = 0xff; /* Calculated value */
int bus = pSys->bus; /* PCI bus number */
int device = pSys->device; /* PCI device number */
int i;
/* if no interrupt is required, return default (unassigned) value */
if (intPin == 0)
return irqValue;
/* return the vector for this device as the irqValue */
for (i = 0; intIrqTable[i].intPin != 0; i++)
{
if ((bus == intIrqTable[i].bus) &&
(device == intIrqTable[i].device) &&
(intPin == intIrqTable[i].intPin))
{
irqValue = intIrqTable[i].irq;
break;
}
}
return (irqValue);
}
All of the above PCI configuration code should be included in sysBusPci.c.
However, there must be a call to sysPciAutoConfig( ) from somewhere in sysLib.c.
Modify sysHwInit2( ) in sysLib.c so that it makes a call to sysPciAutoConfig( ) to
initialize the BSP support for PCI devices. This is done after the clock is connected.
If the serial line does not reside on the PCI bus, initialize the serial line prior to the
PCI support. Other devices should be configured after PCI. The following is some
sample code:
Vista de página 101
1 2 ... 97 98 99 100 101 102 103 104 105 106 107 ... 188 189

Comentários a estes Manuais

Sem comentários