[En-Nut-Discussion] Next Nut/OS 5 release candidate

Harald Kipp harald.kipp at egnite.de
Thu Oct 11 15:26:44 CEST 2012


Hi Uwe,

On 11.10.2012 12:28, Uwe Bonnes wrote:
>>>>>> "Harald" == Harald Kipp <harald.kipp at egnite.de> writes:
>     Harald> And the latter causes the following problem (probably on all ARM
>     Harald> targets):
> 
> Could you test current svn?

r4751 fixed this.


> I started a discusssion some time ago about the need for most GPIO_CFG
> defines common. I couldn't make my arguments understandable. Are they more
> understandable now?

What thread are you referring to. This one?

http://lists.egnite.de/pipermail/en-nut-discussion/2012-September/013942.html


> Rethinking the commit, probably in nut/include/dev/gpio.h after all includes 
> #if !defined(GPIO_CFG_INIT_HIGH)
> #define GPIO_CFG_INIT_HIGH 0
> #endif
> 
> #if !defined(GPIO_CFG_INIT_LOW)
> #define GPIO_CFG_INIT_LOW 0
> #endif
> 
> would have been better. Should I do another commit?


No, I'd prefer the current solution. With the one above the individual
driver is no longer able to properly adapt to a missing feature, like

int FooBarApi(void)
{
#ifdef GPIO_CFG_INIT_HIGH
  /* Normal code. */
  ...
  return 0;
#else
  /* Not supported, return an error. */
  return -1;
#endif
}

Regards,

Harald



More information about the En-Nut-Discussion mailing list