diff options
Diffstat (limited to 'docs/drivers/spi.md')
-rw-r--r-- | docs/drivers/spi.md | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/docs/drivers/spi.md b/docs/drivers/spi.md index 43d2a056d5..56b294ad3a 100644 --- a/docs/drivers/spi.md +++ b/docs/drivers/spi.md @@ -39,8 +39,6 @@ To enable SPI, modify your board's `halconf.h` to enable SPI, then modify your b #pragma once #define HAL_USE_SPI TRUE // [!code focus] -#define SPI_USE_WAIT TRUE // [!code focus] -#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD // [!code focus] #include_next <halconf.h> ``` @@ -88,7 +86,7 @@ Start an SPI transaction. #### Arguments {#api-spi-start-arguments} - `pin_t slavePin` - The QMK pin to assert as the slave select pin, eg. `B4`. + The GPIO pin connected to the desired device's `SS` line. - `bool lsbFirst` Determines the endianness of the transmission. If `true`, the least significant bit of each byte is sent first. - `uint8_t mode` @@ -106,7 +104,7 @@ Start an SPI transaction. #### Return Value {#api-spi-start-return} -`false` if the supplied parameters are invalid or the SPI peripheral is already in use, or `true`. +`true` if the operation was successful, otherwise `false` if the supplied parameters are invalid or the SPI peripheral is already in use. --- @@ -131,7 +129,7 @@ Read a byte from the selected SPI device. #### Return Value {#api-spi-read-return} -`SPI_STATUS_TIMEOUT` if the timeout period elapses, or the byte read from the device. +`SPI_STATUS_TIMEOUT` if the timeout period elapses, otherwise the byte read from the device. --- @@ -159,7 +157,7 @@ Receive multiple bytes from the selected SPI device. #### Arguments {#api-spi-receive-arguments} - `uint8_t *data` - A pointer to the buffer to read into. + A pointer to a buffer to read into. - `uint16_t length` The number of bytes to read. Take care not to overrun the length of `data`. |