2013-09-23 10:50:38 +02:00
|
|
|
/*
|
|
|
|
* File: settings.h
|
2013-09-30 19:18:33 +02:00
|
|
|
* Author: xxxajk
|
2013-09-23 10:50:38 +02:00
|
|
|
*
|
|
|
|
* Created on September 23, 2013, 12:00 AM
|
|
|
|
*/
|
|
|
|
|
2013-09-29 22:07:44 +02:00
|
|
|
#ifndef USB_HOST_SHIELD_SETTINGS_H
|
|
|
|
#define USB_HOST_SHIELD_SETTINGS_H
|
2013-09-23 10:50:38 +02:00
|
|
|
#include "macros.h"
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
2013-09-30 02:44:22 +02:00
|
|
|
// DEBUGGING
|
2013-09-23 10:50:38 +02:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2013-09-30 02:44:22 +02:00
|
|
|
/* Set this to 1 to activate serial debugging */
|
|
|
|
#define ENABLE_UHS_DEBUGGING 0
|
|
|
|
|
2013-09-30 07:13:11 +02:00
|
|
|
/* This can be used to select which serial port to use for debugging if
|
|
|
|
* multiple serial ports are available.
|
|
|
|
* For example Serial3.
|
|
|
|
*/
|
2013-09-23 10:50:38 +02:00
|
|
|
#ifndef USB_HOST_SERIAL
|
|
|
|
#define USB_HOST_SERIAL Serial
|
|
|
|
#endif
|
|
|
|
|
2013-09-30 02:44:22 +02:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
2013-09-30 07:13:11 +02:00
|
|
|
// Manual board activation
|
2013-09-30 02:44:22 +02:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/* Set this to 1 if you are using an Arduino Mega ADK board with MAX3421e built-in */
|
2013-10-09 17:13:37 +02:00
|
|
|
#define USE_UHS_MEGA_ADK 0 // If you are using Arduino 1.5.5 or newer there is no need to do this manually
|
2013-09-30 02:44:22 +02:00
|
|
|
|
|
|
|
/* Set this to 1 if you are using a Black Widdow */
|
|
|
|
#define USE_UHS_BLACK_WIDDOW 0
|
2013-09-23 10:50:38 +02:00
|
|
|
|
2013-10-12 16:36:03 +02:00
|
|
|
/* Set this to a one to use the xmem2 lock. This is needed for multitasking and threading */
|
2013-10-08 17:36:15 +02:00
|
|
|
#define USE_XMEM_SPI_LOCK 0
|
|
|
|
|
2013-09-23 10:50:38 +02:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// MASS STORAGE
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// <<<<<<<<<<<<<<<< IMPORTANT >>>>>>>>>>>>>>>
|
|
|
|
// Set this to 1 to support single LUN devices, and save RAM. -- I.E. thumb drives.
|
|
|
|
// Each LUN needs ~13 bytes to be able to track the state of each unit.
|
|
|
|
#ifndef MASS_MAX_SUPPORTED_LUN
|
|
|
|
#define MASS_MAX_SUPPORTED_LUN 8
|
|
|
|
#endif
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// AUTOMATIC Settings
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
2013-09-29 22:07:44 +02:00
|
|
|
|
2013-09-30 07:13:11 +02:00
|
|
|
// No user serviceable parts below this line.
|
|
|
|
// DO NOT change anything below here unless you are a developer!
|
|
|
|
|
2013-09-30 02:44:22 +02:00
|
|
|
#if !defined(DEBUG_USB_HOST) && ENABLE_UHS_DEBUGGING
|
|
|
|
#define DEBUG_USB_HOST
|
|
|
|
#endif
|
|
|
|
|
2013-09-29 22:07:44 +02:00
|
|
|
// When will we drop support for the older bug-ridden stuff?
|
2013-09-23 10:50:38 +02:00
|
|
|
#if defined(ARDUINO) && ARDUINO >=100
|
2013-09-30 19:18:33 +02:00
|
|
|
#include <Arduino.h>
|
2013-09-23 10:50:38 +02:00
|
|
|
#else
|
|
|
|
#include <WProgram.h>
|
2013-09-30 07:13:11 +02:00
|
|
|
// I am not sure what WProgram.h does not include, so these are here. --xxxajk
|
2013-10-06 15:46:15 +02:00
|
|
|
#include <pins_arduino.h>
|
2013-09-24 00:40:10 +02:00
|
|
|
#include <avr/pgmspace.h>
|
2013-09-30 07:13:11 +02:00
|
|
|
#include <avr/io.h>
|
|
|
|
#endif
|
2013-09-23 10:50:38 +02:00
|
|
|
|
2013-10-16 03:16:34 +02:00
|
|
|
#if USE_XMEM_SPI_LOCK | defined(USE_MULTIPLE_APP_API)
|
2013-10-08 17:36:15 +02:00
|
|
|
#include <xmem.h>
|
|
|
|
#else
|
|
|
|
#define XMEM_ACQUIRE_SPI() (void(0))
|
|
|
|
#define XMEM_RELEASE_SPI() (void(0))
|
|
|
|
#endif
|
|
|
|
|
2013-09-30 07:13:11 +02:00
|
|
|
#endif /* SETTINGS_H */
|