From c5cac27d8e2ac35246d0919794edf0282ce79172 Mon Sep 17 00:00:00 2001 From: Jarno Lehtinen Date: Tue, 26 Jul 2022 22:25:27 +0300 Subject: [PATCH] Update RetroJoystickAdapter_Atari.ino --- RetroJoystickAdapter_Atari.ino | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/RetroJoystickAdapter_Atari.ino b/RetroJoystickAdapter_Atari.ino index 0788cc7..1dc83cb 100644 --- a/RetroJoystickAdapter_Atari.ino +++ b/RetroJoystickAdapter_Atari.ino @@ -6,7 +6,6 @@ const uint8_t inputPinsPort1[] = { 5, 6, 7, 8, 4, A2}; const uint8_t inputPinsPort2[] = { 10, 16, 14, 15, 3, A1}; - //#define DEBUG inline void translateState(uint8_t data, uint8_t *state) { @@ -19,21 +18,8 @@ inline void translateState(uint8_t data, uint8_t *state) { if (!bitRead(data, 3)) state[1] = 255; /* right */ } - #include "HID.h" -#if ARDUINO < 10606 -#error The Joystick2 library requires Arduino IDE 1.6.6 or greater. Please update your IDE. -#endif - -#if !defined(USBCON) -#error The Joystick2 library can only be used with a USB MCU (e.g. Arduino Leonardo, Arduino Micro, etc.). -#endif - -#if !defined(_USING_HID) -#error "legacy HID core (non pluggable)" -#endif - #define JOYSTICK_REPORT_ID 0x04 #define JOYSTICK2_REPORT_ID 0x05 @@ -75,8 +61,6 @@ inline void translateState(uint8_t data, uint8_t *state) { 0xc0 /* END_COLLECTION */ - - static const uint8_t hidReportDescriptor[] PROGMEM = { HIDDESC_MACRO(JOYSTICK_REPORT_ID), HIDDESC_MACRO(JOYSTICK2_REPORT_ID) @@ -144,10 +128,6 @@ Joystick_ Joystick[2] = //================================================================================ //================================================================================ - - - - void setup() { //set all DB9-connector input signal pins as inputs with pullups for (uint8_t i = 0; i < 6; i++) { @@ -162,7 +142,6 @@ void setup() { } - void loop() { Joystick[0].data = 0xff; @@ -193,5 +172,4 @@ void loop() { Joystick[1].sendState(); delayMicroseconds(500); - }