Document number
204911
Version
Rev. K
Issue date
2016-10-11
Sirius Breadboard User Manual
www.aacmicrotec.com
Page
35
of
106
EPERM
Device not open
EINVAL
Invalid number of characters to
be read
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
EINVAL
Invalid number of characters to
be written.
5.5.2.5.
Function int ioctl(…)
Ioctl allows for toggling the RS422/RS485/Loopback mode and setting the baud rate.
RS422/RS485 mode selection is not applicable for safe bus and power ctrl UARTs.
Argument name
Type
Direction Description
fd
int
in
File descriptor received at
open
cmd
int
in
Command to send
val
int
in
Value to write or a pointer to a buffer
where data will be written.
Command table
Type
Direction Description
UART_IOCTL_SET_BITRATE
uint32_t
in
Set the bitrate of the line interface.
Possible values:
UART_B375000
UART_B153600
UART_B115200 (default)
UART_B76800
UART_B57600
UART_B38400
UART_B19200
UART_B9600
UART_B4800
UART_B2400
UART_B1200