Re: [avr-libc-dev] Wishlist: place static bool in GPIO registers

2007-12-20 Thread David Brown
Stu Bell wrote: -Original Message- From: Weddington, Eric [mailto:[EMAIL PROTECTED] 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 and any implemen

Re: [avr-libc-dev] Wishlist: place static bool in GPIO registers

2007-12-19 Thread Dmitry K.
On Thursday 20 December 2007 07:12, Shaun Jackman wrote: [...] > So, my wishlist item is to be able to use an attribute on a static > bool to locate it in the GPIO section, similar to PROGMEM, such as > #define IOMEM __attribute__((__iomem__)) > static bool IOMEM my_flag; [...] A little note: PROG

Re: [avr-libc-dev] Wishlist: place static bool in GPIO registers

2007-12-19 Thread Shaun Jackman
On Dec 19, 2007 2:39 PM, Stu Bell <[EMAIL PROTECTED]> wrote: > > The bit-field approach solves my primary complaint by not needing any > > accessor functions. Both if (my_flag) and my_flag = true; work as > > expected. As for the declaration, perhaps #define my_flag > > (GPIOR0_BIT.bit0) would be s

RE: [avr-libc-dev] Wishlist: place static bool in GPIO registers

2007-12-19 Thread Stu Bell
ell DataPlay (DPHI, Inc.) -Original Message- From: Shaun Jackman [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 19, 2007 2:26 PM To: Stu Bell Cc: Weddington, Eric; avr-libc-dev@nongnu.org Subject: Re: [avr-libc-dev] Wishlist: place static bool in GPIO registers On Dec 19, 2007 1:24 PM, Stu Bell &

Re: [avr-libc-dev] Wishlist: place static bool in GPIO registers

2007-12-19 Thread Shaun Jackman
On Dec 19, 2007 1:24 PM, Stu Bell <[EMAIL PROTECTED]> wrote: ... > 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) ((volat

Re: [avr-libc-dev] Wishlist: place static bool in GPIO registers

2007-12-19 Thread Shaun Jackman
On Dec 19, 2007 12:35 PM, Weddington, Eric <[EMAIL PROTECTED]> wrote: > > The General Purpose I/O Registers (GPIOR0 through GIPOR3) are directly > > bit-accessible. It would be a very handy feature to be able to place a > > static bool (or any variable, I suppose) in the GPIO registers. > > Hi Shau

RE: [avr-libc-dev] Wishlist: place static bool in GPIO registers

2007-12-19 Thread Stu Bell
> -Original Message- > From: Weddington, Eric [mailto:[EMAIL PROTECTED] > 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 and any implem

RE: [avr-libc-dev] Wishlist: place static bool in GPIO registers

2007-12-19 Thread Weddington, Eric
> -Original Message- > From: > [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > org] On Behalf Of Stu Bell > Sent: Wednesday, December 19, 2007 12:21 PM > To: Shaun Jackman; avr-libc-dev@nongnu.org > Subject: RE: [avr-libc-dev] Wishlist: place static bool in &g

RE: [avr-libc-dev] Wishlist: place static bool in GPIO registers

2007-12-19 Thread Stu Bell
This was posted by Cliff Lawson on AVRFreaks. I've modified it for GPIOR0. typedef struct { unsigned char bit0:1; unsigned char bit1:1; unsigned char bit2:1; unsigned char bit3:1; unsigned char bit4:1; unsigned char bit5:1; unsigned char bit6:1; unsigned c

RE: [avr-libc-dev] Wishlist: place static bool in GPIO registers

2007-12-19 Thread Weddington, Eric
> -Original Message- > From: > [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > org] On Behalf Of Shaun Jackman > Sent: Wednesday, December 19, 2007 12:00 PM > To: avr-libc-dev@nongnu.org > Subject: [avr-libc-dev] Wishlist: place static bool in GPIO registers > > The General Purpose I/