Changed the SPI speed setting which was of type SPISettings to the type uint32_t. This is due to changes in the ESP8266 core sdk version. The app is now working with version 3.0.2 of this sdk.

This commit is contained in:
anschrammh 2021-12-19 13:09:12 +01:00
parent 7f3c4ecf9a
commit 5c42dfce39
4 changed files with 8 additions and 8 deletions

View File

@ -11,7 +11,7 @@ const Pin I2C_scl,
const Pin SPI_mosi,
const Pin SPI_miso,
const Pin SPI_clk,
const SPISettings spiSpeed
const uint32_t spiSpeed
):
_I2C_sda(I2C_sda == DEFAULT_PIN ? GPIO_4_SDA : I2C_sda),
_I2C_scl(I2C_scl == DEFAULT_PIN ? GPIO_5_SCL : I2C_scl),
@ -75,7 +75,7 @@ uint16_t BoardConfig::getRTCFlashAddress() const
}
SPISettings BoardConfig::getSPISpeed() const
uint32_t BoardConfig::getSPISpeed() const
{
return _SPISpeed;
}

View File

@ -22,7 +22,7 @@ class BoardConfig
const Pin SPI_mosi = GPIO_13_MOSI,
const Pin SPI_miso = GPIO_12_MISO,
const Pin SPI_clk = GPIO_14_CLK,
const SPISettings spiSpeed = SPI_FULL_SPEED
const uint32_t spiSpeed = SPI_FULL_SPEED
);
Pin getI2C_sda() const;
@ -37,7 +37,7 @@ class BoardConfig
uint16_t getI2C_IOExpanderAddress() const;
uint16_t getRTCFlashAddress() const;
SPISettings getSPISpeed() const;
uint32_t getSPISpeed() const;
uint16_t getScreenWidth() const;
uint16_t getScreenHeight() const;
@ -58,7 +58,7 @@ class BoardConfig
const uint16_t _I2C_RTCFlashAddress;
//3) SPI Speed
const SPISettings _SPISpeed;
const uint32_t _SPISpeed;
//4) Miscellaneous
const uint16_t _screenWidth;

View File

@ -1,6 +1,6 @@
#include "SDCardManager.h"
SDCardManager::SDCardManager(const Pin csPin, SPISettings cfg) : _csPin(csPin), _spiCfg(cfg), _mounted(false)
SDCardManager::SDCardManager(const Pin csPin, uint32_t cfg) : _csPin(csPin), _spiCfg(cfg), _mounted(false)
{
}

View File

@ -10,7 +10,7 @@ class SDCardManager : public SDClass
{
friend class SAB;
public:
SDCardManager(const Pin csPin, SPISettings cfg);
SDCardManager(const Pin csPin, uint32_t cfg);
double getSize(const SizeUnit sizeUnit = GBYTE);
boolean mountSD();
void unMountSD();
@ -27,7 +27,7 @@ class SDCardManager : public SDClass
private:
const Pin _csPin;
SPISettings _spiCfg;
uint32_t _spiCfg;
boolean _mounted;
};