aboutsummaryrefslogtreecommitdiff
path: root/lib/usbhost/USB_Host_Shield_2.0/settings.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/usbhost/USB_Host_Shield_2.0/settings.h')
-rw-r--r--lib/usbhost/USB_Host_Shield_2.0/settings.h139
1 files changed, 139 insertions, 0 deletions
diff --git a/lib/usbhost/USB_Host_Shield_2.0/settings.h b/lib/usbhost/USB_Host_Shield_2.0/settings.h
new file mode 100644
index 000000000..5c060354b
--- /dev/null
+++ b/lib/usbhost/USB_Host_Shield_2.0/settings.h
@@ -0,0 +1,139 @@
1/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.
2
3This software may be distributed and modified under the terms of the GNU
4General Public License version 2 (GPL2) as published by the Free Software
5Foundation and appearing in the file GPL2.TXT included in the packaging of
6this file. Please note that GPL2 Section 2[b] requires that all works based
7on this software must also be made publicly available under the terms of
8the GPL2 ("Copyleft").
9
10Contact information
11-------------------
12
13Circuits At Home, LTD
14Web : http://www.circuitsathome.com
15e-mail : support@circuitsathome.com
16 */
17
18#ifndef USB_HOST_SHIELD_SETTINGS_H
19#define USB_HOST_SHIELD_SETTINGS_H
20#include "macros.h"
21
22////////////////////////////////////////////////////////////////////////////////
23// DEBUGGING
24////////////////////////////////////////////////////////////////////////////////
25
26/* Set this to 1 to activate serial debugging */
27#define ENABLE_UHS_DEBUGGING 0
28
29/* This can be used to select which serial port to use for debugging if
30 * multiple serial ports are available.
31 * For example Serial3.
32 */
33#ifndef USB_HOST_SERIAL
34#define USB_HOST_SERIAL Serial
35#endif
36
37////////////////////////////////////////////////////////////////////////////////
38// Manual board activation
39////////////////////////////////////////////////////////////////////////////////
40
41/* Set this to 1 if you are using an Arduino Mega ADK board with MAX3421e built-in */
42#define USE_UHS_MEGA_ADK 0 // If you are using Arduino 1.5.5 or newer there is no need to do this manually
43
44/* Set this to 1 if you are using a Black Widdow */
45#define USE_UHS_BLACK_WIDDOW 0
46
47/* Set this to a one to use the xmem2 lock. This is needed for multitasking and threading */
48#define USE_XMEM_SPI_LOCK 0
49
50////////////////////////////////////////////////////////////////////////////////
51// Wii IR camera
52////////////////////////////////////////////////////////////////////////////////
53
54/* Set this to 1 to activate code for the Wii IR camera */
55#define ENABLE_WII_IR_CAMERA 0
56
57////////////////////////////////////////////////////////////////////////////////
58// MASS STORAGE
59////////////////////////////////////////////////////////////////////////////////
60// <<<<<<<<<<<<<<<< IMPORTANT >>>>>>>>>>>>>>>
61// Set this to 1 to support single LUN devices, and save RAM. -- I.E. thumb drives.
62// Each LUN needs ~13 bytes to be able to track the state of each unit.
63#ifndef MASS_MAX_SUPPORTED_LUN
64#define MASS_MAX_SUPPORTED_LUN 8
65#endif
66
67////////////////////////////////////////////////////////////////////////////////
68// Set to 1 to use the faster spi4teensy3 driver.
69////////////////////////////////////////////////////////////////////////////////
70#ifndef USE_SPI4TEENSY3
71#define USE_SPI4TEENSY3 1
72#endif
73
74////////////////////////////////////////////////////////////////////////////////
75// AUTOMATIC Settings
76////////////////////////////////////////////////////////////////////////////////
77
78// No user serviceable parts below this line.
79// DO NOT change anything below here unless you are a developer!
80
81#include "version_helper.h"
82
83#if defined(__GNUC__) && defined(__AVR__)
84#ifndef GCC_VERSION
85#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
86#endif
87#if GCC_VERSION < 40602 // Test for GCC < 4.6.2
88#ifdef PROGMEM
89#undef PROGMEM
90#define PROGMEM __attribute__((section(".progmem.data"))) // Workaround for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34734#c4
91#ifdef PSTR
92#undef PSTR
93#define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];})) // Copied from pgmspace.h in avr-libc source
94#endif
95#endif
96#endif
97#endif
98
99#if !defined(DEBUG_USB_HOST) && ENABLE_UHS_DEBUGGING
100#define DEBUG_USB_HOST
101#endif
102
103#if !defined(WIICAMERA) && ENABLE_WII_IR_CAMERA
104#define WIICAMERA
105#endif
106
107// To use some other locking (e.g. freertos),
108// define XMEM_ACQUIRE_SPI and XMEM_RELEASE_SPI to point to your lock and unlock.
109// NOTE: NO argument is passed. You have to do this within your routine for
110// whatever you are using to lock and unlock.
111#if !defined(XMEM_ACQUIRE_SPI)
112#if USE_XMEM_SPI_LOCK || defined(USE_MULTIPLE_APP_API)
113#include <xmem.h>
114#else
115#define XMEM_ACQUIRE_SPI() (void(0))
116#define XMEM_RELEASE_SPI() (void(0))
117#endif
118#endif
119
120#if !defined(EXT_RAM) && defined(EXT_RAM_STACK) || defined(EXT_RAM_HEAP)
121#include <xmem.h>
122#else
123#define EXT_RAM 0
124#endif
125
126#if defined(CORE_TEENSY) && (defined(__MK20DX128__) || defined(__MK20DX256__))
127#define USING_SPI4TEENSY3 USE_SPI4TEENSY3
128#else
129#define USING_SPI4TEENSY3 0
130#endif
131
132#if ((defined(ARDUINO_SAM_DUE) && defined(__SAM3X8E__)) || defined(RBL_NRF51822) || defined(__ARDUINO_X86__) || ARDUINO >= 10600) && !USING_SPI4TEENSY3
133#include <SPI.h> // Use the Arduino SPI library for the Arduino Due, RedBearLab nRF51822, Intel Galileo 1 & 2, Intel Edison or if the SPI library with transaction is available
134#endif
135#if defined(__PIC32MX__) || defined(__PIC32MZ__)
136#include <../../../../hardware/pic32/libraries/SPI/SPI.h> // Hack to use the SPI library
137#endif
138
139#endif /* SETTINGS_H */