Jason Smith
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
2 deletions
-
Marlin/src/HAL/LPC1768/HAL_SPI.cpp
-
Marlin/src/HAL/LPC1768/include/SPI.h
|
|
@ -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; |
|
|
|
}; |
|
|
|