renamed 16 bit version of transfer() to transfer16() as per the Arduino API
This commit is contained in:
parent
8f847cc786
commit
e1e2cac780
|
@ -360,7 +360,7 @@ void SPIClass::write(const uint8 *data, uint32 length) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t SPIClass::transfer(uint16_t wr_data) const {
|
uint16_t SPIClass::transfer16(uint16_t wr_data) const {
|
||||||
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)."
|
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)."
|
||||||
while (spi_is_rx_nonempty(_currentSetting->spi_d) == 0); // "4. Wait until RXNE=1 ..."
|
while (spi_is_rx_nonempty(_currentSetting->spi_d) == 0); // "4. Wait until RXNE=1 ..."
|
||||||
uint16_t rd_data = spi_rx_reg(_currentSetting->spi_d); // "... and read the last received data."
|
uint16_t rd_data = spi_rx_reg(_currentSetting->spi_d); // "... and read the last received data."
|
||||||
|
|
|
@ -260,7 +260,7 @@ public:
|
||||||
* @return Next unread byte.
|
* @return Next unread byte.
|
||||||
*/
|
*/
|
||||||
uint8 transfer(uint8 data) const;
|
uint8 transfer(uint8 data) const;
|
||||||
uint16_t transfer(uint16_t data) const;
|
uint16_t transfer16(uint16_t data) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sets up a DMA Transfer for "length" bytes.
|
* @brief Sets up a DMA Transfer for "length" bytes.
|
||||||
|
|
Loading…
Reference in New Issue