File tree 2 files changed +9
-16
lines changed
2 files changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -145,25 +145,18 @@ void clearMove() {
145
145
class DigiMouseDevice {
146
146
public:
147
147
DigiMouseDevice () {
148
- // this timer stuff doesn't even make sense - it seems like someone got some code for Timer1
149
- // and haphazardly changed the 1's in the register names to 0's, but the two timers don't work
150
- // the same way, so this code doesn't do what it says at all. Is it even useful to have?
151
- /* configure timer 0 for a rate of 16M5/(1024 * 256) = 62.94 Hz (~16ms) */
152
- // TCCR0A = 5; /* timer 0 prescaler: 1024 */
153
-
154
-
155
-
156
- // TIMSK &= !(1<TOIE0);//interrupt off
157
- cli ();
158
- usbDeviceDisconnect ();
159
- _delay_ms (250 );
160
- usbDeviceConnect ();
161
-
148
+
162
149
rt_usbHidReportDescriptor = mouse_usbHidReportDescriptor;
163
150
rt_usbHidReportDescriptorSize = sizeof (mouse_usbHidReportDescriptor);
164
151
rt_usbDeviceDescriptor = usbDescrDevice;
165
152
rt_usbDeviceDescriptorSize = sizeof (usbDescrDevice);
166
-
153
+ }
154
+
155
+ void init () {
156
+ cli ();
157
+ usbDeviceDisconnect ();
158
+ _delay_ms (200 );
159
+ usbDeviceConnect ();
167
160
168
161
usbInit ();
169
162
Original file line number Diff line number Diff line change 5
5
#include " DigiMouse.h"
6
6
7
7
void setup () {
8
- // Do nothing? It seems as if the USB hardware is ready to go on reset
8
+ DigiMouse. init (); // call init to enumerate
9
9
}
10
10
11
11
void loop () {
You can’t perform that action at this time.
0 commit comments