|
|
@ -5,7 +5,8 @@ |
|
|
|
|
|
|
|
#define NES_PAD_DDR_PL DDR(NES_PAD_PORT_PL) |
|
|
|
#define NES_PAD_DDR_CLK DDR(NES_PAD_PORT_CLK) |
|
|
|
#define NES_PAD_DDR_DS DDR(NES_PAD_PIN_DS) |
|
|
|
#define NES_PAD_PIN_DS PIN(NES_PAD_PORT_DS) |
|
|
|
#define NES_PAD_DDR_DS DDR(NES_PAD_PORT_DS) |
|
|
|
volatile unsigned char fakeport; |
|
|
|
unsigned char waitForFire; |
|
|
|
|
|
|
@ -14,9 +15,9 @@ void joy_init(){ |
|
|
|
|
|
|
|
NES_PAD_DDR_PL |= 1<<NES_PAD_BIT_PL; |
|
|
|
NES_PAD_DDR_CLK |= 1<<NES_PAD_BIT_CLK; |
|
|
|
NES_PAD_PORT_DS |= (1<<NES_PAD_BIT_DS);//pullup
|
|
|
|
NES_PAD_DDR_DS &= ~(1<<NES_PAD_BIT_DS); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
void readButtons(){ |
|
|
|