Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re[2]: [lpc2000] Re: Bit addressing

2006-03-01 by Alexey Bishletov

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,  Alex

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.