diff --git a/Usb.cpp b/Usb.cpp index f961bb2d..58d2f11f 100644 --- a/Usb.cpp +++ b/Usb.cpp @@ -16,17 +16,8 @@ e-mail : support@circuitsathome.com */ /* USB functions */ -#include "avrpins.h" -#include "max3421e.h" -#include "usbhost.h" #include "Usb.h" -#if defined(ARDUINO) && ARDUINO >=100 -#include "Arduino.h" -#else -#include -#endif - static uint8_t usb_error = 0; static uint8_t usb_task_state; @@ -452,7 +443,7 @@ void USB::Task(void) //USB state machine lowspeed = false; break; case LSHOST: - + lowspeed = true; //intentional fallthrough case FSHOST: //attached diff --git a/Usb.h b/Usb.h index 0290096c..2a55d3ea 100644 --- a/Usb.h +++ b/Usb.h @@ -22,6 +22,7 @@ e-mail : support@circuitsathome.com // Not used anymore? //#define USB_METHODS_INLINE #include "settings.h" +#include #include "address.h" #include diff --git a/adk.h b/adk.h index fb5e7818..85742f84 100644 --- a/adk.h +++ b/adk.h @@ -20,23 +20,11 @@ e-mail : support@circuitsathome.com #if !defined(_ADK_H_) #define _ADK_H_ -#include -#include -#include "avrpins.h" -#include "max3421e.h" -#include "usbhost.h" -#include "usb_ch9.h" #include "Usb.h" - -#if defined(ARDUINO) && ARDUINO >=100 -#include "Arduino.h" -#else -#include -#endif +#include #include "printhex.h" #include "hexdump.h" -#include "message.h" #include "confdescparser.h" diff --git a/cdcacm.h b/cdcacm.h index 469d9383..a7488ea0 100644 --- a/cdcacm.h +++ b/cdcacm.h @@ -17,23 +17,11 @@ e-mail : support@circuitsathome.com #if !defined(__CDCACM_H__) #define __CDCACM_H__ -#include -#include -#include "avrpins.h" -#include "max3421e.h" -#include "usbhost.h" -#include "usb_ch9.h" #include "Usb.h" - -#if defined(ARDUINO) && ARDUINO >=100 -#include "Arduino.h" -#else -#include -#endif +#include #include "printhex.h" #include "hexdump.h" -#include "message.h" #include "confdescparser.h" @@ -140,7 +128,7 @@ typedef struct uint16_t wIndex; uint16_t wLength; uint16_t bmState; //UART state bitmap for SERIAL_STATE, other notifications variable length -} CLASS_NOTIFICATION; +} CLASS_NOTIFICATION; class ACM; @@ -169,7 +157,7 @@ protected: uint8_t bNumEP; // total number of EP in the configuration uint32_t qNextPollTime; // next poll time bool bPollEnable; // poll enable flag - bool ready; //device ready indicator + bool ready; //device ready indicator EpInfo epInfo[ACM_MAX_ENDPOINTS]; diff --git a/cdcftdi.h b/cdcftdi.h index 1bd26430..35b157d6 100644 --- a/cdcftdi.h +++ b/cdcftdi.h @@ -17,23 +17,12 @@ e-mail : support@circuitsathome.com #if !defined(__CDCFTDI_H__) #define __CDCFTDI_H__ -#include -#include -#include "avrpins.h" -#include "max3421e.h" -#include "usbhost.h" -#include "usb_ch9.h" #include "Usb.h" - -#if defined(ARDUINO) && ARDUINO >=100 -#include "Arduino.h" -#else -#include -#endif +#include +#include "usbhost.h" #include "printhex.h" #include "hexdump.h" -#include "message.h" #include "confdescparser.h" diff --git a/cdcprolific.h b/cdcprolific.h index 9d7a31ce..251eb5fc 100644 --- a/cdcprolific.h +++ b/cdcprolific.h @@ -17,25 +17,6 @@ e-mail : support@circuitsathome.com #if !defined(__CDCPROLIFIC_H__) #define __CDCPROLIFIC_H__ -#include -#include -#include "avrpins.h" -#include "max3421e.h" -#include "usbhost.h" -#include "usb_ch9.h" -#include "Usb.h" - -#if defined(ARDUINO) && ARDUINO >=100 -#include "Arduino.h" -#else -#include -#endif - -#include "printhex.h" -#include "hexdump.h" -#include "message.h" - -#include "confdescparser.h" #include "cdcacm.h" #define PL_VID 0x067B diff --git a/hid.h b/hid.h index f894a64d..56c4417e 100644 --- a/hid.h +++ b/hid.h @@ -17,23 +17,11 @@ e-mail : support@circuitsathome.com #if !defined(__HID_H__) #define __HID_H__ -#include -#include -#include "avrpins.h" -#include "max3421e.h" -#include "usbhost.h" -#include "usb_ch9.h" #include "Usb.h" - -#if defined(ARDUINO) && ARDUINO >=100 -#include "Arduino.h" -#else -#include -#endif +#include #include "printhex.h" #include "hexdump.h" -#include "message.h" #include "confdescparser.h" #include "hidusagestr.h" diff --git a/hidboot.h b/hidboot.h index bcbef6e6..1113a29c 100644 --- a/hidboot.h +++ b/hidboot.h @@ -17,27 +17,8 @@ e-mail : support@circuitsathome.com #if !defined(__HIDBOOT_H__) #define __HIDBOOT_H__ -#include -#include -#include "avrpins.h" -#include "max3421e.h" -#include "usbhost.h" -#include "usb_ch9.h" -#include "Usb.h" #include "hid.h" -#if defined(ARDUINO) && ARDUINO >=100 -#include "Arduino.h" -#else -#include -#endif - -#include "printhex.h" -#include "hexdump.h" -#include "message.h" - -#include "confdescparser.h" - #define KEY_SPACE 0x2c #define KEY_ZERO 0x27 #define KEY_ZERO2 0x62 diff --git a/hidescriptorparser.h b/hidescriptorparser.h index 1c4a1900..9a7ef705 100644 --- a/hidescriptorparser.h +++ b/hidescriptorparser.h @@ -17,24 +17,6 @@ e-mail : support@circuitsathome.com #if !defined(__HIDDESCRIPTORPARSER_H__) #define __HIDDESCRIPTORPARSER_H__ -#include -#include -#include "avrpins.h" -#include "max3421e.h" -#include "usbhost.h" -#include "usb_ch9.h" -#include "Usb.h" - -#if defined(ARDUINO) && ARDUINO >=100 -#include "Arduino.h" -#else -#include -#endif - -#include "printhex.h" -#include "hexdump.h" -#include "message.h" -#include "confdescparser.h" #include "hid.h" class ReportDescParserBase : public USBReadParser { diff --git a/usbhub.h b/usbhub.h index 10cccfe5..94427b88 100644 --- a/usbhub.h +++ b/usbhub.h @@ -17,20 +17,8 @@ e-mail : support@circuitsathome.com #if !defined(__USBHUB_H__) #define __USBHUB_H__ -#include -#include -#include "avrpins.h" -#include "max3421e.h" -#include "usbhost.h" -#include "usb_ch9.h" #include "Usb.h" - - -#if defined(ARDUINO) && ARDUINO >=100 -#include "Arduino.h" -#else -#include -#endif +#include #define USB_DESCRIPTOR_HUB 0x09 // Hub descriptor type