3:47:56 PM, Wednesday, March 1, 2006, Mukund wrote:
> Thanks for the mail.
> I am porting huge code from 8052 involving lots of port and bit variable.
> I just want to know how a pin/bit is defined in header file of LPC2138, so
> that rest of my 8051 code remains unchanged.
> In 8051 to set a bit we use
> P1_7=1;
typedef struct
{
unsigned long n0:1;
unsigned long n1:1;
unsigned long n2:1;
unsigned long n3:1;
unsigned long n4:1;
unsigned long n5:1;
unsigned long n6:1;
unsigned long n7:1;
} BITS32;
#define P1 (*((volatile BITS32 *) 0xE0028014))
#define P1_7 (P1.7)
WBR, AlexMessage
Re[2]: [lpc2000] Re: Bit addressing
2006-03-01 by Alexey Bishletov