Added support for Intel Edison

Closes #132
This commit is contained in:
Kristian Sloth Lauszus 2015-03-19 20:47:48 +01:00
parent 08ddabf7a5
commit 42a26346fa
4 changed files with 13 additions and 7 deletions

View file

@ -92,7 +92,7 @@ By default serial debugging is disabled. To turn it on simply change ```ENABLE_U
Currently the following boards are supported by the library: Currently the following boards are supported by the library:
* All official Arduino AVR boards (Uno, Duemilanove, Mega, Mega 2560, Mega ADK, Leonardo etc.) * All official Arduino AVR boards (Uno, Duemilanove, Mega, Mega 2560, Mega ADK, Leonardo etc.)
* Arduino Due, Intel Galileo and Intel Galileo 2 * Arduino Due, Intel Galileo, Intel Galileo 2, and Intel Edison
* If you are using the Arduino Due, Intel Galileo or Intel Galileo 2, then you must include the Arduino SPI library like so: ```#include <SPI.h>``` in your .ino file. * If you are using the Arduino Due, Intel Galileo or Intel Galileo 2, then you must include the Arduino SPI library like so: ```#include <SPI.h>``` in your .ino file.
* Note that both the Intel Galileo and Intel Galileo 2 use pin 2 and 3 as INT and SS pin respectively by default, so some modifications to the shield are needed. See the "Interface modifications" section in the [hardware manual](https://www.circuitsathome.com/usb-host-shield-hardware-manual) for more information. * Note that both the Intel Galileo and Intel Galileo 2 use pin 2 and 3 as INT and SS pin respectively by default, so some modifications to the shield are needed. See the "Interface modifications" section in the [hardware manual](https://www.circuitsathome.com/usb-host-shield-hardware-manual) for more information.
* Teensy (Teensy++ 1.0, Teensy 2.0, Teensy++ 2.0, and Teensy 3.x) * Teensy (Teensy++ 1.0, Teensy 2.0, Teensy++ 2.0, and Teensy 3.x)

View file

@ -40,7 +40,7 @@ typedef MAX3421e<P20, P19> MAX3421E; // Balanduino
#elif defined(__ARDUINO_X86__) #elif defined(__ARDUINO_X86__)
typedef MAX3421e<P3, P2> MAX3421E; // The Intel Galileo and Intel Galileo 2 both support much faster read and write speed at pin 2 and 3 typedef MAX3421e<P3, P2> MAX3421E; // The Intel Galileo and Intel Galileo 2 both support much faster read and write speed at pin 2 and 3
#else #else
typedef MAX3421e<P10, P9> MAX3421E; // Official Arduinos (UNO, Duemilanove, Mega, 2560, Leonardo, Due etc.) or Teensy 2.0 and 3.0 typedef MAX3421e<P10, P9> MAX3421E; // Official Arduinos (UNO, Duemilanove, Mega, 2560, Leonardo, Due etc.), Intel Edison or Teensy 2.0 and 3.0
#endif #endif
/* Common setup data constant combinations */ /* Common setup data constant combinations */

View file

@ -1015,16 +1015,22 @@ MAKE_PIN(P24, Pin_nRF51822_to_Arduino(D24));
#endif #endif
#elif defined(__ARDUINO_X86__) // Intel Galileo and Intel Galileo 2 #elif defined(__ARDUINO_X86__) // Intel Galileo, Intel Galileo 2 and Intel Edison
#include <avr/pgmspace.h> #include <avr/pgmspace.h>
// Pointers are 32 bits on x86 // Pointers are 32 bits on x86
#define pgm_read_pointer(p) pgm_read_dword(p) #define pgm_read_pointer(p) pgm_read_dword(p)
// Pin 2 and 3 support a higher rate, so it is recommended to use one of these as the SS pin. #if PLATFORM_ID == 0xE1 // Edison platform id
// I know Intel Galileo 2 support higher rate at some other pins as well, but 2 and 3 are only #define pinToFastPin(pin) 1 // As far as I can tell all pins can be used as fast pins
// available on the original Intel Galileo. #endif
// Pin 2 and 3 on the Intel Galileo 1 & 2 support a higher rate,
// so it is recommended to use one of these as the SS pin.
// I know Intel Galileo 2 support higher rate at some other pins as well,
// but 2 and 3 are only available on the original Intel Galileo.
#define MAKE_PIN(className, pin) \ #define MAKE_PIN(className, pin) \
class className { \ class className { \
public: \ public: \

View file

@ -130,7 +130,7 @@ e-mail : support@circuitsathome.com
#endif #endif
#if ((defined(ARDUINO_SAM_DUE) && defined(__SAM3X8E__)) || defined(RBL_NRF51822) || defined(__ARDUINO_X86__) || ARDUINO >= 10600) && !USING_SPI4TEENSY3 #if ((defined(ARDUINO_SAM_DUE) && defined(__SAM3X8E__)) || defined(RBL_NRF51822) || defined(__ARDUINO_X86__) || ARDUINO >= 10600) && !USING_SPI4TEENSY3
#include <SPI.h> // Use the Arduino SPI library for the Arduino Due, RedBearLab nRF51822 or if the SPI library with transaction is available #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
#endif #endif
#if defined(__PIC32MX__) || defined(__PIC32MZ__) #if defined(__PIC32MX__) || defined(__PIC32MZ__)
#include <../../../../hardware/pic32/libraries/SPI/SPI.h> // Hack to use the SPI library #include <../../../../hardware/pic32/libraries/SPI/SPI.h> // Hack to use the SPI library