diff --git a/cores/validation/validation_usb_device/build_as6/test.cppproj b/cores/validation/validation_usb_device/build_as6/test.cppproj index 212f50f349e37f79e242ad61bd1dee77c307f233..3c231c5eca241b2a0887bd48fa0a5a5df76ea616 100644 --- a/cores/validation/validation_usb_device/build_as6/test.cppproj +++ b/cores/validation/validation_usb_device/build_as6/test.cppproj @@ -480,8 +480,9 @@ <SubType>compile</SubType> <Link>core\WVariant.h</Link> </Compile> - <Compile Include="test_usb_device.cpp"> + <Compile Include="C:\jcb\support\arduino\ArduinoZero\hardware\arduino\samd\cores\validation\validation_usb_device\test_usb_device.cpp"> <SubType>compile</SubType> + <Link>test_usb_device.cpp</Link> </Compile> </ItemGroup> <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" /> diff --git a/cores/validation/validation_usb_device/build_as6/test_usb_device.cpp b/cores/validation/validation_usb_device/build_as6/test_usb_device.cpp deleted file mode 100644 index bdf3318b97f351548ee2b77af1b1a78229062475..0000000000000000000000000000000000000000 --- a/cores/validation/validation_usb_device/build_as6/test_usb_device.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - Copyright (c) 2012 Arduino. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#define ARDUINO_MAIN -#include "Arduino.h" - -#ifdef HID_ENABLED - const int buttonPin = 4; // input pin for pushbutton - int previousButtonState = HIGH; // for checking the state of a pushButton - int counter = 0; // button push counter -#endif - -void setup(void) -{ - USBDevice.init(); - - USBDevice.attach(); - -#ifdef HID_ENABLED - Mouse.begin(); - - // make the pushButton pin an input: - pinMode(buttonPin, INPUT); - // initialize control over the keyboard: - Keyboard.begin(); -#endif - -#ifdef CDC_ENABLED - SerialUSB.begin(115200); -#endif -} - - -void loop(void) -{ -#ifdef HID_ENABLED - Mouse.move(1, 0, 0); - - // read the pushbutton: - int buttonState = digitalRead(buttonPin); - // if the button state has changed, and it's currently pressed: - if ((buttonState != previousButtonState) && (buttonState == HIGH)) - { - // increment the button counter - counter++; - // type out a message - Keyboard.print("You pressed the button "); - Keyboard.print(counter); - Keyboard.println(" times."); - } - // save the current button state for comparison next time: - previousButtonState = buttonState; -#endif - -#ifdef CDC_ENABLED - if (SerialUSB.available() > 0) - { - char inChar; - while( -1 == (inChar = SerialUSB.read())); - SerialUSB.print(inChar); - } - - delay(10); -#endif -} -