[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-libc-dev] Wishlist: place static bool in GPIO registers
From: |
Stu Bell |
Subject: |
RE: [avr-libc-dev] Wishlist: place static bool in GPIO registers |
Date: |
Wed, 19 Dec 2007 13:24:30 -0700 |
> -----Original Message-----
> From: Weddington, Eric [mailto:address@hidden
> Sent: Wednesday, December 19, 2007 1:13 PM
> . . .
> BIT_receive_132 = 1;
> BIT_recv_error = 0;
> if (BIT_buffer_status == 1) {}
>
>
> Thanks!
>
> Note that "true" and "false" are already defined in <stdbool.h> and
any implementation
> should use those definitions.
Sorry, just cut&pasted my little reminder from the post to here. I
wouldn't include it.
> It would be great if someone could volunteer to help work up a full
implementation... ;-)
The real problem with a full workup would be a macro to help define
"bit" variables. For example it would be cool to do something like the
following:
#define DECLARE_BIT_VARIABLE(var,port,bnum) \
#define (name) ((volatile BitRegisterType*)_SFR_MEM_ADDR( (port )
)->bit ## bnum
The above code is completely wrong, as the preprocessor won't allow a
declare within a declare. Does someone have a clue how to "nicely"
declare a bit variable other than putting the above into a long
explanation in the comment header/documentation (which will surely be
ignored by the noobs)?
> I know that nothing will be done with this until 1.6.0 is out and also
after the holidays.
HMMmmm... I might have some time... ;-)
Best regards,
Stu Bell
DataPlay (DPHI, Inc.)