#include "h/buttons.h"
#include "h/p33FJ64GP802.h"

unsigned int buttonsLastPressed[NUM_BUTTONS];
unsigned int buttonsPressed[NUM_BUTTONS];

void initButtons(void)
{
	TRIS_KEY_RETURN=1;
}

int checkButtons(void)
{
	unsigned int i, j, r;
	j=1;
	r=0;
	for(i=0; i<NUM_BUTTONS; i++)
	{
	sendShiftRegister(~j);
	if(KEY_RETURN==0)r|=j;
	j=j<<1;
	}
	return r;
}

