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;
|
||||
|
||||
void setupAmigaMouse() {
|
||||
pinMode(14, OUTPUT); //Y
|
||||
pinMode(13, OUTPUT); //QY
|
||||
|
||||
pinMode(15, OUTPUT); //X
|
||||
pinMode(12, OUTPUT); //QX
|
||||
void setupAnalogMouse() {
|
||||
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);
|
||||
digitalWrite(13, LOW);
|
||||
pinMode(PIN_MOUSE_LBTN, OUTPUT);
|
||||
pinMode(PIN_MOUSE_MBTN, OUTPUT);
|
||||
pinMode(PIN_MOUSE_RBTN, OUTPUT);
|
||||
|
||||
digitalWrite(15, LOW);
|
||||
digitalWrite(12, LOW);
|
||||
|
||||
digitalWrite(16, HIGH);
|
||||
// Default button state is not pressed
|
||||
digitalWrite(PIN_MOUSE_LBTN, HIGH);
|
||||
digitalWrite(PIN_MOUSE_MBTN, HIGH);
|
||||
digitalWrite(PIN_MOUSE_RBTN, HIGH);
|
||||
}
|
||||
|
||||
|
||||
@ -179,7 +179,7 @@ void setup() {
|
||||
Serial.println(" DONE");
|
||||
}
|
||||
|
||||
setupAmigaMouse();
|
||||
setupAnalogMouse();
|
||||
|
||||
HidMouse.SetReportParser(0, &PrsMouse);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user