Improve spi write16/read16 documentation.
The write16/read16 only work as described after changing the amount of data_bits using spi_set_format.
This commit is contained in:
parent
7872969915
commit
de449d1314
@ -252,6 +252,8 @@ int spi_read_blocking(spi_inst_t *spi, uint8_t repeated_tx_data, uint8_t *dst, s
|
|||||||
* Write \p len halfwords from \p src to SPI. Simultaneously read \p len halfwords from SPI to \p dst.
|
* Write \p len halfwords from \p src to SPI. Simultaneously read \p len halfwords from SPI to \p dst.
|
||||||
* Blocks until all data is transferred. No timeout, as SPI hardware always transfers at a known data rate.
|
* Blocks until all data is transferred. No timeout, as SPI hardware always transfers at a known data rate.
|
||||||
*
|
*
|
||||||
|
* \note SPI should be initialised with 16 data_bits using \ref spi_set_format first, otherwise this function will only read/write 8 data_bits.
|
||||||
|
*
|
||||||
* \param spi SPI instance specifier, either \ref spi0 or \ref spi1
|
* \param spi SPI instance specifier, either \ref spi0 or \ref spi1
|
||||||
* \param src Buffer of data to write
|
* \param src Buffer of data to write
|
||||||
* \param dst Buffer for read data
|
* \param dst Buffer for read data
|
||||||
@ -266,6 +268,8 @@ int spi_write16_read16_blocking(spi_inst_t *spi, const uint16_t *src, uint16_t *
|
|||||||
* Write \p len halfwords from \p src to SPI. Discard any data received back.
|
* Write \p len halfwords from \p src to SPI. Discard any data received back.
|
||||||
* Blocks until all data is transferred. No timeout, as SPI hardware always transfers at a known data rate.
|
* Blocks until all data is transferred. No timeout, as SPI hardware always transfers at a known data rate.
|
||||||
*
|
*
|
||||||
|
* \note SPI should be initialised with 16 data_bits using \ref spi_set_format first, otherwise this function will only write 8 data_bits.
|
||||||
|
*
|
||||||
* \param spi SPI instance specifier, either \ref spi0 or \ref spi1
|
* \param spi SPI instance specifier, either \ref spi0 or \ref spi1
|
||||||
* \param src Buffer of data to write
|
* \param src Buffer of data to write
|
||||||
* \param len Length of buffers
|
* \param len Length of buffers
|
||||||
@ -282,6 +286,8 @@ int spi_write16_blocking(spi_inst_t *spi, const uint16_t *src, size_t len);
|
|||||||
* Generally this can be 0, but some devices require a specific value here,
|
* Generally this can be 0, but some devices require a specific value here,
|
||||||
* e.g. SD cards expect 0xff
|
* e.g. SD cards expect 0xff
|
||||||
*
|
*
|
||||||
|
* \note SPI should be initialised with 16 data_bits using \ref spi_set_format first, otherwise this function will only read 8 data_bits.
|
||||||
|
*
|
||||||
* \param spi SPI instance specifier, either \ref spi0 or \ref spi1
|
* \param spi SPI instance specifier, either \ref spi0 or \ref spi1
|
||||||
* \param repeated_tx_data Buffer of data to write
|
* \param repeated_tx_data Buffer of data to write
|
||||||
* \param dst Buffer for read data
|
* \param dst Buffer for read data
|
||||||
|
Loading…
Reference in New Issue
Block a user