mirror of
https://github.com/vsergeev/c-periphery.git
synced 2026-10-06 04:59:26 +08:00
spi: reword error code descriptions
This commit is contained in:
+8
-8
@@ -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
|
||||
|
||||
|
||||
@@ -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 */
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user