spi: reword error code descriptions

This commit is contained in:
Vanya A. Sergeev
2019-09-30 22:18:42 -05:00
parent 67d0e04d4c
commit 6c8e0fda52
2 changed files with 10 additions and 10 deletions
+8 -8
View File
@@ -185,14 +185,14 @@ The periphery SPI functions return 0 on success or one of the negative error cod
The libc errno of the failure in an underlying libc library call can be obtained with the `spi_errno()` helper function. A human readable error message can be obtained with the `spi_errmsg()` helper function.
| Error Code | Description |
|-----------------------|-------------------------------|
| `SPI_ERROR_ARG` | Invalid arguments |
| `SPI_ERROR_OPEN` | Opening SPI device |
| `SPI_ERROR_QUERY` | Querying SPI device settings |
| `SPI_ERROR_CONFIGURE` | Configuring SPI device |
| `SPI_ERROR_TRANSFER` | SPI transfer |
| `SPI_ERROR_CLOSE` | Closing SPI device |
| Error Code | Description |
|-----------------------|-----------------------------------|
| `SPI_ERROR_ARG` | Invalid arguments |
| `SPI_ERROR_OPEN` | Opening SPI device |
| `SPI_ERROR_QUERY` | Querying SPI device attributes |
| `SPI_ERROR_CONFIGURE` | Configuring SPI device attributes |
| `SPI_ERROR_TRANSFER` | SPI transfer |
| `SPI_ERROR_CLOSE` | Closing SPI device |
### EXAMPLE
+2 -2
View File
@@ -17,8 +17,8 @@ extern "C" {
enum spi_error_code {
SPI_ERROR_ARG = -1, /* Invalid arguments */
SPI_ERROR_OPEN = -2, /* Opening SPI device */
SPI_ERROR_QUERY = -3, /* Querying SPI device settings */
SPI_ERROR_CONFIGURE = -4, /* Configuring SPI device */
SPI_ERROR_QUERY = -3, /* Querying SPI device attributes */
SPI_ERROR_CONFIGURE = -4, /* Configuring SPI device attributes */
SPI_ERROR_TRANSFER = -5, /* SPI transfer */
SPI_ERROR_CLOSE = -6, /* Closing SPI device */
};