Small
This commit is contained in:
parent
d92797a6ef
commit
a62f69fc92
8
dc_pad.c
8
dc_pad.c
|
@ -163,10 +163,10 @@ static void dcReadPad(void)
|
||||||
// 13 : Joy Y axis
|
// 13 : Joy Y axis
|
||||||
// 14 : Joy X2 axis
|
// 14 : Joy X2 axis
|
||||||
// 15 : Joy Y2 axis
|
// 15 : Joy Y2 axis
|
||||||
last_built_report[0][0] = tmp[12]-1;
|
last_built_report[0][0] = tmp[12];
|
||||||
last_built_report[0][1] = tmp[13]-1;
|
last_built_report[0][1] = tmp[13];
|
||||||
last_built_report[0][2] = tmp[10];
|
last_built_report[0][2] = tmp[10] / 2 + 0x80;
|
||||||
last_built_report[0][3] = tmp[11];
|
last_built_report[0][3] = tmp[11] / 2 + 0x80;
|
||||||
last_built_report[0][4] = tmp[8] ^ 0xff;
|
last_built_report[0][4] = tmp[8] ^ 0xff;
|
||||||
last_built_report[0][5] = tmp[9] ^ 0xff;
|
last_built_report[0][5] = tmp[9] ^ 0xff;
|
||||||
}
|
}
|
||||||
|
|
8
main.c
8
main.c
|
@ -243,12 +243,6 @@ int main(void)
|
||||||
hardwareInit();
|
hardwareInit();
|
||||||
|
|
||||||
curGamepad = dcGetGamepad();
|
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();
|
curGamepad->init();
|
||||||
|
|
||||||
// configure report descriptor according to
|
// configure report descriptor according to
|
||||||
|
@ -265,7 +259,6 @@ int main(void)
|
||||||
usbInit();
|
usbInit();
|
||||||
set_sleep_mode(SLEEP_MODE_IDLE);
|
set_sleep_mode(SLEEP_MODE_IDLE);
|
||||||
sei();
|
sei();
|
||||||
|
|
||||||
|
|
||||||
for(;;){ /* main event loop */
|
for(;;){ /* main event loop */
|
||||||
wdt_reset();
|
wdt_reset();
|
||||||
|
@ -294,7 +287,6 @@ int main(void)
|
||||||
|
|
||||||
if(must_report)
|
if(must_report)
|
||||||
{
|
{
|
||||||
|
|
||||||
for (i=0; i<curGamepad->num_reports; i++) {
|
for (i=0; i<curGamepad->num_reports; i++) {
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
|
|
|
@ -243,11 +243,6 @@ void maple_sendPacket(unsigned char *data, unsigned char len)
|
||||||
int i;
|
int i;
|
||||||
unsigned char b;
|
unsigned char b;
|
||||||
|
|
||||||
// SET PINS
|
|
||||||
// SET PINS
|
|
||||||
// SET PINS
|
|
||||||
// DLY
|
|
||||||
|
|
||||||
buf_reset();
|
buf_reset();
|
||||||
for (i=0; i<len; i++) {
|
for (i=0; i<len; i++) {
|
||||||
for (b=0x80; b; b>>=1)
|
for (b=0x80; b; b>>=1)
|
||||||
|
|
Loading…
Reference in New Issue