Include system headers before library headers (fix DEBUG issue with newlib)

This commit is contained in:
PaulStoffregen 2013-05-29 10:40:45 -07:00
parent fca5a4125f
commit c9815144af
12 changed files with 77 additions and 71 deletions

10
Usb.cpp
View file

@ -16,17 +16,17 @@ 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 <WProgram.h>
#endif
#include "avrpins.h"
#include "max3421e.h"
#include "usbhost.h"
#include "Usb.h"
static uint8_t usb_error = 0;
static uint8_t usb_task_state;

12
Usb.h
View file

@ -18,6 +18,12 @@ e-mail : support@circuitsathome.com
#ifndef _usb_h_
#define _usb_h_
#if defined(ARDUINO) && ARDUINO >=100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
//#define BOARD_BLACK_WIDDOW
#define USB_METHODS_INLINE
@ -31,12 +37,6 @@ e-mail : support@circuitsathome.com
#include "usbhost.h"
#include "usb_ch9.h"
#include "address.h"
#if defined(ARDUINO) && ARDUINO >=100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#include "message.h"
/* shield pins. First parameter - SS pin, second parameter - INT pin */

12
adk.h
View file

@ -20,6 +20,12 @@ e-mail : support@circuitsathome.com
#if !defined(_ADK_H_)
#define _ADK_H_
#if defined(ARDUINO) && ARDUINO >=100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#include <inttypes.h>
#include <avr/pgmspace.h>
#include "avrpins.h"
@ -28,12 +34,6 @@ e-mail : support@circuitsathome.com
#include "usb_ch9.h"
#include "Usb.h"
#if defined(ARDUINO) && ARDUINO >=100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#include "printhex.h"
#include "hexdump.h"
#include "message.h"

View file

@ -17,6 +17,12 @@ e-mail : support@circuitsathome.com
#if !defined(__CDCACM_H__)
#define __CDCACM_H__
#if defined(ARDUINO) && ARDUINO >=100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#include <inttypes.h>
#include <avr/pgmspace.h>
#include "avrpins.h"
@ -25,12 +31,6 @@ e-mail : support@circuitsathome.com
#include "usb_ch9.h"
#include "Usb.h"
#if defined(ARDUINO) && ARDUINO >=100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#include "printhex.h"
#include "hexdump.h"
#include "message.h"

View file

@ -17,6 +17,12 @@ e-mail : support@circuitsathome.com
#if !defined(__CDCPROLIFIC_H__)
#define __CDCPROLIFIC_H__
#if defined(ARDUINO) && ARDUINO >=100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#include <inttypes.h>
#include <avr/pgmspace.h>
#include "avrpins.h"
@ -25,12 +31,6 @@ e-mail : support@circuitsathome.com
#include "usb_ch9.h"
#include "Usb.h"
#if defined(ARDUINO) && ARDUINO >=100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#include "printhex.h"
#include "hexdump.h"
#include "message.h"

12
hid.h
View file

@ -17,6 +17,12 @@ e-mail : support@circuitsathome.com
#if !defined(__HID_H__)
#define __HID_H__
#if defined(ARDUINO) && ARDUINO >=100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#include <inttypes.h>
#include <avr/pgmspace.h>
#include "avrpins.h"
@ -25,12 +31,6 @@ e-mail : support@circuitsathome.com
#include "usb_ch9.h"
#include "Usb.h"
#if defined(ARDUINO) && ARDUINO >=100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#include "printhex.h"
#include "hexdump.h"
#include "message.h"

View file

@ -17,6 +17,12 @@ e-mail : support@circuitsathome.com
#if !defined(__HIDBOOT_H__)
#define __HIDBOOT_H__
#if defined(ARDUINO) && ARDUINO >=100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#include <inttypes.h>
#include <avr/pgmspace.h>
#include "avrpins.h"
@ -26,12 +32,6 @@ e-mail : support@circuitsathome.com
#include "Usb.h"
#include "hid.h"
#if defined(ARDUINO) && ARDUINO >=100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#include "printhex.h"
#include "hexdump.h"
#include "message.h"

View file

@ -17,6 +17,12 @@ e-mail : support@circuitsathome.com
#if !defined(__HIDDESCRIPTORPARSER_H__)
#define __HIDDESCRIPTORPARSER_H__
#if defined(ARDUINO) && ARDUINO >=100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#include <inttypes.h>
#include <avr/pgmspace.h>
#include "avrpins.h"
@ -25,12 +31,6 @@ e-mail : support@circuitsathome.com
#include "usb_ch9.h"
#include "Usb.h"
#if defined(ARDUINO) && ARDUINO >=100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#include "printhex.h"
#include "hexdump.h"
#include "message.h"

View file

@ -1,6 +1,12 @@
#if !defined(__MASSTORAGE_H__)
#define __MASSTORAGE_H__
#if defined(ARDUINO) && ARDUINO >=100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#define DEBUG
#include <inttypes.h>
@ -11,12 +17,6 @@
#include "usb_ch9.h"
#include "Usb.h"
#if defined(ARDUINO) && ARDUINO >=100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#include <confdescparser.h>
#define SWAP(a, b) (((a) ^= (b)), ((b) ^= (a)), ((a) ^= (b)))

View file

@ -15,6 +15,12 @@ Web : http://www.circuitsathome.com
e-mail : support@circuitsathome.com
*/
#if defined(ARDUINO) && ARDUINO >=100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#define DEBUG
#include "message.h"
// 0x80 is the default (i.e. trace) to turn off set this global to something lower.

View file

@ -17,18 +17,18 @@ e-mail : support@circuitsathome.com
#if !defined(__PARSETOOLS_H__)
#define __PARSETOOLS_H__
#include <inttypes.h>
#include <avr/pgmspace.h>
#include "printhex.h"
#include "hexdump.h"
#include "message.h"
#if defined(ARDUINO) && ARDUINO >=100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#include <inttypes.h>
#include <avr/pgmspace.h>
#include "printhex.h"
#include "hexdump.h"
#include "message.h"
struct MultiValueBuffer {
uint8_t valueSize;
void *pValue;

View file

@ -17,6 +17,12 @@ e-mail : support@circuitsathome.com
#if !defined(__USBHUB_H__)
#define __USBHUB_H__
#if defined(ARDUINO) && ARDUINO >=100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#include <inttypes.h>
#include <avr/pgmspace.h>
#include "avrpins.h"
@ -26,12 +32,6 @@ e-mail : support@circuitsathome.com
#include "Usb.h"
#if defined(ARDUINO) && ARDUINO >=100
#include "Arduino.h"
#else
#include <WProgram.h>
#endif
#define USB_DESCRIPTOR_HUB 0x09 // Hub descriptor type
// Hub Requests