RTEMS: bsps/arm/tms570/include/bsp/tms570-sci-driver.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
tms570-sci-driver.h
Go to the documentation of this file.
1
9/*
10 * Copyright (c) 2014 Premysl Houdek <kom541000@gmail.com>
11 *
12 * Google Summer of Code 2014 at
13 * Czech Technical University in Prague
14 * Zikova 1903/4
15 * 166 36 Praha 6
16 * Czech Republic
17 *
18 * Based on LPC24xx and LPC1768 BSP
19 * by embedded brains GmbH and others
20 *
21 * The license and distribution terms for this file may be
22 * found in the file LICENSE in this distribution or at
23 * http://www.rtems.org/license/LICENSE.
24 */
25
26#ifndef TMS570_SCI_DRIVER
27#define TMS570_SCI_DRIVER
28
29#include <rtems/termiostypes.h>
30#include <rtems/irq.h>
31#include <bsp/tms570-sci.h>
32
33#ifdef __cplusplus
34extern "C" {
35#endif /* __cplusplus */
36
37/* Low-level driver specific data structure */
38 typedef struct {
39 rtems_termios_device_context base;
40 const char *device_name;
41 volatile tms570_sci_t *regs;
42 int tx_chars_in_hw;
43 rtems_vector_number irq;
44} tms570_sci_context;
45
46extern const rtems_termios_device_handler tms570_sci_handler_polled;
47
48extern const rtems_termios_device_handler tms570_sci_handler_interrupt;
49
50extern tms570_sci_context driver_context_table[];
51
52void tms570_sci_initialize(tms570_sci_context *ctx);
53
54bool tms570_sci_set_attributes(
55 rtems_termios_device_context *base,
56 const struct termios *term
57);
58
61#ifdef __cplusplus
62}
63#endif /* __cplusplus */
64
65#endif /* TMS570_SCI_DRIVER */
irq.h
rtems_vector_number
ISR_Vector_number rtems_vector_number
Control block type used to manage the vectors.
Definition: intr.h:47
rtems_termios_device_context
Termios device context.
Definition: termiostypes.h:75
rtems_termios_device_handler
Termios device handler.
Definition: termiostypes.h:141
tms570_sci_context
Definition: tms570-sci-driver.h:38
tms570_sci_t
Definition: reg_sci.h:44
termiostypes.h
tms570_sci_handler_polled
const rtems_termios_device_handler tms570_sci_handler_polled
Struct containing definitions of polled driver functions.
Definition: tms570-sci.c:620
driver_context_table
tms570_sci_context driver_context_table[]
Table including all serial drivers.
Definition: tms570-sci.c:43
tms570_sci_set_attributes
bool tms570_sci_set_attributes(rtems_termios_device_context *base, const struct termios *term)
Set attributes of the HW peripheral.
Definition: tms570-sci.c:245
tms570_sci_handler_interrupt
const rtems_termios_device_handler tms570_sci_handler_interrupt
Struct containing definitions of interrupt driven driver functions.
Definition: tms570-sci.c:635
tms570-sci.h
Serial Communication Interface (SCI) header file.