Skip to content

Commit

Permalink
serial: fix missing value in error codes enumeration
Browse files Browse the repository at this point in the history
  • Loading branch information
vsergeev committed Oct 1, 2019
1 parent 65638e0 commit fcb8825
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions docs/serial.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,14 @@ The periphery Serial functions return 0 on success or one of the negative error

The libc errno of the failure in an underlying libc library call can be obtained with the `serial_errno()` helper function. A human readable error message can be obtained with the `serial_errmsg()` helper function.

| Error Code | Description |
|---------------------------|-----------------------------------|
| `SERIAL_ERROR_ARG` | Invalid arguments |
| `SERIAL_ERROR_OPEN` | Opening serial port |
| `SERIAL_ERROR_QUERY` | Getting serial port attributes |
| `SERIAL_ERROR_IO` | Reading/writing serial port |
| `SERIAL_ERROR_CONFIGURE` | Setting serial port attributes |
| `SERIAL_ERROR_CLOSE` | Closing serial port |
| Error Code | Description |
|---------------------------|---------------------------------------|
| `SERIAL_ERROR_ARG` | Invalid arguments |
| `SERIAL_ERROR_OPEN` | Opening serial port |
| `SERIAL_ERROR_QUERY` | Querying serial port attributes |
| `SERIAL_ERROR_CONFIGURE` | Configuring serial port attributes |
| `SERIAL_ERROR_IO` | Reading/writing serial port |
| `SERIAL_ERROR_CLOSE` | Closing serial port |

### EXAMPLE

Expand Down
6 changes: 3 additions & 3 deletions src/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ extern "C" {
enum serial_error_code {
SERIAL_ERROR_ARG = -1, /* Invalid arguments */
SERIAL_ERROR_OPEN = -2, /* Opening serial port */
SERIAL_ERROR_QUERY = -3, /* Getting serial port attributes */
SERIAL_ERROR_QUERY = -3, /* Querying serial port attributes */
SERIAL_ERROR_CONFIGURE = -4, /* Configuring serial port attributes */
SERIAL_ERROR_IO = -5, /* Reading/writing serial port */
SERIAL_ERROR_CONFIGURE = -6, /* Setting serial port attributes */
SERIAL_ERROR_CLOSE = -7, /* Closing serial port */
SERIAL_ERROR_CLOSE = -6, /* Closing serial port */
};

typedef enum serial_parity {
Expand Down

0 comments on commit fcb8825

Please sign in to comment.