RTEMS: bsps/bfin/include/libcpu/uart.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
uart.h
1/*
2 * RTEMS driver for Blackfin UARTs
3 *
4 * COPYRIGHT (c) 2008 Kallisti Labs, Los Gatos, CA, USA
5 * written by Allan Hessenflow <allanh@kallisti.com>
6 *
7 * The license and distribution terms for this file may be
8 * found in the file LICENSE in this distribution or at
9 * http://www.rtems.org/license/LICENSE.
10 */
11
12
13#ifndef _UART_H_
14#define _UART_H_
15
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
23 typedef struct {
24 const char *name;
25 uint32_t uart_baseAddress;
26 uint32_t uart_rxDmaBaseAddress;
27 uint32_t uart_txDmaBaseAddress;
28 bool uart_useInterrupts;
29 bool uart_useDma;
30 int uart_baud;
32 void *termios;
33 uint8_t volatile flags;
34 uint16_t length;
35} bfin_uart_channel_t;
36
37
38 typedef struct {
39 uint32_t freq;
40 int num_channels;
41 bfin_uart_channel_t *channels;
42} bfin_uart_config_t;
43
49 typedef struct {
50 uint32_t base_address;
51 int source;
52} bfin_uart_arg_t;
53
54
55
56char bfin_uart_poll_read(rtems_device_minor_number minor);
57
58void bfin_uart_poll_write(int minor, char c);
59
60
67 rtems_status_code bfin_uart_initialize(rtems_device_major_number major,
68 bfin_uart_config_t *config);
69
70
71
84 rtems_device_driver bfin_uart_open(rtems_device_major_number major,
85 rtems_device_minor_number minor, void *arg);
86
87
88
100void bfinUart_txDmaIsr(void *_arg);
101
102
103
110void bfinUart_rxDmaIsr(void *_arg);
111
112
121void bfinUart_txIsr(void *_arg);
122
123
127void bfinUart_rxIsr(void *_arg);
128
129
130#ifdef __cplusplus
131}
132#endif
133
134#endif /* _UART_H_ */
135
rtems_status_code
rtems_status_code
Classic API Status.
Definition: status.h:43
bfin_uart_arg_t
Definition: uart.h:49
bfin_uart_channel_t
Definition: uart.h:23
bfin_uart_channel_t::length
uint16_t length
Definition: uart.h:34
bfin_uart_channel_t::uart_useInterrupts
bool uart_useInterrupts
Definition: uart.h:28
bfin_uart_channel_t::termios
void * termios
Definition: uart.h:32
bfin_uart_channel_t::uart_baseAddress
uint32_t uart_baseAddress
Definition: uart.h:25
bfin_uart_channel_t::flags
uint8_t volatile flags
Definition: uart.h:33
bfin_uart_channel_t::uart_rxDmaBaseAddress
uint32_t uart_rxDmaBaseAddress
Definition: uart.h:26
bfin_uart_channel_t::uart_useDma
bool uart_useDma
Definition: uart.h:29
bfin_uart_channel_t::uart_baud
int uart_baud
Definition: uart.h:30
bfin_uart_channel_t::uart_txDmaBaseAddress
uint32_t uart_txDmaBaseAddress
Definition: uart.h:27
bfin_uart_config_t
Definition: uart.h:38
config_s
Definition: deflate.c:115