avr-libc-corelib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Avr-libc-corelib] proposed corelib style guide


From: Ron Kreymborg
Subject: RE: [Avr-libc-corelib] proposed corelib style guide
Date: Thu, 24 Sep 2009 21:48:04 +1000

> The code below works even without ever defining the weak function, so
> defining the function can be reserved for the user when they need it.
> 
> 
> uint8_t i2c_get_address (void) __attribute__ ((weak));
> 
> if (i2c_get_address)
>       i2c_get_address ();
> 
> --John

Looks a good solution to me, with the else providing an error or an
alternate operation.

Ron






reply via email to

[Prev in Thread] Current Thread [Next in Thread]