瀏覽代碼

Fix STM32 SPI3

main
Bill Greiman 8 年之前
父節點
當前提交
8c750703ff
共有 2 個文件被更改,包括 8 次插入4 次删除
  1. +7
    -3
      SdFat/src/SpiDriver/DigitalPin.h
  2. +1
    -1
      SdFat/src/SpiDriver/SdSpiSTM32F1.cpp

+ 7
- 3
SdFat/src/SpiDriver/DigitalPin.h 查看文件

@@ -27,7 +27,7 @@
*/
#ifndef DigitalPin_h
#define DigitalPin_h
#if defined(__AVR__)
#if defined(__AVR__) || defined(DOXYGEN)
#include <avr/io.h>
/** GpioPinMap type */
struct GpioPinMap_t {
@@ -266,14 +266,18 @@ inline void fastDigitalWrite(uint8_t pin, bool value) {
digitalWrite(pin, value);
}
//------------------------------------------------------------------------------
inline bool fastDigitalRead(uint8_t pin) {return digitalRead(pin);}
inline bool fastDigitalRead(uint8_t pin) {
return digitalRead(pin);
}
#endif // CORE_TEENSY
//------------------------------------------------------------------------------
inline void fastDigitalToggle(uint8_t pin) {
fastDigitalWrite(pin, !fastDigitalRead(pin));
}
//------------------------------------------------------------------------------
#define fastPinMode(pin, mode) pinMode(pin, mode)
inline void fastPinMode(pin, mode) {
pinMode(pin, mode);
}
#endif // __AVR__
//------------------------------------------------------------------------------
/** set pin configuration

+ 1
- 1
SdFat/src/SpiDriver/SdSpiSTM32F1.cpp 查看文件

@@ -26,7 +26,7 @@ static SPIClass m_SPI1(1);
static SPIClass m_SPI2(2);
#endif // BOARD_NR_SPI > 1
#if BOARD_NR_SPI > 2
static SPIClass m_SPI2(3);
static SPIClass m_SPI3(3);
#endif // BOARD_NR_SPI > 2
//
static SPIClass* pSpi[] =

Loading…
取消
儲存