// Generic IO functions
#include "io.h"


void IOInit(void){      
    ANSELA=0;               //not using any ADC
    ANSELB=0;

    TRISAbits.TRISA0=0;    //RED LED OUTPUT
    LATAbits.LATA0=0;      //RED LED OFF
    TRISBbits.TRISB15=0;    //AMBER LED OUTPUT
    LATBbits.LATB15=0;      //AMBER LED OFF
    TRISBbits.TRISB13=0;    //GREEN LED OUTPUT
    LATBbits.LATB13=0;      //GREEN LED OFF

    TRISBbits.TRISB5=1;     //JP1 input working
    CNPUBbits.CNPUB5=1;     //JP1 pullup
    TRISBbits.TRISB7=1;     //JP2 input working
    CNPUBbits.CNPUB7=1;     //JP2 pullup
    TRISBbits.TRISB8=1;     //JP3 input working
    CNPUBbits.CNPUB8=1;     //JP3 pullup
    TRISBbits.TRISB9=1;     //JP4 input working
    CNPUBbits.CNPUB9=1;     //JP4 pullup
}
