On 01/06/13 07:16, Karl Palsson wrote:
>
> In lib/stm32/common/timer_common_all.c:
>
> > @@ -223,7 +223,7 @@ bool timer_interrupt_source(u32 timer_peripheral, u32 flag)
> >  	if (((TIM_SR(timer_peripheral) & TIM_DIER(timer_peripheral) & flag) == 0) ||
> >  		(flag > TIM_SR_BIF)) return false;
> >  /* Only an interrupt source for advanced timers */
> > -#if (defined(ADVANCED_TIMERS) && (ADVANCED_TIMERS))
> > +#if (defined(ADVANCED_TIMERS))
>
> I'd kinda actually rather see it go the other way, #if 
> (ADVANCED_TIMERS) without the check on it being defined. This was to 
> avoid the surprise of doing #define ADVANCED_TIMERS 0, and seeing that 
> it included it just the same as #define ADVANCED_TIMERS 1
>
Doxygen doesn't seem to cope with the macro

#define ADVANCED_TIMERS (defined(TIM1_BASE) || defined(TIM8_BASE))

at the top of the file, being substituted further down. I don't know 
what its grief is, but if I do the replacements throughout, essentially 
doing away with the macro ADVANCED_TIMERS, doxygen is happy. So instead of

#if (defined(ADVANCED_TIMERS) &&  (ADVANCED_TIMERS))

we would have

#if (defined(TIM1_BASE) || defined(TIM8_BASE))

throughout the code. C preprocessor has no issue either way - probably a 
doxygen bug.

I'll push up this change later today if there are no objections.

> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/libopencm3/libopencm3/pull/154/files#r4486098>.
>