Serial communications interface abstraction.
More...
#include <serial.h>
Serial communications interface abstraction.
◆ flush
Flush the transmit buffer and wait for completion.
- Return values
-
| PIXELKEY_ERROR_NONE | Flush was successful. |
| PIXELKEY_ERROR_COMMUNICATION_ERROR | Communications error occurred. |
◆ read
| pixelkey_error_t(* serial_api_t::read) (uint8_t *p_buffer, size_t *p_read_length) |
Read data from the serial instance.
- Parameters
-
| [out] | p_buffer | Pointer to store read bytes at. |
| [in,out] | p_read_length | Desired read length, updated with actual length after completion. |
- Return values
-
| PIXELKEY_ERROR_NONE | Read was successful. |
| PIXELKEY_ERROR_COMMUNICATION_ERROR | Communications error occurred. |
| PIXELKEY_ERROR_INPUT_BUFFER_OVERFLOW | Received data overflowed. |
◆ rts_get
| bool(* serial_api_t::rts_get) (void) |
Get the state of the RTS signal.
- Returns
- RTS signal state.
◆ write
| pixelkey_error_t(* serial_api_t::write) (uint8_t *p_buffer, size_t write_length) |
Write data to the serial instance.
- Parameters
-
| [out] | p_buffer | Pointer to write data from. |
| write_length | Desired write length. |
- Return values
-
| PIXELKEY_ERROR_NONE | Write was successful. |
| PIXELKEY_ERROR_COMMUNICATION_ERROR | Communications error occurred. |
| PIXELKEY_ERROR_BUFFER_FULL | Transmit buffer is full. |
The documentation for this struct was generated from the following file:
- /github/workspace/src/src/pixelkey/serial.h