Browse Source

Small

master
Raphaël Assénat 9 years ago
parent
commit
a62f69fc92
  1. 8
      dc_pad.c
  2. 8
      main.c
  3. 5
      maplebus.c

8
dc_pad.c

@ -163,10 +163,10 @@ static void dcReadPad(void) @@ -163,10 +163,10 @@ static void dcReadPad(void)
// 13 : Joy Y axis
// 14 : Joy X2 axis
// 15 : Joy Y2 axis
last_built_report[0][0] = tmp[12]-1;
last_built_report[0][1] = tmp[13]-1;
last_built_report[0][2] = tmp[10];
last_built_report[0][3] = tmp[11];
last_built_report[0][0] = tmp[12];
last_built_report[0][1] = tmp[13];
last_built_report[0][2] = tmp[10] / 2 + 0x80;
last_built_report[0][3] = tmp[11] / 2 + 0x80;
last_built_report[0][4] = tmp[8] ^ 0xff;
last_built_report[0][5] = tmp[9] ^ 0xff;
}

8
main.c

@ -243,12 +243,6 @@ int main(void) @@ -243,12 +243,6 @@ int main(void)
hardwareInit();
curGamepad = dcGetGamepad();
// A small delay is required before calling init. Otherwise,
// the shuttlemouse is not ready and the adapter runs
// in joystick mode.
_delay_ms(25);
curGamepad->init();
// configure report descriptor according to
@ -265,7 +259,6 @@ int main(void) @@ -265,7 +259,6 @@ int main(void)
usbInit();
set_sleep_mode(SLEEP_MODE_IDLE);
sei();
for(;;){ /* main event loop */
wdt_reset();
@ -294,7 +287,6 @@ int main(void) @@ -294,7 +287,6 @@ int main(void)
if(must_report)
{
for (i=0; i<curGamepad->num_reports; i++) {
int len;

5
maplebus.c

@ -243,11 +243,6 @@ void maple_sendPacket(unsigned char *data, unsigned char len) @@ -243,11 +243,6 @@ void maple_sendPacket(unsigned char *data, unsigned char len)
int i;
unsigned char b;
// SET PINS
// SET PINS
// SET PINS
// DLY
buf_reset();
for (i=0; i<len; i++) {
for (b=0x80; b; b>>=1)

Loading…
Cancel
Save