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: Wed, 23 Sep 2009 17:50:54 +1000

> void GetClockFrequency(long crystal);

Of course this should be: long GetClockFrequency(void):
 
> Thinking of call-back, is there some gcc modifier that allows for
> definition
> of a "weak" function? This would allow call-backs to be instanced in
> the
> library as null functions and save the user from creating an instance
> in
> their code just to satisfy the linker when they have no need for it.
> Hmmm.
> Or does that invite problems?

Answering myself, I just built a quick test library and gcc's __attribute__
((weak)) works fine.

My question could be answered by the weak version returning something or
doing something impossible, which the library could use to define an error.
This probably needs more thought...

Ron






reply via email to

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