Browse Source

Increase polling rate (Keyboard works better, joystick will be more responsive)

master
Raphaël Assénat 9 years ago
parent
commit
5957b607cd
  1. 6
      main.c
  2. 2
      usbconfig.h

6
main.c

@ -150,10 +150,12 @@ static void hardwareInit(void) @@ -150,10 +150,12 @@ static void hardwareInit(void)
#if defined(AT168_COMPATIBLE)
TCCR2A= (1<<WGM21);
TCCR2B=(1<<CS22)|(1<<CS21)|(1<<CS20);
OCR2A=196; // for 60 hz
// OCR2A=196; // for 60 hz
OCR2A=50; // for 60 hz
#else
TCCR2 = (1<<WGM21)|(1<<CS22)|(1<<CS21)|(1<<CS20);
OCR2 = 196; // for 60 hz
//OCR2 = 196; // for 60 hz
OCR2 = 50; // for 60 hz
#endif
}

2
usbconfig.h

@ -109,7 +109,7 @@ section at the end of this file). @@ -109,7 +109,7 @@ section at the end of this file).
* (e.g. HID), but never want to send any data. This option saves a couple
* of bytes in flash memory and the transmit buffers in RAM.
*/
#define USB_CFG_INTR_POLL_INTERVAL 10
#define USB_CFG_INTR_POLL_INTERVAL 5
/* If you compile a version with endpoint 1 (interrupt-in), this is the poll
* interval. The value is in milliseconds and must not be less than 10 ms for
* low speed devices.

Loading…
Cancel
Save