Thread: Encoder Code
View Single Post
  #7   Spotlight this post!  
Unread 18-01-2006, 16:16
radicalnerd radicalnerd is offline
Registered Luser
FRC #0668 (Apes of Wrath)
Team Role: Programmer
 
Join Date: Dec 2005
Location: San Jose, CA
Posts: 12
radicalnerd is an unknown quantity at this point
Send a message via AIM to radicalnerd
Re: Encoder Code

the p18f8722.h file i have (mcc 2.40) says:

Code:
extern volatile near unsigned char       INTCON2;
extern volatile near union {
  struct {
    unsigned RBIP:1;
    unsigned INT3P:1;
    unsigned T0IP:1;
    unsigned INTEDG3:1;
    unsigned INTEDG2:1;
    unsigned INTEDG1:1;
    unsigned INTEDG0:1;
    unsigned NOT_RBPU:1;
  };
  struct {
    unsigned :2;
    unsigned TMR0IP:1;
    unsigned :4;
    unsigned RBPU:1;
  };
} INTCON2bits;
i'm a noob, but
shouldn't the second struct be
unsigned :1;
unsigned INT3IP:1;
and does INT3P = INT3IP ?