Explorar el Código

Fix STM32 for non DMA

main
Bill Greiman hace 8 años
padre
commit
fdb739093c
Se han modificado 2 ficheros con 5 adiciones y 2 borrados
  1. +1
    -1
      SdFat/src/SdFat.h
  2. +4
    -1
      SdFat/src/SdSpiCard/SdSpiSTM32F1.cpp

+ 1
- 1
SdFat/src/SdFat.h Ver fichero

@@ -32,7 +32,7 @@
#endif // ARDUINO
//------------------------------------------------------------------------------
/** SdFat version YYYYMMDD */
#define SD_FAT_VERSION 20160422
#define SD_FAT_VERSION 20160427
//==============================================================================
/**
* \class SdBaseFile

+ 4
- 1
SdFat/src/SdSpiCard/SdSpiSTM32F1.cpp Ver fichero

@@ -94,7 +94,10 @@ uint8_t SdSpi::receive(uint8_t* buf, size_t n) {
#if USE_STM32F1_DMAC
rtn = SPI.dmaTransfer(0, const_cast<uint8*>(buf), n);
#else // USE_STM32F1_DMAC
SPI.read(buf, n);
// SPI.read(buf, n);
for (size_t i = 0; i < n; i++) {
buf[i] = SPI.transfer(0XFF);
}
#endif // USE_STM32F1_DMAC
return rtn;
}

Cargando…
Cancelar
Guardar