summaryrefslogtreecommitdiffstats
path: root/protocol/usb_hid
diff options
context:
space:
mode:
authortmk <hasu@tmk-kbd.com>2015-04-10 01:25:48 +0900
committertmk <hasu@tmk-kbd.com>2015-04-10 01:25:48 +0900
commit6746e37088ce8ba03529c1226bd216705edb2b1f (patch)
treea256db88ec3e9e8b1b70839fcd9459d972ce26e0 /protocol/usb_hid
parentb4e2d325f355a4d083106476393775e75e11f284 (diff)
Remove core library and build files
Diffstat (limited to 'protocol/usb_hid')
-rw-r--r--protocol/usb_hid/README47
m---------protocol/usb_hid/USB_Host_Shield_2.00
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/Arduino.h215
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/CDC.cpp233
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/Client.h26
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/HID.cpp520
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/HardwareSerial.cpp428
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/HardwareSerial.h81
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/IPAddress.cpp56
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/IPAddress.h76
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/Platform.h23
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/Print.cpp263
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/Print.h78
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/Printable.h40
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/Server.h9
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/Stream.cpp270
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/Stream.h96
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/Tone.cpp601
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/USBAPI.h195
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/USBCore.cpp672
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/USBCore.h303
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/USBDesc.h63
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/Udp.h88
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/WCharacter.h168
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/WInterrupts.c298
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/WMath.cpp60
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/WString.cpp645
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/WString.h205
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/binary.h515
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/main.cpp20
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/new.cpp18
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/new.h22
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/wiring.c324
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/wiring_analog.c282
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/wiring_digital.c178
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/wiring_private.h69
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/wiring_pulse.c69
-rw-r--r--protocol/usb_hid/arduino-1.0.1/cores/arduino/wiring_shift.c55
-rw-r--r--protocol/usb_hid/arduino-1.0.1/variants/eightanaloginputs/pins_arduino.h27
-rw-r--r--protocol/usb_hid/arduino-1.0.1/variants/leonardo/pins_arduino.h256
-rw-r--r--protocol/usb_hid/arduino-1.0.1/variants/mega/pins_arduino.h363
-rw-r--r--protocol/usb_hid/arduino-1.0.1/variants/standard/pins_arduino.h218
-rw-r--r--protocol/usb_hid/leonardo_led.h10
-rw-r--r--protocol/usb_hid/override_Serial.cpp51
-rw-r--r--protocol/usb_hid/override_wiring.c29
-rw-r--r--protocol/usb_hid/parser.cpp24
-rw-r--r--protocol/usb_hid/parser.h12
-rw-r--r--protocol/usb_hid/test/Makefile126
-rw-r--r--protocol/usb_hid/test/config.h40
-rw-r--r--protocol/usb_hid/test/test.cpp92
-rw-r--r--protocol/usb_hid/usb_hid.h10
51 files changed, 0 insertions, 8569 deletions
diff --git a/protocol/usb_hid/README b/protocol/usb_hid/README
deleted file mode 100644
index 0d2efc2aa2..0000000000
--- a/protocol/usb_hid/README
+++ /dev/null
@@ -1,47 +0,0 @@
-USB HID protocol
-================
-Host side of USB HID keyboard protocol implementation.
-Only standard HID Boot mode is supported at this time. This means most of normal keyboards are supported while proprietary >6KRO and NKRO is not.
-
-Third party Libraries
----------------------
-USB_Host_Shield_2.0
- Circuits@Home repository is git-submoduled. Do git submodule init & update to get the content.
- https://github.com/felis/USB_Host_Shield_2.0
-
-arduino-1.0.1
- Arduino files copied from:
- https://github.com/arduino/Arduino/hardware/arduino/{cores,variants}
-
-
-Test build
-----------
-In test directory;
- $ make
- $ DEV=/dev/ttyACM0 make program
-
-You can see HID keyboard reports on debug output.
-
-
-Restriction and Bug
--------------------
-Not supported/confirmed yet.
- Hub, suspend, keyboard LED
-
-Switching power on VBUS:
- To power reset device.
- http://www.circuitsathome.com/camera-control/simulating-cable-disconnect-on-usb-host-shield-2-0
- This is needed for a device which are not initilized with 'USB Bus Reset'(long SE0)
-
-Can't bus-reset a keyboard which already attached on bus properly.
- Slow start up of Leonardo's bootloader causes this?
- Need to unplug/plug a keyboard after firmware starts up.
- MAX3421E doesn't work SAMPLEBUS well to know whether device connected or not.
-
-Keyboard with other endpoints than boot keyboard may go wrong.
- On my keyboard with mouse key the converter locks up when using mouse key function.
-
-Can't compile on Windows filesystem.
- On Linux no problem.
- Windows doesn't know difference between common/print.h and arduino/Print.h.
- Change file name common/print.h to console.h ?
diff --git a/protocol/usb_hid/USB_Host_Shield_2.0 b/protocol/usb_hid/USB_Host_Shield_2.0
deleted file mode 160000
-Subproject 7c2e6c1bcdcc22cfdbd82edd9d8fc4c4276ead4
diff --git a/protocol/usb_hid/arduino-1.0.1/cores/arduino/Arduino.h b/protocol/usb_hid/arduino-1.0.1/cores/arduino/Arduino.h
deleted file mode 100644
index 830c9952fb..0000000000
--- a/protocol/usb_hid/arduino-1.0.1/cores/arduino/Arduino.h
+++ /dev/null
@@ -1,215 +0,0 @@
-#ifndef Arduino_h
-#define Arduino_h
-
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-
-#include <avr/pgmspace.h>
-#include <avr/io.h>
-#include <avr/interrupt.h>
-
-#include "binary.h"
-
-#ifdef __cplusplus
-extern "C"{
-#endif
-
-#define HIGH 0x1
-#define LOW 0x0
-
-#define INPUT 0x0
-#define OUTPUT 0x1
-#define INPUT_PULLUP 0x2
-
-#define true 0x1
-#define false 0x0
-
-#define PI 3.1415926535897932384626433832795
-#define HALF_PI 1.5707963267948966192313216916398
-#define TWO_PI 6.283185307179586476925286766559
-#define DEG_TO_RAD 0.017453292519943295769236907684886
-#define RAD_TO_DEG 57.295779513082320876798154814105
-
-#define SERIAL 0x0
-#define DISPLAY 0x1
-
-#define LSBFIRST 0
-#define MSBFIRST 1
-
-#define CHANGE 1
-#define FALLING 2
-#define RISING 3
-
-#if defined(__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__) || defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__)
-#define DEFAULT 0
-#define EXTERNAL 1
-#define INTERNAL 2
-#else
-#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1284P__)
-#define INTERNAL1V1 2
-#define INTERNAL2V56 3
-#else
-#define INTERNAL 3
-#endif
-#define DEFAULT 1
-#define EXTERNAL 0
-#endif
-
-// undefine stdlib's abs if encountered
-#ifdef abs
-#undef abs
-#endif
-
-#define min(a,b) ((a)<(b)?(a):(b))
-#define max(a,b) ((a)>(b)?(a):(b))
-#define abs(x) ((x)>0?(x):-(x))
-#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
-#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
-#define radians(deg) ((deg)*DEG_TO_RAD)
-#define degrees(rad) ((rad)*RAD_TO_DEG)
-#define sq(x) ((x)*(x))
-
-#define interrupts() sei()
-#define noInterrupts() cli()
-
-#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L )
-#define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() )
-#define microsecondsToClockCycles(a) ( (a) * clockCyclesPerMicrosecond() )
-
-#define lowByte(w) ((uint8_t) ((w) & 0xff))
-#define highByte(w) ((uint8_t) ((w) >> 8))
-
-#define bitRead(value, bit) (((value) >> (bit)) & 0x01)
-#define bitSet(value, bit) ((value) |= (1UL << (bit)))
-#define bitClear(value, bit) ((value) &= ~(1UL << (bit)))
-#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit))
-
-
-typedef unsigned int word;
-
-#define bit(b) (1UL << (b))
-
-typedef uint8_t boolean;
-typedef uint8_t byte;
-
-void init(void);
-
-void pinMode(uint8_t, uint8_t);
-void digitalWrite(uint8_t, uint8_t);
-int digitalRead(uint8_t);
-int analogRead(uint8_t);
-void analogReference(uint8_t mode);
-void analogWrite(uint8_t, int);
-
-unsigned long millis(void);
-unsigned long micros(void);
-void delay(unsigned long);
-void delayMicroseconds(unsigned int us);
-unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout);
-
-void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val);
-uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder);
-
-void attachInterrupt(uint8_t, void (*)(void), int mode);
-void detachInterrupt(uint8_t);
-
-void setup(void);
-void loop(void);
-
-// Get the bit location within the hardware port of the given virtual pin.
-// This comes from the pins_*.c file for the active board configuration.
-
-#define analogInPinToBit(P) (P)
-
-// On the ATmega1280, the addresses of some of the port registers are
-// greater than 255, so we can't store them in uint8_t's.
-extern const uint16_t PROGMEM port_to_mode_PGM[];
-extern const uint16_t PROGMEM port_to_input_PGM[];
-extern const uint16_t PROGMEM port_to_output_PGM[];
-
-extern const uint8_t PROGMEM digital_pin_to_port_PGM[];
-// extern const uint8_t PROGMEM digital_pin_to_bit_PGM[];
-extern const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[];
-extern const uint8_t PROGMEM digital_pin_to_timer_PGM[];
-
-// Get the bit location within the hardware port of the given virtual pin.
-// This comes from the pins_*.c file for the active board configuration.
-//
-// These perform slightly better as macros compared to inline functions
-//
-#define digitalPinToPort(P) ( pgm_read_byte( digital_pin_to_port_PGM + (P) ) )
-#define digitalPinToBitMask(P) ( pgm_read_byte( digital_pin_to_bit_mask_PGM + (P) ) )
-#define digitalPinToTimer(P) ( pgm_read_byte( digital_pin_to_timer_PGM + (P) ) )
-#define analogInPinToBit(P) (P)
-#define portOutputRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_output_PGM + (P))) )
-#define portInputRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_input_PGM + (P))) )
-#define portModeRegister(P) ( (volatile uint8_t *)( pgm_read_word( port_to_mode_PGM + (P))) )
-
-#define NOT_A_PIN 0
-#define NOT_A_PORT 0
-
-#ifdef ARDUINO_MAIN
-#define PA 1
-#define PB 2
-#define PC 3
-#define PD 4
-#define PE 5
-#define PF 6
-#define PG 7
-#define PH 8
-#define PJ 10
-#define PK 11
-#define PL 12
-#endif
-
-#define NOT_ON_TIMER 0
-#define TIMER0A 1
-#define TIMER0B 2
-#define TIMER1A 3
-#define TIMER1B 4
-#define TIMER2 5
-#define TIMER2A 6
-#define TIMER2B 7
-
-#define TIMER3A 8
-#define TIMER3B 9
-#define TIMER3C 10
-#define TIMER4A 11
-#define TIMER4B 12
-#define TIMER4C 13
-#define TIMER4D 14
-#define TIMER5A 15
-#define TIMER5B 16
-#define TIMER5C 17
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#ifdef __cplusplus
-#include "WCharacter.h"
-#include "WString.h"
-#include "HardwareSerial.h"
-
-uint16_t makeWord(uint16_t w);
-uint16_t makeWord(byte h, byte l);
-
-#define word(...) makeWord(__VA_ARGS__)
-
-unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout = 1000000L);
-
-void tone(uint8_t _pin, unsigned int frequency, unsigned long duration = 0);
-void noTone(uint8_t _pin);
-
-// WMath prototypes
-long random(long);
-long random(long, long);
-void randomSeed(unsigned int);
-long map(long, long, long, long, long);
-
-#endif
-
-#include "pins_arduino.h"
-
-#endif
diff --git a/protocol/usb_hid/arduino-1.0.1/cores/arduino/CDC.cpp b/protocol/usb_hid/arduino-1.0.1/cores/arduino/CDC.cpp
deleted file mode 100644
index 1ee3a488a5..0000000000
--- a/protocol/usb_hid/arduino-1.0.1/cores/arduino/CDC.cpp
+++ /dev/null
@@ -1,233 +0,0 @@
-
-
-/* Copyright (c) 2011, Peter Barrett
-**
-** Permission to use, copy, modify, and/or distribute this software for
-** any purpose with or without fee is hereby granted, provided that the
-** above copyright notice and this permission notice appear in all copies.
-**
-** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
-** WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
-** WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
-** BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
-** OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-** WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-** ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-** SOFTWARE.
-*/
-
-#include "Platform.h"
-#include "USBAPI.h"
-#include <avr/wdt.h>
-
-#if defined(USBCON)
-#ifdef CDC_ENABLED
-
-#if (RAMEND < 1000)
-#define SERIAL_BUFFER_SIZE 16
-#else
-#define SERIAL_BUFFER_SIZE 64
-#endif
-
-struct ring_buffer
-{
- unsigned char buffer[SERIAL_BUFFER_SIZE];
- volatile int head;
- volatile int tail;
-};
-
-ring_buffer cdc_rx_buffer = { { 0 }, 0, 0};
-
-typedef struct
-{
- u32 dwDTERate;
- u8 bCharFormat;
- u8 bParityType;
- u8 bDataBits;
- u8 lineState;
-} LineInfo;
-
-static volatile LineInfo _usbLineInfo = { 57600, 0x00, 0x00, 0x00, 0x00 };
-
-#define WEAK __attribute__ ((weak))
-
-extern const CDCDescriptor _cdcInterface PROGMEM;
-const CDCDescriptor _cdcInterface =
-{
- D_IAD(0,2,CDC_COMMUNICATION_INTERFACE_CLASS,CDC_ABSTRACT_CONTROL_MODEL,1),
-
- // CDC communication interface
- D_INTERFACE(CDC_ACM_INTERFACE,1,CDC_COMMUNICATION_INTERFACE_CLASS,CDC_ABSTRACT_CONTROL_MODEL,0),
- D_CDCCS(CDC_HEADER,0x10,0x01), // Header (1.10 bcd)
- D_CDCCS(CDC_CALL_MANAGEMENT,1,1), // Device handles call management (not)
- D_CDCCS4(CDC_ABSTRACT_CONTROL_MANAGEMENT,6), // SET_LINE_CODING, GET_LINE_CODING, SET_CONTROL_LINE_STATE supported
- D_CDCCS(CDC_UNION,CDC_ACM_INTERFACE,CDC_DATA_INTERFACE), // Communication interface is master, data interface is slave 0
- D_ENDPOINT(USB_ENDPOINT_IN (CDC_ENDPOINT_ACM),USB_ENDPOINT_TYPE_INTERRUPT,0x10,0x40),
-
- // CDC data interface
- D_INTERFACE(CDC_DATA_INTERFACE,2,CDC_DATA_INTERFACE_CLASS,0,0),
- D_ENDPOINT(USB_ENDPOINT_OUT(CDC_ENDPOINT_OUT),USB_ENDPOINT_TYPE_BULK,0x40,0),
- D_ENDPOINT(USB_ENDPOINT_IN (CDC_ENDPOINT_IN ),USB_ENDPOINT_TYPE_BULK,0x40,0)
-};
-
-int WEAK CDC_GetInterface(u8* interfaceNum)
-{
- interfaceNum[0] += 2; // uses 2
- return USB_SendControl(TRANSFER_PGM,&_cdcInterface,sizeof(_cdcInterface));
-}
-
-bool WEAK CDC_Setup(Setup& setup)
-{
- u8 r = setup.bRequest;
- u8 requestType = setup.bmRequestType;
-
- if (REQUEST_DEVICETOHOST_CLASS_INTERFACE == requestType)
- {
- if (CDC_GET_LINE_CODING == r)
- {
- USB_SendControl(0,(void*)&_usbLineInfo,7);
- return true;
- }
- }
-
- if (REQUEST_HOSTTODEVICE_CLASS_INTERFACE == requestType)
- {
- if (CDC_SET_LINE_CODING == r)
- {
- USB_RecvControl((void*)&_usbLineInfo,7);
- return true;
- }
-
- if (CDC_SET_CONTROL_LINE_STATE == r)
- {
- _usbLineInfo.lineState = setup.wValueL;
-
- // auto-reset into the bootloader is triggered when the port, already
- // open at 1200 bps, is closed. this is the signal to start the watchdog
- // with a relatively long period so it can finish housekeeping tasks
- // like servicing endpoints before the sketch ends
- if (1200 == _usbLineInfo.dwDTERate) {
- // We check DTR state to determine if host port is open (bit 0 of lineState).
- if ((_usbLineInfo.lineState & 0x01) == 0) {
- *(uint16_t *)0x0800 = 0x7777;
- wdt_enable(WDTO_120MS);
- } else {
- // Most OSs do some intermediate steps when configuring ports and DTR can
- // twiggle more than once before stabilizing.
- // To avoid spurious resets we set the watchdog to 250ms and eventually
- // cancel if DTR goes back high.
-
- wdt_disable();
- wdt_reset();
- *(uint16_t *)0x0800 = 0x0;
- }
- }
- return true;
- }
- }
- return false;
-}
-
-
-int _serialPeek = -1;
-void Serial_::begin(uint16_t baud_count)
-{
-}
-
-void Serial_::end(void)
-{
-}
-
-void Serial_::accept(void)
-{
- ring_buffer *buffer = &cdc_rx_buffer;
- int c = USB_Recv(CDC_RX);
- int i = (unsigned int)(buffer->head+1) % SERIAL_BUFFER_SIZE;
-
- // if we should be storing the received character into the location
- // just before the tail (meaning that the head would advance to the
- // current location of the tail), we're about to overflow the buffer
- // and so we don't write the character or advance the head.
- if (i != buffer->tail) {
- buffer->buffer[buffer->head] = c;
- buffer->head = i;
- }
-}
-
-int Serial_::available(void)
-{
- ring_buffer *buffer = &cdc_rx_buffer;
- return (unsigned int)(SERIAL_BUFFER_SIZE + buffer->head - buffer->tail) % SERIAL_BUFFER_SIZE;
-}
-
-int Serial_::peek(void)
-{
- ring_buffer *buffer = &cdc_rx_buffer;
- if (buffer->head == buffer->tail) {
- return -1;
- } else {
- return buffer->buffer[buffer->tail];
- }
-}
-
-int Serial_::read(void)
-{
- ring_buffer *buffer = &cdc_rx_buffer;
- // if the head isn't ahead of the tail, we don't have any characters
- if (buffer->head == buffer->tail) {
- return -1;
- } else {
- unsigned char c = buffer->buffer[buffer->tail];
- buffer->tail = (unsigned int)(buffer->tail + 1) % SERIAL_BUFFER_SIZE;
- return c;
- }
-}
-
-void Serial_::flush(void)
-{
- USB_Flush(CDC_TX);
-}
-
-size_t Serial_::write(uint8_t c)
-{
- /* only try to send bytes if the high-level CDC connection itself
- is open (not just the pipe) - the OS should set lineState when the port
- is opened and clear lineState when the port is closed.
- bytes sent before the user opens the connection or after
- the connection is closed are lost - just like with a UART. */
-
- // TODO - ZE - check behavior on different OSes and test what happens if an
- // open connection isn't broken cleanly (cable is yanked out, host dies
- // or locks up, or host virtual serial port hangs)
- if (_usbLineInfo.lineState > 0) {
- int r = USB_Send(CDC_TX,&c,1);
- if (r > 0) {
- return r;
- } else {
- setWriteError();
- return 0;
- }
- }
- setWriteError();
- return 0;
-}
-
-// This operator is a convenient way for a sketch to check whether the
-// port has actually been configured and opened by the host (as opposed
-// to just being connected to the host). It can be used, for example, in
-// setup() before printing to ensure that an application on the host is
-// actually ready to receive and display the data.
-// We add a short delay before returning to fix a bug observed by Federico
-// where the port is configured (lineState != 0) but not quite opened.
-Serial_::operator bool() {
- bool result = false;
- if (_usbLineInfo.lineState > 0)
- result = true;
- delay(10);
- return result;
-}
-
-Serial_ Serial;
-
-#endif
-#endif /* if defined(USBCON) */
diff --git a/protocol/usb_hid/arduino-1.0.1/cores/arduino/Client.h b/protocol/usb_hid/arduino-1.0.1/cores/arduino/Client.h
deleted file mode 100644
index ea134838a2..0000000000
--- a/protocol/usb_hid/arduino-1.0.1/cores/arduino/Client.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef client_h
-#define client_h
-#include "Print.h"
-#include "Stream.h"
-#include "IPAddress.h"
-
-class Client : public Stream {
-
-public:
- virtual int connect(IPAddress ip, uint16_t port) =0;
- virtual int connect(const char *host, uint16_t port) =0;
- virtual size_t write(uint8_t) =0;
- virtual size_t write(const uint8_t *buf, size_t size) =0;
- virtual int available() = 0;
- virtual int read() = 0;
- virtual int read(uint8_t *buf, size_t size) = 0;
- virtual int peek() = 0;
- virtual void flush() = 0;
- virtual void stop() = 0;
- virtual uint8_t connected() = 0;
- virtual operator bool() = 0;
-protected:
- uint8_t* rawIPAddress(IPAddress& addr) { return addr.raw_address(); };
-};
-
-#endif
diff --git a/protocol/usb_hid/arduino-1.0.1/cores/arduino/HID.cpp b/protocol/usb_hid/arduino-1.0.1/cores/arduino/HID.cpp
deleted file mode 100644
index ac63608449..0000000000
--- a/protocol/usb_hid/arduino-1.0.1/cores/arduino/HID.cpp
+++ /dev/null
@@ -1,520 +0,0 @@
-
-
-/* Copyright (c) 2011, Peter Barrett
-**
-** Permission to use, copy, modify, and/or distribute this software for
-** any purpose with or without fee is hereby granted, provided that the
-** above copyright notice and this permission notice appear in all copies.
-**
-** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
-** WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
-** WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
-** BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
-** OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-** WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-** ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-** SOFTWARE.
-*/
-
-#include "Platform.h"
-#include "USBAPI.h"
-#include "USBDesc.h"
-
-#if defined(USBCON)
-#ifdef HID_ENABLED
-
-//#define RAWHID_ENABLED
-
-// Singletons for mouse and keyboard
-
-Mouse_ Mouse;
-Keyboard_ Keyboard;
-
-//================================================================================
-//================================================================================
-
-// HID report descriptor
-
-#define LSB(_x) ((_x) & 0xFF)
-#define MSB(_x) ((_x) >> 8)
-
-#define RAWHID_USAGE_PAGE 0xFFC0
-#define RAWHID_USAGE 0x0C00
-#define RAWHID_TX_SIZE 64
-#define RAWHID_RX_SIZE 64
-
-extern const u8 _hidReportDescriptor[] PROGMEM;
-const u8 _hidReportDescriptor[] = {
-
- // Mouse
- 0x05, 0x01, // USAGE_PAGE (Generic Desktop) // 54
- 0x09, 0x02, // USAGE (Mouse)
- 0xa1, 0x01, // COLLECTION (Application)
- 0x09, 0x01, // USAGE (Pointer)
- 0xa1, 0x00, // COLLECTION (Physical)
- 0x85, 0x01, // REPORT_ID (1)
- 0x05, 0x09, // USAGE_PAGE (Button)
- 0x19, 0x01, // USAGE_MINIMUM (Button 1)
- 0x29, 0x03, // USAGE_MAXIMUM (Button 3)
- 0x15, 0x00, // LOGICAL_MINIMUM (0)
- 0x25, 0x01, // LOGICAL_MAXIMUM (1)
- 0x95, 0x03, // REPORT_COUNT (3)
- 0x75, 0x01, // REPORT_SIZE (1)
- 0x81, 0x02, // INPUT (Data,Var,Abs)
- 0x95, 0x01, // REPORT_COUNT (1)
- 0x75, 0x05, // REPORT_SIZE (5)
- 0x81, 0x03, // INPUT (Cnst,Var,Abs)
- 0x05, 0x01, // USAGE_PAGE (Generic Desktop)
- 0x09, 0x30, // USAGE (X)
- 0x09, 0x31, // USAGE (Y)
- 0x09, 0x38, // USAGE (Wheel)
- 0x15, 0x81, // LOGICAL_MINIMUM (-127)
- 0x25, 0x7f, // LOGICAL_MAXIMUM (127)
- 0x75, 0x08, // REPORT_SIZE (8)
- 0x95, 0x03, // REPORT_COUNT (3)
- 0x81, 0x06, // INPUT (Data,Var,Rel)
- 0xc0, // END_COLLECTION
- 0xc0, // END_COLLECTION
-
- // Keyboard
- 0x05, 0x01, // USAGE_PAGE (Generic Desktop) // 47
- 0x09, 0x06, // USAGE (Keyboard)
- 0xa1, 0x01, // COLLECTION (Application)
- 0x85, 0x02, // REPORT_ID (2)
- 0x05, 0x07, // USAGE_PAGE (Keyboard)
-
- 0x19, 0xe0, // USAGE_MINIMUM (Keyboard LeftControl)
- 0x29, 0xe7, // USAGE_MAXIMUM (Keyboard Right GUI)
- 0x15, 0x00, // LOGICAL_MINIMUM (0)
- 0x25, 0x01, // LOGICAL_MAXIMUM (1)
- 0x75, 0x01, // REPORT_SIZE (1)
-
- 0x95, 0x08, // REPORT_COUNT (8)
- 0x81, 0x02, // INPUT (Data,Var,Abs)
- 0x95, 0x01, // REPORT_COUNT (1)
- 0x75, 0x08, // REPORT_SIZE (8)
- 0x81, 0x03, // INPUT (Cnst,Var,Abs)
-
- 0x95, 0x06, // REPORT_COUNT (6)
- 0x75, 0x08, // REPORT_SIZE (8)
- 0x15, 0x00, // LOGICAL_MINIMUM (0)
- 0x25,