Skip to content

Commit

Permalink
Updating dataMode in beginTransaction()
Browse files Browse the repository at this point in the history
-accepting the member (_dataMode) of user argument SPISettings
-updating library variable dataMode before sending that to spi_format().
  • Loading branch information
lewispg228 committed Jul 11, 2024
1 parent 666c2a9 commit 901eb73
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Arduino_package/hardware/libraries/SPI/src/SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ SPIClass::SPIClass(void *pSpiObj, int mosi, int miso, int clk, int ss) {
void SPIClass::beginTransaction(uint8_t pin, SPISettings settings) {
(void)pin;
bitOrder = settings._bitOrder;
dataMode = settings._dataMode;
spi_format((spi_t *)pSpiMaster, dataBits, dataMode, 0);
spi_frequency((spi_t *)pSpiMaster, settings._clock);

Expand Down

0 comments on commit 901eb73

Please sign in to comment.