mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
compile faster
This commit is contained in:
parent
114c8f079b
commit
1a0d0690d3
26 changed files with 57 additions and 129 deletions
1
BTD.h
1
BTD.h
|
@ -19,7 +19,6 @@
|
||||||
#define _btd_h_
|
#define _btd_h_
|
||||||
|
|
||||||
#include "Usb.h"
|
#include "Usb.h"
|
||||||
#include "confdescparser.h"
|
|
||||||
|
|
||||||
//PID and VID of the Sony PS3 devices
|
//PID and VID of the Sony PS3 devices
|
||||||
#define PS3_VID 0x054C // Sony Corporation
|
#define PS3_VID 0x054C // Sony Corporation
|
||||||
|
|
8
PS3USB.h
8
PS3USB.h
|
@ -18,12 +18,6 @@
|
||||||
#ifndef _ps3usb_h_
|
#ifndef _ps3usb_h_
|
||||||
#define _ps3usb_h_
|
#define _ps3usb_h_
|
||||||
|
|
||||||
#if defined(ARDUINO) && ARDUINO >= 100
|
|
||||||
#include "Arduino.h"
|
|
||||||
#else
|
|
||||||
#include "WProgram.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "Usb.h"
|
#include "Usb.h"
|
||||||
#include "PS3Enums.h"
|
#include "PS3Enums.h"
|
||||||
|
|
||||||
|
@ -267,7 +261,7 @@ private:
|
||||||
*/
|
*/
|
||||||
void onInit();
|
void onInit();
|
||||||
void (*pFuncOnInit)(void); // Pointer to function called in onInit()
|
void (*pFuncOnInit)(void); // Pointer to function called in onInit()
|
||||||
|
|
||||||
bool bPollEnable;
|
bool bPollEnable;
|
||||||
|
|
||||||
uint32_t timer; // used to continuously set PS3 Move controller Bulb and rumble values
|
uint32_t timer; // used to continuously set PS3 Move controller Bulb and rumble values
|
||||||
|
|
16
Usb.h
16
Usb.h
|
@ -22,11 +22,19 @@ e-mail : support@circuitsathome.com
|
||||||
// Not used anymore?
|
// Not used anymore?
|
||||||
//#define USB_METHODS_INLINE
|
//#define USB_METHODS_INLINE
|
||||||
//#include <assert.h>
|
//#include <assert.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "address.h"
|
#include "printhex.h"
|
||||||
#include "usbhost.h"
|
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
|
#include "hexdump.h"
|
||||||
|
#include "max3421e.h"
|
||||||
|
#include "address.h"
|
||||||
|
#include "avrpins.h"
|
||||||
|
#include "usb_ch9.h"
|
||||||
|
#include "usbhost.h"
|
||||||
|
|
||||||
/* shield pins. First parameter - SS pin, second parameter - INT pin */
|
/* shield pins. First parameter - SS pin, second parameter - INT pin */
|
||||||
#ifdef BOARD_BLACK_WIDDOW
|
#ifdef BOARD_BLACK_WIDDOW
|
||||||
|
@ -268,4 +276,8 @@ inline uint8_t USB::setConf(uint8_t addr, uint8_t ep, uint8_t conf_value) {
|
||||||
|
|
||||||
#endif // defined(USB_METHODS_INLINE)
|
#endif // defined(USB_METHODS_INLINE)
|
||||||
|
|
||||||
|
|
||||||
|
#include "parsetools.h"
|
||||||
|
#include "confdescparser.h"
|
||||||
|
|
||||||
#endif //_usb_h_
|
#endif //_usb_h_
|
||||||
|
|
|
@ -18,14 +18,8 @@
|
||||||
#ifndef _xboxold_h_
|
#ifndef _xboxold_h_
|
||||||
#define _xboxold_h_
|
#define _xboxold_h_
|
||||||
|
|
||||||
#if defined(ARDUINO) && ARDUINO >= 100
|
|
||||||
#include "Arduino.h"
|
|
||||||
#else
|
|
||||||
#include "WProgram.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "Usb.h"
|
#include "Usb.h"
|
||||||
#include "controllerEnums.h"
|
#include "controllerEnums.h"
|
||||||
|
|
||||||
/* Data Xbox taken from descriptors */
|
/* Data Xbox taken from descriptors */
|
||||||
#define EP_MAXPKTSIZE 32 // Max size for data via USB
|
#define EP_MAXPKTSIZE 32 // Max size for data via USB
|
||||||
|
|
16
XBOXRECV.h
16
XBOXRECV.h
|
@ -20,12 +20,6 @@
|
||||||
#ifndef _xboxrecv_h_
|
#ifndef _xboxrecv_h_
|
||||||
#define _xboxrecv_h_
|
#define _xboxrecv_h_
|
||||||
|
|
||||||
#if defined(ARDUINO) && ARDUINO >= 100
|
|
||||||
#include "Arduino.h"
|
|
||||||
#else
|
|
||||||
#include "WProgram.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "Usb.h"
|
#include "Usb.h"
|
||||||
#include "xboxEnums.h"
|
#include "xboxEnums.h"
|
||||||
|
|
||||||
|
@ -135,7 +129,7 @@ public:
|
||||||
|
|
||||||
/** @name Xbox Controller functions */
|
/** @name Xbox Controller functions */
|
||||||
/**
|
/**
|
||||||
* Return the analog value from the joysticks on the controller.
|
* Return the analog value from the joysticks on the controller.
|
||||||
* @param a Either ::LeftHatX, ::LeftHatY, ::RightHatX or ::RightHatY.
|
* @param a Either ::LeftHatX, ::LeftHatY, ::RightHatX or ::RightHatY.
|
||||||
* @param controller The controller to read from. Default to 0.
|
* @param controller The controller to read from. Default to 0.
|
||||||
* @return Returns a signed 16-bit integer.
|
* @return Returns a signed 16-bit integer.
|
||||||
|
@ -159,7 +153,7 @@ public:
|
||||||
setRumbleOn(0, 0, controller);
|
setRumbleOn(0, 0, controller);
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Turn rumble on.
|
* Turn rumble on.
|
||||||
* @param lValue Left motor (big weight) inside the controller.
|
* @param lValue Left motor (big weight) inside the controller.
|
||||||
* @param rValue Right motor (small weight) inside the controller.
|
* @param rValue Right motor (small weight) inside the controller.
|
||||||
* @param controller The controller to write to. Default to 0.
|
* @param controller The controller to write to. Default to 0.
|
||||||
|
@ -182,19 +176,19 @@ public:
|
||||||
setLedRaw(0, controller);
|
setLedRaw(0, controller);
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Turn on a LED by using the ::LED enum.
|
* Turn on a LED by using the ::LED enum.
|
||||||
* @param l ::LED1, ::LED2, ::LED3 and ::LED4 is supported by the Xbox controller.
|
* @param l ::LED1, ::LED2, ::LED3 and ::LED4 is supported by the Xbox controller.
|
||||||
* @param controller The controller to write to. Default to 0.
|
* @param controller The controller to write to. Default to 0.
|
||||||
*/
|
*/
|
||||||
void setLedOn(LED l, uint8_t controller = 0);
|
void setLedOn(LED l, uint8_t controller = 0);
|
||||||
/**
|
/**
|
||||||
* Turn on a LED by using the ::LED enum.
|
* Turn on a LED by using the ::LED enum.
|
||||||
* @param l ::ALL, ::LED1, ::LED2, ::LED3 and ::LED4 is supported by the Xbox controller.
|
* @param l ::ALL, ::LED1, ::LED2, ::LED3 and ::LED4 is supported by the Xbox controller.
|
||||||
* @param controller The controller to write to. Default to 0.
|
* @param controller The controller to write to. Default to 0.
|
||||||
*/
|
*/
|
||||||
void setLedBlink(LED l, uint8_t controller = 0);
|
void setLedBlink(LED l, uint8_t controller = 0);
|
||||||
/**
|
/**
|
||||||
* Used to set special LED modes supported by the Xbox controller.
|
* Used to set special LED modes supported by the Xbox controller.
|
||||||
* @param lm See ::LEDMode.
|
* @param lm See ::LEDMode.
|
||||||
* @param controller The controller to write to. Default to 0.
|
* @param controller The controller to write to. Default to 0.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,12 +18,6 @@
|
||||||
#ifndef _xboxusb_h_
|
#ifndef _xboxusb_h_
|
||||||
#define _xboxusb_h_
|
#define _xboxusb_h_
|
||||||
|
|
||||||
#if defined(ARDUINO) && ARDUINO >= 100
|
|
||||||
#include "Arduino.h"
|
|
||||||
#else
|
|
||||||
#include "WProgram.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "Usb.h"
|
#include "Usb.h"
|
||||||
#include "xboxEnums.h"
|
#include "xboxEnums.h"
|
||||||
|
|
||||||
|
|
|
@ -14,12 +14,12 @@ Circuits At Home, LTD
|
||||||
Web : http://www.circuitsathome.com
|
Web : http://www.circuitsathome.com
|
||||||
e-mail : support@circuitsathome.com
|
e-mail : support@circuitsathome.com
|
||||||
*/
|
*/
|
||||||
#if !defined(__ADDRESS_H__)
|
|
||||||
|
#if !defined(_usb_h_) || defined(__ADDRESS_H__)
|
||||||
|
#error "Never include address.h directly; include Usb.h instead"
|
||||||
|
#else
|
||||||
#define __ADDRESS_H__
|
#define __ADDRESS_H__
|
||||||
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include <stddef.h>
|
|
||||||
#include "max3421e.h"
|
|
||||||
|
|
||||||
|
|
||||||
/* NAK powers. To save space in endpoint data structure, amount of retries before giving up and returning 0x4 is stored in */
|
/* NAK powers. To save space in endpoint data structure, amount of retries before giving up and returning 0x4 is stored in */
|
||||||
|
|
6
adk.h
6
adk.h
|
@ -21,12 +21,6 @@ e-mail : support@circuitsathome.com
|
||||||
#define _ADK_H_
|
#define _ADK_H_
|
||||||
|
|
||||||
#include "Usb.h"
|
#include "Usb.h"
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
|
|
||||||
#include "printhex.h"
|
|
||||||
#include "hexdump.h"
|
|
||||||
|
|
||||||
#include "confdescparser.h"
|
|
||||||
|
|
||||||
#define ADK_VID 0x18D1
|
#define ADK_VID 0x18D1
|
||||||
#define ADK_PID 0x2D00
|
#define ADK_PID 0x2D00
|
||||||
|
|
6
cdcacm.h
6
cdcacm.h
|
@ -18,12 +18,6 @@ e-mail : support@circuitsathome.com
|
||||||
#define __CDCACM_H__
|
#define __CDCACM_H__
|
||||||
|
|
||||||
#include "Usb.h"
|
#include "Usb.h"
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
|
|
||||||
#include "printhex.h"
|
|
||||||
#include "hexdump.h"
|
|
||||||
|
|
||||||
#include "confdescparser.h"
|
|
||||||
|
|
||||||
#define bmREQ_CDCOUT USB_SETUP_HOST_TO_DEVICE|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE
|
#define bmREQ_CDCOUT USB_SETUP_HOST_TO_DEVICE|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE
|
||||||
#define bmREQ_CDCIN USB_SETUP_DEVICE_TO_HOST|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE
|
#define bmREQ_CDCIN USB_SETUP_DEVICE_TO_HOST|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE
|
||||||
|
|
|
@ -18,13 +18,6 @@ e-mail : support@circuitsathome.com
|
||||||
#define __CDCFTDI_H__
|
#define __CDCFTDI_H__
|
||||||
|
|
||||||
#include "Usb.h"
|
#include "Usb.h"
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
#include "usbhost.h"
|
|
||||||
|
|
||||||
#include "printhex.h"
|
|
||||||
#include "hexdump.h"
|
|
||||||
|
|
||||||
#include "confdescparser.h"
|
|
||||||
|
|
||||||
#define bmREQ_FTDI_OUT 0x40
|
#define bmREQ_FTDI_OUT 0x40
|
||||||
#define bmREQ_FTDI_IN 0xc0
|
#define bmREQ_FTDI_IN 0xc0
|
||||||
|
|
|
@ -14,16 +14,12 @@ Circuits At Home, LTD
|
||||||
Web : http://www.circuitsathome.com
|
Web : http://www.circuitsathome.com
|
||||||
e-mail : support@circuitsathome.com
|
e-mail : support@circuitsathome.com
|
||||||
*/
|
*/
|
||||||
#if !defined(__CONFDESCPARSER_H__)
|
#if !defined(_usb_h_) || defined(__CONFDESCPARSER_H__)
|
||||||
|
#error "Never include confdescparser.h directly; include Usb.h instead"
|
||||||
|
#else
|
||||||
|
|
||||||
#define __CONFDESCPARSER_H__
|
#define __CONFDESCPARSER_H__
|
||||||
|
|
||||||
#include <inttypes.h>
|
|
||||||
|
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
#include "message.h"
|
|
||||||
#include "parsetools.h"
|
|
||||||
|
|
||||||
//#include "hid.h"
|
|
||||||
|
|
||||||
class UsbConfigXtracter {
|
class UsbConfigXtracter {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -14,14 +14,11 @@ Circuits At Home, LTD
|
||||||
Web : http://www.circuitsathome.com
|
Web : http://www.circuitsathome.com
|
||||||
e-mail : support@circuitsathome.com
|
e-mail : support@circuitsathome.com
|
||||||
*/
|
*/
|
||||||
#if !defined(__HEXDUMP_H__)
|
#if !defined(_usb_h_) || defined(__HEXDUMP_H__)
|
||||||
|
#error "Never include hexdump.h directly; include Usb.h instead"
|
||||||
|
#else
|
||||||
#define __HEXDUMP_H__
|
#define __HEXDUMP_H__
|
||||||
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
#include "printhex.h"
|
|
||||||
#include "message.h"
|
|
||||||
|
|
||||||
extern int UsbDEBUGlvl;
|
extern int UsbDEBUGlvl;
|
||||||
|
|
||||||
template <class BASE_CLASS, class LEN_TYPE, class OFFSET_TYPE>
|
template <class BASE_CLASS, class LEN_TYPE, class OFFSET_TYPE>
|
||||||
|
|
6
hid.h
6
hid.h
|
@ -18,12 +18,6 @@ e-mail : support@circuitsathome.com
|
||||||
#define __HID_H__
|
#define __HID_H__
|
||||||
|
|
||||||
#include "Usb.h"
|
#include "Usb.h"
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
|
|
||||||
#include "printhex.h"
|
|
||||||
#include "hexdump.h"
|
|
||||||
|
|
||||||
#include "confdescparser.h"
|
|
||||||
#include "hidusagestr.h"
|
#include "hidusagestr.h"
|
||||||
|
|
||||||
#define DATA_SIZE_MASK 0x03
|
#define DATA_SIZE_MASK 0x03
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Usb.h"
|
#include "Usb.h"
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
#include <confdescparser.h>
|
|
||||||
|
|
||||||
#define bmREQ_MASSOUT USB_SETUP_HOST_TO_DEVICE|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE
|
#define bmREQ_MASSOUT USB_SETUP_HOST_TO_DEVICE|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE
|
||||||
#define bmREQ_MASSIN USB_SETUP_DEVICE_TO_HOST|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE
|
#define bmREQ_MASSIN USB_SETUP_DEVICE_TO_HOST|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_INTERFACE
|
||||||
|
|
|
@ -14,11 +14,14 @@ Circuits At Home, LTD
|
||||||
Web : http://www.circuitsathome.com
|
Web : http://www.circuitsathome.com
|
||||||
e-mail : support@circuitsathome.com
|
e-mail : support@circuitsathome.com
|
||||||
*/
|
*/
|
||||||
/* MAX3421E register/bit names and bitmasks */
|
#if !defined(_usb_h_) || defined(_max3421e_h_)
|
||||||
|
#error "Never include max3421e.h directly; include Usb.h instead"
|
||||||
|
#else
|
||||||
|
|
||||||
#ifndef _max3421e_h_
|
|
||||||
#define _max3421e_h_
|
#define _max3421e_h_
|
||||||
|
|
||||||
|
/* MAX3421E register/bit names and bitmasks */
|
||||||
|
|
||||||
/* Arduino pin definitions */
|
/* Arduino pin definitions */
|
||||||
/* pin numbers to port numbers */
|
/* pin numbers to port numbers */
|
||||||
|
|
||||||
|
|
10
max_LCD.cpp
10
max_LCD.cpp
|
@ -15,17 +15,7 @@ Web : http://www.circuitsathome.com
|
||||||
e-mail : support@circuitsathome.com
|
e-mail : support@circuitsathome.com
|
||||||
*/
|
*/
|
||||||
#include "max_LCD.h"
|
#include "max_LCD.h"
|
||||||
#include "max3421e.h"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <inttypes.h>
|
|
||||||
|
|
||||||
#if defined(ARDUINO) && ARDUINO >=100
|
|
||||||
#include "Arduino.h"
|
|
||||||
#else
|
|
||||||
#include <WProgram.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// pin definition and set/clear
|
// pin definition and set/clear
|
||||||
|
|
||||||
|
|
|
@ -21,9 +21,8 @@ e-mail : support@circuitsathome.com
|
||||||
#ifndef _Max_LCD_h_
|
#ifndef _Max_LCD_h_
|
||||||
#define _Max_LCD_h_
|
#define _Max_LCD_h_
|
||||||
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include "Print.h"
|
|
||||||
#include "Usb.h"
|
#include "Usb.h"
|
||||||
|
#include "Print.h"
|
||||||
|
|
||||||
// commands
|
// commands
|
||||||
#define LCD_CLEARDISPLAY 0x01
|
#define LCD_CLEARDISPLAY 0x01
|
||||||
|
|
|
@ -15,7 +15,7 @@ Web : http://www.circuitsathome.com
|
||||||
e-mail : support@circuitsathome.com
|
e-mail : support@circuitsathome.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "message.h"
|
#include "Usb.h"
|
||||||
// 0x80 is the default (i.e. trace) to turn off set this global to something lower.
|
// 0x80 is the default (i.e. trace) to turn off set this global to something lower.
|
||||||
// this allows for 126 other debugging levels.
|
// this allows for 126 other debugging levels.
|
||||||
// TO-DO: Allow assignment to a different serial port
|
// TO-DO: Allow assignment to a different serial port
|
||||||
|
|
11
message.h
11
message.h
|
@ -14,16 +14,13 @@ Circuits At Home, LTD
|
||||||
Web : http://www.circuitsathome.com
|
Web : http://www.circuitsathome.com
|
||||||
e-mail : support@circuitsathome.com
|
e-mail : support@circuitsathome.com
|
||||||
*/
|
*/
|
||||||
#if !defined(__MESSAGE_H__)
|
#if !defined(_usb_h_) || defined(__MESSAGE_H__)
|
||||||
|
#error "Never include message.h directly; include Usb.h instead"
|
||||||
|
#else
|
||||||
#define __MESSAGE_H__
|
#define __MESSAGE_H__
|
||||||
|
|
||||||
#include "settings.h"
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
|
|
||||||
extern int UsbDEBUGlvl;
|
extern int UsbDEBUGlvl;
|
||||||
|
|
||||||
#include "printhex.h"
|
|
||||||
void E_Notify(char const * msg, int lvl);
|
void E_Notify(char const * msg, int lvl);
|
||||||
void E_Notify(uint8_t b, int lvl);
|
void E_Notify(uint8_t b, int lvl);
|
||||||
void E_NotifyStr(char const * msg, int lvl);
|
void E_NotifyStr(char const * msg, int lvl);
|
||||||
|
@ -78,6 +75,6 @@ void ErrorMessage(char const * msg, ERROR_TYPE rcode = 0) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "hexdump.h"
|
//#include "hexdump.h"
|
||||||
|
|
||||||
#endif // __MESSAGE_H__
|
#endif // __MESSAGE_H__
|
||||||
|
|
|
@ -14,7 +14,7 @@ Circuits At Home, LTD
|
||||||
Web : http://www.circuitsathome.com
|
Web : http://www.circuitsathome.com
|
||||||
e-mail : support@circuitsathome.com
|
e-mail : support@circuitsathome.com
|
||||||
*/
|
*/
|
||||||
#include "parsetools.h"
|
#include "Usb.h"
|
||||||
|
|
||||||
bool MultiByteValueParser::Parse(uint8_t **pp, uint16_t *pcntdn) {
|
bool MultiByteValueParser::Parse(uint8_t **pp, uint16_t *pcntdn) {
|
||||||
if (!pBuf) {
|
if (!pBuf) {
|
||||||
|
|
16
parsetools.h
16
parsetools.h
|
@ -14,20 +14,10 @@ Circuits At Home, LTD
|
||||||
Web : http://www.circuitsathome.com
|
Web : http://www.circuitsathome.com
|
||||||
e-mail : support@circuitsathome.com
|
e-mail : support@circuitsathome.com
|
||||||
*/
|
*/
|
||||||
#if !defined(__PARSETOOLS_H__)
|
#if !defined(_usb_h_) || defined(__PARSETOOLS_H__)
|
||||||
#define __PARSETOOLS_H__
|
#error "Never include parsetools.h directly; include Usb.h instead"
|
||||||
|
|
||||||
#include <inttypes.h>
|
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
#include "message.h"
|
|
||||||
//#include "printhex.h"
|
|
||||||
//#include "hexdump.h"
|
|
||||||
|
|
||||||
#if defined(ARDUINO) && ARDUINO >=100
|
|
||||||
#include "Arduino.h"
|
|
||||||
#else
|
#else
|
||||||
#include <WProgram.h>
|
#define __PARSETOOLS_H__
|
||||||
#endif
|
|
||||||
|
|
||||||
struct MultiValueBuffer {
|
struct MultiValueBuffer {
|
||||||
uint8_t valueSize;
|
uint8_t valueSize;
|
||||||
|
|
|
@ -14,10 +14,11 @@ Circuits At Home, LTD
|
||||||
Web : http://www.circuitsathome.com
|
Web : http://www.circuitsathome.com
|
||||||
e-mail : support@circuitsathome.com
|
e-mail : support@circuitsathome.com
|
||||||
*/
|
*/
|
||||||
#if !defined(__PRINTHEX_H__)
|
|
||||||
#define __PRINTHEX_H__
|
|
||||||
|
|
||||||
#include "settings.h"
|
#if !defined(_usb_h_) || defined(__PRINTHEX_H__)
|
||||||
|
#error "Never include printhex.h directly; include Usb.h instead"
|
||||||
|
#else
|
||||||
|
#define __PRINTHEX_H__
|
||||||
|
|
||||||
void E_Notifyc(char c, int lvl);
|
void E_Notifyc(char c, int lvl);
|
||||||
|
|
||||||
|
|
|
@ -33,9 +33,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// AUTOMATIC Settings
|
// AUTOMATIC Settings
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -48,6 +45,7 @@
|
||||||
#if defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
|
#if defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
|
||||||
#define BOARD_TEENSY_PLUS_PLUS
|
#define BOARD_TEENSY_PLUS_PLUS
|
||||||
#endif
|
#endif
|
||||||
|
#include <avr/pgmspace.h>
|
||||||
|
|
||||||
#endif /* SETTINGS_H */
|
#endif /* SETTINGS_H */
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,6 @@ e-mail : support@circuitsathome.com
|
||||||
#ifndef _ch9_h_
|
#ifndef _ch9_h_
|
||||||
#define _ch9_h_
|
#define _ch9_h_
|
||||||
|
|
||||||
#include <inttypes.h>
|
|
||||||
|
|
||||||
/* Misc.USB constants */
|
/* Misc.USB constants */
|
||||||
#define DEV_DESCR_LEN 18 //device descriptor length
|
#define DEV_DESCR_LEN 18 //device descriptor length
|
||||||
#define CONF_DESCR_LEN 9 //configuration descriptor length
|
#define CONF_DESCR_LEN 9 //configuration descriptor length
|
||||||
|
|
10
usbhost.h
10
usbhost.h
|
@ -15,13 +15,13 @@ Web : http://www.circuitsathome.com
|
||||||
e-mail : support@circuitsathome.com
|
e-mail : support@circuitsathome.com
|
||||||
*/
|
*/
|
||||||
/* MAX3421E-based USB Host Library header file */
|
/* MAX3421E-based USB Host Library header file */
|
||||||
#ifndef _USBHOST_H_
|
|
||||||
|
|
||||||
|
#if !defined(_usb_h_) || defined(_USBHOST_H_)
|
||||||
|
#error "Never include usbhost.h directly; include Usb.h instead"
|
||||||
|
#else
|
||||||
#define _USBHOST_H_
|
#define _USBHOST_H_
|
||||||
|
|
||||||
#include "avrpins.h"
|
|
||||||
#include "max3421e.h"
|
|
||||||
#include "usb_ch9.h"
|
|
||||||
#include <stdio.h>
|
|
||||||
/* SPI initialization */
|
/* SPI initialization */
|
||||||
template< typename CLK, typename MOSI, typename MISO, typename SPI_SS > class SPi {
|
template< typename CLK, typename MOSI, typename MISO, typename SPI_SS > class SPi {
|
||||||
public:
|
public:
|
||||||
|
|
1
usbhub.h
1
usbhub.h
|
@ -18,7 +18,6 @@ e-mail : support@circuitsathome.com
|
||||||
#define __USBHUB_H__
|
#define __USBHUB_H__
|
||||||
|
|
||||||
#include "Usb.h"
|
#include "Usb.h"
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
|
|
||||||
#define USB_DESCRIPTOR_HUB 0x09 // Hub descriptor type
|
#define USB_DESCRIPTOR_HUB 0x09 // Hub descriptor type
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue