mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 12:04:19 +00:00
parent
c4d57462dc
commit
8f7f7f7c45
@ -213,7 +213,7 @@
|
||||
|
||||
void SPIClass::begin() { spiBegin(); }
|
||||
|
||||
void SPIClass::beginTransaction(SPISettings cfg) {
|
||||
void SPIClass::beginTransaction(const SPISettings &cfg) {
|
||||
uint8_t spiRate;
|
||||
switch (cfg.spiRate()) {
|
||||
case 8000000: spiRate = 0; break;
|
||||
|
@ -31,7 +31,7 @@
|
||||
class SPISettings {
|
||||
public:
|
||||
SPISettings(uint32_t speed, int, int) : spi_speed(speed) {};
|
||||
uint32_t spiRate() { return spi_speed; }
|
||||
uint32_t spiRate() const { return spi_speed; }
|
||||
private:
|
||||
uint32_t spi_speed;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user