Document number
205065
Version
Rev. N
Issue date
2019-02-04
Sirius OBC and TCM User Manual
Page
48
of
174
5.5.2.3. Function ssize_t read
(…)
Read data from the UART. The call blocks until data is received from the UART RX FIFO.
Please note that it is not uncommon for the read call to return less data than requested.
Argument name
Type
Direction Description
fd
int
in
File descriptor received at
open
buf
void *
in
Pointer to character buffer to write data to
count
size_t
in
Number of characters to read
Return value
Description
> 0
Number of characters that were
read.
0
A parity / framing / overflow
error occurred. The RX data
path has been flushed. Data
was lost.
- 1
see
errno
values
errno values
EIO
Failed to get internal resource
5.5.2.4. Function ssize_t write
(…)
Write data to the UART. The write call is blocking until all data have been transmitted.
Argument name
Type
Direction Description
fd
int
in
File descriptor received at
open
buf
const void *
in
Pointer to character buffer to read data from
count
size_t
in
Number of characters to write
Return value
Description
>= 0
Number of characters that were
written.
- 1
see
errno
values
errno values
EIO
Failed to get internal resource