parent
c4d57462dc
commit
8f7f7f7c45
2 changed files with 2 additions and 2 deletions
|
@ -213,7 +213,7 @@
|
||||||
|
|
||||||
void SPIClass::begin() { spiBegin(); }
|
void SPIClass::begin() { spiBegin(); }
|
||||||
|
|
||||||
void SPIClass::beginTransaction(SPISettings cfg) {
|
void SPIClass::beginTransaction(const SPISettings &cfg) {
|
||||||
uint8_t spiRate;
|
uint8_t spiRate;
|
||||||
switch (cfg.spiRate()) {
|
switch (cfg.spiRate()) {
|
||||||
case 8000000: spiRate = 0; break;
|
case 8000000: spiRate = 0; break;
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
class SPISettings {
|
class SPISettings {
|
||||||
public:
|
public:
|
||||||
SPISettings(uint32_t speed, int, int) : spi_speed(speed) {};
|
SPISettings(uint32_t speed, int, int) : spi_speed(speed) {};
|
||||||
uint32_t spiRate() { return spi_speed; }
|
uint32_t spiRate() const { return spi_speed; }
|
||||||
private:
|
private:
|
||||||
uint32_t spi_speed;
|
uint32_t spi_speed;
|
||||||
};
|
};
|
||||||
|
|
Reference in a new issue