USB Host Shield 2.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
settings.h
Go to the documentation of this file.
1 /*
2  * File: settings.h
3  * Author: xxxajk
4  *
5  * Created on September 23, 2013, 12:00 AM
6  */
7 
8 #ifndef USB_HOST_SHIELD_SETTINGS_H
9 #define USB_HOST_SHIELD_SETTINGS_H
10 #include "macros.h"
11 
13 // DEBUGGING
15 
16 /* Set this to 1 to activate serial debugging */
17 #define ENABLE_UHS_DEBUGGING 0
18 
19 /* This can be used to select which serial port to use for debugging if
20  * multiple serial ports are available.
21  * For example Serial3.
22  */
23 #ifndef USB_HOST_SERIAL
24 #define USB_HOST_SERIAL Serial
25 #endif
26 
28 // Manual board activation
30 
31 /* Set this to 1 if you are using an Arduino Mega ADK board with MAX3421e built-in */
32 #define USE_UHS_MEGA_ADK 0 // If you are using Arduino 1.5.5 or newer there is no need to do this manually
33 
34 /* Set this to 1 if you are using a Black Widdow */
35 #define USE_UHS_BLACK_WIDDOW 0
36 
37 /* Set this to a one to use the xmem2 lock. This is needed for multitasking and threading */
38 #define USE_XMEM_SPI_LOCK 0
39 
41 // MASS STORAGE
43 // <<<<<<<<<<<<<<<< IMPORTANT >>>>>>>>>>>>>>>
44 // Set this to 1 to support single LUN devices, and save RAM. -- I.E. thumb drives.
45 // Each LUN needs ~13 bytes to be able to track the state of each unit.
46 #ifndef MASS_MAX_SUPPORTED_LUN
47 #define MASS_MAX_SUPPORTED_LUN 8
48 #endif
49 
50 
52 // Set to 1 to use the faster spi4teensy3 driver.
54 #ifndef USE_SPI4TEENSY3
55 #define USE_SPI4TEENSY3 1
56 #endif
57 
59 // AUTOMATIC Settings
61 
62 // No user serviceable parts below this line.
63 // DO NOT change anything below here unless you are a developer!
64 
65 #if !defined(DEBUG_USB_HOST) && ENABLE_UHS_DEBUGGING
66 #define DEBUG_USB_HOST
67 #endif
68 
69 // When will we drop support for the older bug-ridden stuff?
70 #if defined(ARDUINO) && ARDUINO >=100
71 #include <Arduino.h>
72 #else
73 #include <WProgram.h>
74 // I am not sure what WProgram.h does not include, so these are here. --xxxajk
75 #include <pins_arduino.h>
76 #include <avr/pgmspace.h>
77 #include <avr/io.h>
78 #endif
79 
80 #if USE_XMEM_SPI_LOCK | defined(USE_MULTIPLE_APP_API)
81 #include <xmem.h>
82 #else
83 #define XMEM_ACQUIRE_SPI() (void(0))
84 #define XMEM_RELEASE_SPI() (void(0))
85 #endif
86 
87 #ifdef __MK20DX128__
88 #define USING_SPI4TEENSY3 USE_SPI4TEENSY3
89 #else
90 #define USING_SPI4TEENSY3 0
91 #endif
92 
93 #endif /* SETTINGS_H */