// I/O pins #define LED0_TRIS (TRISBbits.TRISB2) #define LED0_IO (PORTBbits.RB2) #define LED1_TRIS (TRISBbits.TRISB3) #define LED1_IO (PORTBbits.RB3) #define LED2_TRIS (TRISBbits.TRISB4) #define LED2_IO (PORTBbits.RB4) #define LED3_TRIS (TRISBbits.TRISB5) #define LED3_IO (PORTBbits.RB5) #define LED4_TRIS (TRISBbits.TRISB5) #define LED4_IO (PORTBbits.RB5) #define LED5_TRIS (TRISBbits.TRISB5) #define LED5_IO (PORTBbits.RB5) #define LED6_TRIS (TRISBbits.TRISB5) #define LED6_IO (PORTBbits.RB5) #define LED7_TRIS (TRISBbits.TRISB5) #define LED7_IO (PORTBbits.RB5) #define BUTTON0_TRIS (TRISBbits.TRISB6) #define BUTTON0_IO (PORTBbits.RB6) #define BUTTON1_TRIS (TRISBbits.TRISB7) #define BUTTON1_IO (PORTBbits.RB7) #define BUTTON2_TRIS (TRISBbits.TRISB6) // No Button2 on this board, remap to Button0 #define BUTTON2_IO (PORTBbits.RB6) #define BUTTON3_TRIS (TRISBbits.TRISB6) // No Button3 on this board, remap to Button0 #define BUTTON3_IO (PORTBbits.RB6) // ENC28J60 I/O pins #define ENC_RST_TRIS (TRISCbits.TRISC1) #define ENC_RST_IO (LATCbits.LATC1) #define ENC_CS_TRIS (TRISCbits.TRISC2) #define ENC_CS_IO (LATCbits.LATC2) #define ENC_SCK_TRIS (TRISCbits.TRISC3) #define ENC_SDI_TRIS (TRISCbits.TRISC4) #define ENC_SDO_TRIS (TRISCbits.TRISC5) #define ENC_SPI_IF (PIR1bits.SSPIF) #define ENC_SSPBUF (SSPBUF) #define ENC_SPISTAT (SSPSTAT) #define ENC_SPISTATbits (SSPSTATbits) #define ENC_SPICON1 (SSPCON1) #define ENC_SPICON1bits (SSPCON1bits) #define ENC_SPICON2 (SSPCON2)