This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PCI on i386 PC.


Hi,

On my first implementation of PCI for i386 I didn't have implemented the
CYG_HAL_INTERRUPT_TRANSLATE macro.

So now I have this implementation:

#define HAL_PCI_TRANSLATE_INTERRUPT( __bus, __devfn, __vec, __valid) \
	CYG_MACRO_START		\
	
HAL_PCI_CFG_READ_UINT8((__bus),(__devfn),CYG_PCI_CFG_INT_LINE,(__vec)); \
	if(__vec<=15) __valid=1; \
	else __valid=0;		\
	__vec+=PC_HARDWARE_IRQ_OFFSET; \
	CYG_MACRO_END


Does it looks good ?
(except that 15, in "__vec<=15", should be replaced by a macro)


Thanks 

-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]