Skip to content

Commit e1e2cac

Browse files
renamed 16 bit version of transfer() to transfer16() as per the Arduino API
1 parent 8f847cc commit e1e2cac

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

STM32F1/libraries/SPI/src/SPI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ void SPIClass::write(const uint8 *data, uint32 length) {
360360
}
361361
}
362362

363-
uint16_t SPIClass::transfer(uint16_t wr_data) const {
363+
uint16_t SPIClass::transfer16(uint16_t wr_data) const {
364364
spi_tx_reg(_currentSetting->spi_d, wr_data); // "2. Write the first data item to be transmitted into the SPI_DR register (this clears the TXE flag)."
365365
while (spi_is_rx_nonempty(_currentSetting->spi_d) == 0); // "4. Wait until RXNE=1 ..."
366366
uint16_t rd_data = spi_rx_reg(_currentSetting->spi_d); // "... and read the last received data."

STM32F1/libraries/SPI/src/SPI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ class SPIClass {
260260
* @return Next unread byte.
261261
*/
262262
uint8 transfer(uint8 data) const;
263-
uint16_t transfer(uint16_t data) const;
263+
uint16_t transfer16(uint16_t data) const;
264264

265265
/**
266266
* @brief Sets up a DMA Transfer for "length" bytes.

0 commit comments

Comments
 (0)