My 2 cents:
Mukund,
Unfortunately there is seperate control over set and clear of GPIO
in the LPC 2XXX .. my initial guess is that this is not slam dunk as
you would expect it to be. You might have to rummage through the
code to see if you are setting the bits or clearing it and then
modify that line as required.
Tedious and unfortunate ...
Ajay
--- In lpc2000@yahoogroups.com, Mukund Deshmukh <betacomp_ngp@...>
wrote:
>
> Thanks for the reply.
> As I am transferring my C51 source to Arm, I wanted something as
simple as
>
> Some_io_port_0.15=1
>
> So that I define only Some_io_port and my rest of source remains
same.
>
>
>
> Best Regards,
>
> Mukund Deshmukh.
> Beta Computronics Pvt Ltd,
> 10/1, IT Park, Parsodi,
> Nagpur-440022
> Cell - 9422113746
> ----- Original Message -----
> From: "Boris Králik" <kralikbo@...>
> To: <lpc2000@yahoogroups.com>
> Sent: Wednesday, March 01, 2006 12:46 PM
> Subject: Re: [lpc2000] Bit addressing
>
>
> > OH, sorry.
> > Port operations:
> > GPIO0_IOSET |= (1 << 15);//Write
> > 15_bit_of_port_0 = (PCB_PINSEL0 >> 15) & 0x1); //Read
> > --- Boris Králik <kralikbo@...> wrote:
> >
> > > var |= (1 << 5); //set 5 bit of variable var to 1
> > > (writing)
> > > if (var & (1 << 5)) //test 5 bit of var (reading)
> > >
> > > --- Mukund Deshmukh <betacomp_ngp@...>
> > > wrote:
> > >
> > > > Hi,
> > > > A stupid question...
> > > > I am used C51 and like bit addressing in 'C', but
> > > in
> > > > LPC its not possible.
> > > >
> > > > 1. Is there any way I can read or write a port bit
> > > > by simply writing /
> > > > reading 1/0 .
> > > >
> > > > Example for writing
> > > >
> > > > Some_bit_P0_15=1
> > > >
> > > >
> > > > or reading
> > > > if (Some_bit_P0_15) {}
> > > >
> > > >
> > > >
> > > > Best Regards,
> > > >
> > > > Mukund Deshmukh.
> > > > Beta Computronics Pvt Ltd,
> > > > 10/1, IT Park, Parsodi,
> > > > Nagpur-440022
> > > > Cell - 9422113746
> > > >
> > > >
> > >
> > >
> > > Regards / S pozdravom Boris Kralik
> > >
> > > http://www.geocities.com/kralikbo/
> > > -------------------------------------------------
> > >
> > >
> > >
> > >
> > ___________________________________________________________
> > >
> > > To help you stay safe and secure online, we've
> > > developed the all new Yahoo! Security Centre.
> > > http://uk.security.yahoo.com
> > >
> >
> >
> > Regards / S pozdravom Boris Kralik
> >
> > http://www.geocities.com/kralikbo/
> > -------------------------------------------------
> >
> >
> >
> >
> >
> > ___________________________________________________________
> > Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide
withShow quoted textHide quoted text
> voicemail http://uk.messenger.yahoo.com
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
>