|
@@ -243,7 +243,7 @@ void SPIClass::setDataMode(uint8_t dataMode) {
|
243
|
243
|
_currentSetting->spi_d->regs->CR1 = cr1 | (dataMode & (SPI_CR1_CPOL|SPI_CR1_CPHA));
|
244
|
244
|
}
|
245
|
245
|
|
246
|
|
-void SPIClass::beginTransaction(uint8_t pin, SPISettings settings) {
|
|
246
|
+void SPIClass::beginTransaction(uint8_t pin, const SPISettings &settings) {
|
247
|
247
|
setBitOrder(settings.bitOrder);
|
248
|
248
|
setDataMode(settings.dataMode);
|
249
|
249
|
setDataSize(settings.dataSize);
|
|
@@ -251,7 +251,7 @@ void SPIClass::beginTransaction(uint8_t pin, SPISettings settings) {
|
251
|
251
|
begin();
|
252
|
252
|
}
|
253
|
253
|
|
254
|
|
-void SPIClass::beginTransactionSlave(SPISettings settings) {
|
|
254
|
+void SPIClass::beginTransactionSlave(const SPISettings &settings) {
|
255
|
255
|
setBitOrder(settings.bitOrder);
|
256
|
256
|
setDataMode(settings.dataMode);
|
257
|
257
|
setDataSize(settings.dataSize);
|