setup mouse pins from definitons
This commit is contained in:
parent
f1ee685ec8
commit
857e0110fb
@ -145,22 +145,22 @@ HIDBoot<USB_HID_PROTOCOL_MOUSE> HidMouse(&Usb);
|
|||||||
|
|
||||||
MouseRptParser PrsMouse;
|
MouseRptParser PrsMouse;
|
||||||
|
|
||||||
void setupAmigaMouse() {
|
|
||||||
pinMode(14, OUTPUT); //Y
|
|
||||||
pinMode(13, OUTPUT); //QY
|
|
||||||
|
|
||||||
pinMode(15, OUTPUT); //X
|
void setupAnalogMouse() {
|
||||||
pinMode(12, OUTPUT); //QX
|
pinMode(PIN_MOUSE_V, OUTPUT);
|
||||||
|
pinMode(PIN_MOUSE_VQ, OUTPUT);
|
||||||
|
|
||||||
pinMode(16, OUTPUT); //Button L
|
pinMode(PIN_MOUSE_H, OUTPUT);
|
||||||
|
pinMode(PIN_MOUSE_HQ, OUTPUT);
|
||||||
|
|
||||||
digitalWrite(14, LOW);
|
pinMode(PIN_MOUSE_LBTN, OUTPUT);
|
||||||
digitalWrite(13, LOW);
|
pinMode(PIN_MOUSE_MBTN, OUTPUT);
|
||||||
|
pinMode(PIN_MOUSE_RBTN, OUTPUT);
|
||||||
|
|
||||||
digitalWrite(15, LOW);
|
// Default button state is not pressed
|
||||||
digitalWrite(12, LOW);
|
digitalWrite(PIN_MOUSE_LBTN, HIGH);
|
||||||
|
digitalWrite(PIN_MOUSE_MBTN, HIGH);
|
||||||
digitalWrite(16, HIGH);
|
digitalWrite(PIN_MOUSE_RBTN, HIGH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -179,7 +179,7 @@ void setup() {
|
|||||||
Serial.println(" DONE");
|
Serial.println(" DONE");
|
||||||
}
|
}
|
||||||
|
|
||||||
setupAmigaMouse();
|
setupAnalogMouse();
|
||||||
|
|
||||||
HidMouse.SetReportParser(0, &PrsMouse);
|
HidMouse.SetReportParser(0, &PrsMouse);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user