From e851f0d7ae25077bef9a82660ecb569639e1c087 Mon Sep 17 00:00:00 2001 From: Kristian Lauszus Date: Thu, 28 Aug 2014 18:20:36 -0700 Subject: [PATCH 1/4] Added donate button --- README.md | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index edb440a2..0ba90aa9 100644 --- a/README.md +++ b/README.md @@ -20,11 +20,27 @@ For more information about the hardware see the [Hardware Manual](http://www.cir * __Oleg Mazurov, Circuits@Home__ - * __Alexei Glushchenko, Circuits@Home__ - - * Developers of the USB Core, HID, FTDI, ADK, ACM, and PL2303 libraries + * Developers of the USB Core, HID, FTDI, ADK, ACM, and PL2303 libraries * __Kristian Lauszus, TKJ Electronics__ - - * Developer of the [BTD](#bluetooth-libraries), [BTHID](#bthid-library), [SPP](#spp-library), [PS4](#ps4-library), [PS3](#ps3-library), [Wii](#wii-library), [Xbox](#xbox-library), and [PSBuzz](#ps-buzz-library) libraries + * Developer of the [BTD](#bluetooth-libraries), [BTHID](#bthid-library), [SPP](#spp-library), [PS4](#ps4-library), [PS3](#ps3-library), [Wii](#wii-library), [Xbox](#xbox-library), and [PSBuzz](#ps-buzz-library) libraries * __Andrew Kroll__ - - * Major contributor to mass storage code + * Major contributor to mass storage code + +# Donate + +Help yourself by helping us support you! Many thousands of hours have been spent developing the USB Host Shield library. Since you find it useful, please consider donating via the button below. Donations will allow us to support you by ensuring hardware that you have can be acquired in order to add support for your microcontroller board. + +
+ + + + + + + + + +
# Table of Contents @@ -58,8 +74,8 @@ Now move the "USB\_Host\_Shield\_20" directory to the "libraries" directory. The final structure should look like this: * Arduino/ - * libraries/ - * USB\_Host\_Shield\_20/ + * libraries/ + * USB\_Host\_Shield\_20/ Now quit the Arduino IDE and reopen it. @@ -89,7 +105,7 @@ Currently the following boards are supported by the library: * Arduino Due * If you are using the Arduino Due, then you must include the Arduino SPI library like so: ```#include ``` in your .ino file. * Teensy (Teensy++ 1.0, Teensy 2.0, Teensy++ 2.0, and Teensy 3.x) - * Note if you are using the Teensy 3.x you should download this SPI library as well: . You should then add ```#include ``` to your .ino file. + * Note if you are using the Teensy 3.x you should download this SPI library as well: . You should then add ```#include ``` to your .ino file. * Balanduino * Sanguino * Black Widdow @@ -97,7 +113,7 @@ Currently the following boards are supported by the library: The following boards need to be activated manually in [settings.h](settings.h): * Arduino Mega ADK - * If you are using Arduino 1.5.5 or newer there is no need to activate the Arduino Mega ADK manually + * If you are using Arduino 1.5.5 or newer there is no need to activate the Arduino Mega ADK manually * Black Widdow Simply set the corresponding value to 1 instead of 0. From bf9fa2c5ecfd923872edec1c50b477427e1e8593 Mon Sep 17 00:00:00 2001 From: Kristian Lauszus Date: Thu, 28 Aug 2014 18:31:38 -0700 Subject: [PATCH 2/4] Fixed donate button --- README.md | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/README.md b/README.md index 0ba90aa9..e2abe20a 100644 --- a/README.md +++ b/README.md @@ -30,17 +30,7 @@ For more information about the hardware see the [Hardware Manual](http://www.cir Help yourself by helping us support you! Many thousands of hours have been spent developing the USB Host Shield library. Since you find it useful, please consider donating via the button below. Donations will allow us to support you by ensuring hardware that you have can be acquired in order to add support for your microcontroller board. -
- - - - - - - - - -
+PayPal - The safer, easier way to pay online! # Table of Contents From a932871f3476dd1742e41ad7f03c3263d27dcdf8 Mon Sep 17 00:00:00 2001 From: Kristian Lauszus Date: Thu, 28 Aug 2014 18:32:51 -0700 Subject: [PATCH 3/4] Typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e2abe20a..58599d42 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ For more information about the hardware see the [Hardware Manual](http://www.cir Help yourself by helping us support you! Many thousands of hours have been spent developing the USB Host Shield library. Since you find it useful, please consider donating via the button below. Donations will allow us to support you by ensuring hardware that you have can be acquired in order to add support for your microcontroller board. -PayPal - The safer, easier way to pay online! +PayPal - The safer, easier way to pay online! # Table of Contents From bde11036a97268ae53ebd2bd00b089cd4d3eebd2 Mon Sep 17 00:00:00 2001 From: Kristian Lauszus Date: Tue, 2 Sep 2014 00:16:48 -0700 Subject: [PATCH 4/4] Endpoints types where already defined in usb_ch9.h, so no need to redefine them --- PS3USB.cpp | 4 ++-- PS3USB.h | 3 --- XBOXOLD.cpp | 4 ++-- XBOXOLD.h | 3 --- XBOXRECV.cpp | 16 ++++++++-------- XBOXRECV.h | 3 --- XBOXUSB.cpp | 4 ++-- XBOXUSB.h | 3 --- 8 files changed, 14 insertions(+), 26 deletions(-) diff --git a/PS3USB.cpp b/PS3USB.cpp index 7e6285a2..c3217538 100644 --- a/PS3USB.cpp +++ b/PS3USB.cpp @@ -152,13 +152,13 @@ uint8_t PS3USB::Init(uint8_t parent, uint8_t port, bool lowspeed) { /* Initialize data structures for endpoints of device */ epInfo[ PS3_OUTPUT_PIPE ].epAddr = 0x02; // PS3 output endpoint - epInfo[ PS3_OUTPUT_PIPE ].epAttribs = EP_INTERRUPT; + epInfo[ PS3_OUTPUT_PIPE ].epAttribs = USB_TRANSFER_TYPE_INTERRUPT; epInfo[ PS3_OUTPUT_PIPE ].bmNakPower = USB_NAK_NOWAIT; // Only poll once for interrupt endpoints epInfo[ PS3_OUTPUT_PIPE ].maxPktSize = EP_MAXPKTSIZE; epInfo[ PS3_OUTPUT_PIPE ].bmSndToggle = 0; epInfo[ PS3_OUTPUT_PIPE ].bmRcvToggle = 0; epInfo[ PS3_INPUT_PIPE ].epAddr = 0x01; // PS3 report endpoint - epInfo[ PS3_INPUT_PIPE ].epAttribs = EP_INTERRUPT; + epInfo[ PS3_INPUT_PIPE ].epAttribs = USB_TRANSFER_TYPE_INTERRUPT; epInfo[ PS3_INPUT_PIPE ].bmNakPower = USB_NAK_NOWAIT; // Only poll once for interrupt endpoints epInfo[ PS3_INPUT_PIPE ].maxPktSize = EP_MAXPKTSIZE; epInfo[ PS3_INPUT_PIPE ].bmSndToggle = 0; diff --git a/PS3USB.h b/PS3USB.h index 5bbbdf2e..ca343a81 100644 --- a/PS3USB.h +++ b/PS3USB.h @@ -24,9 +24,6 @@ /* PS3 data taken from descriptors */ #define EP_MAXPKTSIZE 64 // max size for data via USB -/* Endpoint types */ -#define EP_INTERRUPT 0x03 - /* Names we give to the 3 ps3 pipes - this is only used for setting the bluetooth address into the ps3 controllers */ #define PS3_CONTROL_PIPE 0 #define PS3_OUTPUT_PIPE 1 diff --git a/XBOXOLD.cpp b/XBOXOLD.cpp index 298d5ab1..78e6e9a5 100644 --- a/XBOXOLD.cpp +++ b/XBOXOLD.cpp @@ -167,13 +167,13 @@ uint8_t XBOXOLD::Init(uint8_t parent, uint8_t port, bool lowspeed) { /* Initialize data structures for endpoints of device */ epInfo[ XBOX_INPUT_PIPE ].epAddr = 0x01; // XBOX report endpoint - epInfo[ XBOX_INPUT_PIPE ].epAttribs = EP_INTERRUPT; + epInfo[ XBOX_INPUT_PIPE ].epAttribs = USB_TRANSFER_TYPE_INTERRUPT; epInfo[ XBOX_INPUT_PIPE ].bmNakPower = USB_NAK_NOWAIT; // Only poll once for interrupt endpoints epInfo[ XBOX_INPUT_PIPE ].maxPktSize = EP_MAXPKTSIZE; epInfo[ XBOX_INPUT_PIPE ].bmSndToggle = 0; epInfo[ XBOX_INPUT_PIPE ].bmRcvToggle = 0; epInfo[ XBOX_OUTPUT_PIPE ].epAddr = 0x02; // XBOX output endpoint - epInfo[ XBOX_OUTPUT_PIPE ].epAttribs = EP_INTERRUPT; + epInfo[ XBOX_OUTPUT_PIPE ].epAttribs = USB_TRANSFER_TYPE_INTERRUPT; epInfo[ XBOX_OUTPUT_PIPE ].bmNakPower = USB_NAK_NOWAIT; // Only poll once for interrupt endpoints epInfo[ XBOX_OUTPUT_PIPE ].maxPktSize = EP_MAXPKTSIZE; epInfo[ XBOX_OUTPUT_PIPE ].bmSndToggle = 0; diff --git a/XBOXOLD.h b/XBOXOLD.h index b3c0ccb2..f5f95dce 100644 --- a/XBOXOLD.h +++ b/XBOXOLD.h @@ -24,9 +24,6 @@ /* Data Xbox taken from descriptors */ #define EP_MAXPKTSIZE 32 // Max size for data via USB -/* Endpoint types */ -#define EP_INTERRUPT 0x03 - /* Names we give to the 3 Xbox pipes */ #define XBOX_CONTROL_PIPE 0 #define XBOX_INPUT_PIPE 1 diff --git a/XBOXRECV.cpp b/XBOXRECV.cpp index 144a4aa4..41f1ff58 100644 --- a/XBOXRECV.cpp +++ b/XBOXRECV.cpp @@ -188,52 +188,52 @@ uint8_t XBOXRECV::Init(uint8_t parent, uint8_t port, bool lowspeed) { /* Initialize data structures for endpoints of device */ epInfo[ XBOX_INPUT_PIPE_1 ].epAddr = 0x01; // XBOX 360 report endpoint - poll interval 1ms - epInfo[ XBOX_INPUT_PIPE_1 ].epAttribs = EP_INTERRUPT; + epInfo[ XBOX_INPUT_PIPE_1 ].epAttribs = USB_TRANSFER_TYPE_INTERRUPT; epInfo[ XBOX_INPUT_PIPE_1 ].bmNakPower = USB_NAK_NOWAIT; // Only poll once for interrupt endpoints epInfo[ XBOX_INPUT_PIPE_1 ].maxPktSize = EP_MAXPKTSIZE; epInfo[ XBOX_INPUT_PIPE_1 ].bmSndToggle = 0; epInfo[ XBOX_INPUT_PIPE_1 ].bmRcvToggle = 0; epInfo[ XBOX_OUTPUT_PIPE_1 ].epAddr = 0x01; // XBOX 360 output endpoint - poll interval 8ms - epInfo[ XBOX_OUTPUT_PIPE_1 ].epAttribs = EP_INTERRUPT; + epInfo[ XBOX_OUTPUT_PIPE_1 ].epAttribs = USB_TRANSFER_TYPE_INTERRUPT; epInfo[ XBOX_OUTPUT_PIPE_1 ].bmNakPower = USB_NAK_NOWAIT; // Only poll once for interrupt endpoints epInfo[ XBOX_OUTPUT_PIPE_1 ].maxPktSize = EP_MAXPKTSIZE; epInfo[ XBOX_OUTPUT_PIPE_1 ].bmSndToggle = 0; epInfo[ XBOX_OUTPUT_PIPE_1 ].bmRcvToggle = 0; epInfo[ XBOX_INPUT_PIPE_2 ].epAddr = 0x03; // XBOX 360 report endpoint - poll interval 1ms - epInfo[ XBOX_INPUT_PIPE_2 ].epAttribs = EP_INTERRUPT; + epInfo[ XBOX_INPUT_PIPE_2 ].epAttribs = USB_TRANSFER_TYPE_INTERRUPT; epInfo[ XBOX_INPUT_PIPE_2 ].bmNakPower = USB_NAK_NOWAIT; // Only poll once for interrupt endpoints epInfo[ XBOX_INPUT_PIPE_2 ].maxPktSize = EP_MAXPKTSIZE; epInfo[ XBOX_INPUT_PIPE_2 ].bmSndToggle = 0; epInfo[ XBOX_INPUT_PIPE_2 ].bmRcvToggle = 0; epInfo[ XBOX_OUTPUT_PIPE_2 ].epAddr = 0x03; // XBOX 360 output endpoint - poll interval 8ms - epInfo[ XBOX_OUTPUT_PIPE_2 ].epAttribs = EP_INTERRUPT; + epInfo[ XBOX_OUTPUT_PIPE_2 ].epAttribs = USB_TRANSFER_TYPE_INTERRUPT; epInfo[ XBOX_OUTPUT_PIPE_2 ].bmNakPower = USB_NAK_NOWAIT; // Only poll once for interrupt endpoints epInfo[ XBOX_OUTPUT_PIPE_2 ].maxPktSize = EP_MAXPKTSIZE; epInfo[ XBOX_OUTPUT_PIPE_2 ].bmSndToggle = 0; epInfo[ XBOX_OUTPUT_PIPE_2 ].bmRcvToggle = 0; epInfo[ XBOX_INPUT_PIPE_3 ].epAddr = 0x05; // XBOX 360 report endpoint - poll interval 1ms - epInfo[ XBOX_INPUT_PIPE_3 ].epAttribs = EP_INTERRUPT; + epInfo[ XBOX_INPUT_PIPE_3 ].epAttribs = USB_TRANSFER_TYPE_INTERRUPT; epInfo[ XBOX_INPUT_PIPE_3 ].bmNakPower = USB_NAK_NOWAIT; // Only poll once for interrupt endpoints epInfo[ XBOX_INPUT_PIPE_3 ].maxPktSize = EP_MAXPKTSIZE; epInfo[ XBOX_INPUT_PIPE_3 ].bmSndToggle = 0; epInfo[ XBOX_INPUT_PIPE_3 ].bmRcvToggle = 0; epInfo[ XBOX_OUTPUT_PIPE_3 ].epAddr = 0x05; // XBOX 360 output endpoint - poll interval 8ms - epInfo[ XBOX_OUTPUT_PIPE_3 ].epAttribs = EP_INTERRUPT; + epInfo[ XBOX_OUTPUT_PIPE_3 ].epAttribs = USB_TRANSFER_TYPE_INTERRUPT; epInfo[ XBOX_OUTPUT_PIPE_3 ].bmNakPower = USB_NAK_NOWAIT; // Only poll once for interrupt endpoints epInfo[ XBOX_OUTPUT_PIPE_3 ].maxPktSize = EP_MAXPKTSIZE; epInfo[ XBOX_OUTPUT_PIPE_3 ].bmSndToggle = 0; epInfo[ XBOX_OUTPUT_PIPE_3 ].bmRcvToggle = 0; epInfo[ XBOX_INPUT_PIPE_4 ].epAddr = 0x07; // XBOX 360 report endpoint - poll interval 1ms - epInfo[ XBOX_INPUT_PIPE_4 ].epAttribs = EP_INTERRUPT; + epInfo[ XBOX_INPUT_PIPE_4 ].epAttribs = USB_TRANSFER_TYPE_INTERRUPT; epInfo[ XBOX_INPUT_PIPE_4 ].bmNakPower = USB_NAK_NOWAIT; // Only poll once for interrupt endpoints epInfo[ XBOX_INPUT_PIPE_4 ].maxPktSize = EP_MAXPKTSIZE; epInfo[ XBOX_INPUT_PIPE_4 ].bmSndToggle = 0; epInfo[ XBOX_INPUT_PIPE_4 ].bmRcvToggle = 0; epInfo[ XBOX_OUTPUT_PIPE_4 ].epAddr = 0x07; // XBOX 360 output endpoint - poll interval 8ms - epInfo[ XBOX_OUTPUT_PIPE_4 ].epAttribs = EP_INTERRUPT; + epInfo[ XBOX_OUTPUT_PIPE_4 ].epAttribs = USB_TRANSFER_TYPE_INTERRUPT; epInfo[ XBOX_OUTPUT_PIPE_4 ].bmNakPower = USB_NAK_NOWAIT; // Only poll once for interrupt endpoints epInfo[ XBOX_OUTPUT_PIPE_4 ].maxPktSize = EP_MAXPKTSIZE; epInfo[ XBOX_OUTPUT_PIPE_4 ].bmSndToggle = 0; diff --git a/XBOXRECV.h b/XBOXRECV.h index c3964991..0c259217 100644 --- a/XBOXRECV.h +++ b/XBOXRECV.h @@ -26,9 +26,6 @@ /* Data Xbox 360 taken from descriptors */ #define EP_MAXPKTSIZE 32 // max size for data via USB -/* Endpoint types */ -#define EP_INTERRUPT 0x03 - /* Names we give to the 9 Xbox360 pipes */ #define XBOX_CONTROL_PIPE 0 #define XBOX_INPUT_PIPE_1 1 diff --git a/XBOXUSB.cpp b/XBOXUSB.cpp index 4128d231..3cd9cde9 100644 --- a/XBOXUSB.cpp +++ b/XBOXUSB.cpp @@ -155,13 +155,13 @@ uint8_t XBOXUSB::Init(uint8_t parent, uint8_t port, bool lowspeed) { /* Initialize data structures for endpoints of device */ epInfo[ XBOX_INPUT_PIPE ].epAddr = 0x01; // XBOX 360 report endpoint - epInfo[ XBOX_INPUT_PIPE ].epAttribs = EP_INTERRUPT; + epInfo[ XBOX_INPUT_PIPE ].epAttribs = USB_TRANSFER_TYPE_INTERRUPT; epInfo[ XBOX_INPUT_PIPE ].bmNakPower = USB_NAK_NOWAIT; // Only poll once for interrupt endpoints epInfo[ XBOX_INPUT_PIPE ].maxPktSize = EP_MAXPKTSIZE; epInfo[ XBOX_INPUT_PIPE ].bmSndToggle = 0; epInfo[ XBOX_INPUT_PIPE ].bmRcvToggle = 0; epInfo[ XBOX_OUTPUT_PIPE ].epAddr = 0x02; // XBOX 360 output endpoint - epInfo[ XBOX_OUTPUT_PIPE ].epAttribs = EP_INTERRUPT; + epInfo[ XBOX_OUTPUT_PIPE ].epAttribs = USB_TRANSFER_TYPE_INTERRUPT; epInfo[ XBOX_OUTPUT_PIPE ].bmNakPower = USB_NAK_NOWAIT; // Only poll once for interrupt endpoints epInfo[ XBOX_OUTPUT_PIPE ].maxPktSize = EP_MAXPKTSIZE; epInfo[ XBOX_OUTPUT_PIPE ].bmSndToggle = 0; diff --git a/XBOXUSB.h b/XBOXUSB.h index aed330a2..8d5ecb2a 100644 --- a/XBOXUSB.h +++ b/XBOXUSB.h @@ -24,9 +24,6 @@ /* Data Xbox 360 taken from descriptors */ #define EP_MAXPKTSIZE 32 // max size for data via USB -/* Endpoint types */ -#define EP_INTERRUPT 0x03 - /* Names we give to the 3 Xbox360 pipes */ #define XBOX_CONTROL_PIPE 0 #define XBOX_INPUT_PIPE 1