Document number
204911
Version
Rev. K
Issue date
2016-10-11
Sirius Breadboard User Manual
www.aacmicrotec.com
Page
37
of
106
5.5.3.1. RTEMS application example
In order to use the uart driver in the RTEMS environment, the following code structure is
suggested to be used:
Inclusion of
<fcntl.h>
and <unistd.h>
are required for using the POSIX functions:
open, close, ioctl
.
Inclusion of
<errno.h>
is required for retrieving error values on failures.
Inclusion of <
bsp/uart_rtems.h>
is required for accessing the uarts.
5.5.3.2. Parity, framing and overrun error notification
Upon receiving a parity, framing or an overrun error the read call returns 0 and the internal
RX queue is flushed.
5.5.4. Limitations
8 data bits only.
1 stop bit only.
No hardware flow control support.
5.6. UART32
5.6.1. Description
This driver software for the UART32 IP 104 513 [RD1], handles the setup and transfer of
serial data to memory. This is a high-speed receive-only UART.
5.6.2. RTEMS API
This API represents the driver interface of the module from an RTEMS user application's
perspective.
#include <bsp.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <bsp/uart_rtems.h>
#define CONFIGURE_APPLICATION_NEEDS_UART_DRIVER
#define CONFIGURE_SEMAPHORES 40
#include <bsp/bsp_confdefs.h>
#include <rtems/confdefs.h>
#define CONFIGURE_INIT
rtems_task Init (rtems_task_argument argument);
rtems_task Init (rtems_task_argument ignored){}