mirror of https://github.com/noisymime/Arduino.git
Merge branch 'master' of https://github.com/feilipu/Arduino
This commit is contained in:
commit
08ae7bd3eb
|
@ -33,7 +33,7 @@ uint8_t const SPI_HALF_SPEED = 1;
|
||||||
uint8_t const SPI_QUARTER_SPEED = 2;
|
uint8_t const SPI_QUARTER_SPEED = 2;
|
||||||
/**
|
/**
|
||||||
* USE_SPI_LIB: if set, use the SPI library bundled with Arduino IDE, otherwise
|
* USE_SPI_LIB: if set, use the SPI library bundled with Arduino IDE, otherwise
|
||||||
* run with a standalone driver for AVR.
|
* run with a standalone driver for AVR.
|
||||||
*/
|
*/
|
||||||
#define USE_SPI_LIB
|
#define USE_SPI_LIB
|
||||||
/**
|
/**
|
||||||
|
@ -54,6 +54,10 @@ uint8_t const SPI_QUARTER_SPEED = 2;
|
||||||
//
|
//
|
||||||
#ifndef SOFTWARE_SPI
|
#ifndef SOFTWARE_SPI
|
||||||
// hardware pin defs
|
// hardware pin defs
|
||||||
|
|
||||||
|
// include pins_arduino.h or variant.h depending on architecture, via Arduino.h
|
||||||
|
#include <Arduino.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SD Chip Select pin
|
* SD Chip Select pin
|
||||||
*
|
*
|
||||||
|
@ -62,14 +66,17 @@ uint8_t const SPI_QUARTER_SPEED = 2;
|
||||||
* master unless SS is set to output mode.
|
* master unless SS is set to output mode.
|
||||||
*/
|
*/
|
||||||
/** The default chip select pin for the SD card is SS. */
|
/** The default chip select pin for the SD card is SS. */
|
||||||
uint8_t const SD_CHIP_SELECT_PIN = SS_PIN;
|
uint8_t const SD_CHIP_SELECT_PIN = SS;
|
||||||
// The following three pins must not be redefined for hardware SPI.
|
|
||||||
|
// The following three pins must not be redefined for hardware SPI,
|
||||||
|
// so ensure that they are taken from pins_arduino.h or variant.h, depending on architecture.
|
||||||
/** SPI Master Out Slave In pin */
|
/** SPI Master Out Slave In pin */
|
||||||
uint8_t const SPI_MOSI_PIN = MOSI_PIN;
|
uint8_t const SPI_MOSI_PIN = MOSI;
|
||||||
/** SPI Master In Slave Out pin */
|
/** SPI Master In Slave Out pin */
|
||||||
uint8_t const SPI_MISO_PIN = MISO_PIN;
|
uint8_t const SPI_MISO_PIN = MISO;
|
||||||
/** SPI Clock pin */
|
/** SPI Clock pin */
|
||||||
uint8_t const SPI_SCK_PIN = SCK_PIN;
|
uint8_t const SPI_SCK_PIN = SCK;
|
||||||
|
|
||||||
/** optimize loops for hardware SPI */
|
/** optimize loops for hardware SPI */
|
||||||
#ifndef USE_SPI_LIB
|
#ifndef USE_SPI_LIB
|
||||||
#define OPTIMIZE_HARDWARE_SPI
|
#define OPTIMIZE_HARDWARE_SPI
|
||||||
|
|
Loading…
Reference in New Issue