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]
Other format: [Raw text]

Re: HAL macros and RTC


On Mon, 2003-01-27 at 17:04, Fabrice Gautier wrote:
> Hi,
> 
> In most hal, CYGNUM_HAL_INTERRUPT_xxx macros are used to describe all the
> different Interrupts vectors. Most of the CYGNUM_HAL_INTERRUPT_xxx are arch
> specific however. For example some arch define CYGNUM_HAL_INTERRUPT_TIMER0
> and _TIMER1 whereas other could define _TIMER1 and TIMER2 or just _TIMER if
> they have only one. So i assumed that those macros where completely arch
> specific and I defined a CYGNUM_HAL_RTC to the interrupt vector of an
> hardware clock.
> 
> Unfortunately this macros is used as by the kernel (in clock.cxx) as the
> interrupt driving the kernel internal clock. So i actually have to define
> CYGNUL_HAL_INTERRUPT_RTC as CYGNUM_HAL_INTERRUPT_TIMER and find another name
> for ny hardware clock.
> 
> Would you think it would be a better idea to let the
> CYGNUM_HAL_INTERRUPT_xxx macro arch-specifique and come up with a generic
> name to be used by the kernel ? 
> 
> The name doesnt matter really, it's just that I got confused on that...
> 

The platforms define CYGNUM_HAL_INTERRUPT_xxx and they are very
much platform specific.  CYGNUM_HAL_INTERRUPT_RTC is the one 
interrupt which must be defined by a platform for the heartbeat
clock/timer, thus the platform neutral name.

Is this not how you expected it to work?

-- 
------------------------------------------------------------
Gary Thomas                 |
MLB Associates              |  Consulting for the
+1 (970) 229-1963           |    Embedded world
http://www.mlbassoc.com/    |
email: <gary@mlbassoc.com>  |
gpg: http://www.chez-thomas.org/gary/gpg_key.asc
------------------------------------------------------------


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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