RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
bsps
arm
tms570
include
bsp
tms570-sci-driver.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-2-Clause */
2
10
11
/*
12
* Copyright (C) 2014 Premysl Houdek <kom541000@gmail.com>
13
*
14
* Google Summer of Code 2014 at
15
* Czech Technical University in Prague
16
* Zikova 1903/4
17
* 166 36 Praha 6
18
* Czech Republic
19
*
20
* Redistribution and use in source and binary forms, with or without
21
* modification, are permitted provided that the following conditions
22
* are met:
23
* 1. Redistributions of source code must retain the above copyright
24
* notice, this list of conditions and the following disclaimer.
25
* 2. Redistributions in binary form must reproduce the above copyright
26
* notice, this list of conditions and the following disclaimer in the
27
* documentation and/or other materials provided with the distribution.
28
*
29
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
30
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
33
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
34
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
35
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
36
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
37
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
38
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39
* POSSIBILITY OF SUCH DAMAGE.
40
*/
41
42
#ifndef TMS570_SCI_DRIVER
43
#define TMS570_SCI_DRIVER
44
45
#include <
rtems/termiostypes.h
>
46
#include <
rtems/irq.h
>
47
#include <
bsp/tms570.h
>
48
49
#ifdef __cplusplus
50
extern
"C"
{
51
#endif
/* __cplusplus */
52
53
/* Low-level driver specific data structure */
54
typedef
struct
{
55
rtems_termios_device_context
base;
56
const
char
*device_name;
57
volatile
tms570_sci_t
*regs;
58
int
tx_chars_in_hw;
59
rtems_vector_number
irq;
60
}
tms570_sci_context
;
61
62
extern
const
rtems_termios_device_handler
tms570_sci_handler_polled
;
63
64
extern
const
rtems_termios_device_handler
tms570_sci_handler_interrupt
;
65
66
extern
tms570_sci_context
driver_context_table
[];
67
68
void
tms570_sci_initialize(
tms570_sci_context
*ctx);
69
70
bool
tms570_sci_set_attributes
(
71
rtems_termios_device_context
*base,
72
const
struct
termios *term
73
);
74
76
77
#ifdef __cplusplus
78
}
79
#endif
/* __cplusplus */
80
81
#endif
/* TMS570_SCI_DRIVER */
irq.h
rtems_vector_number
ISR_Vector_number rtems_vector_number
This integer type represents interrupt vector numbers.
Definition
intr.h:102
rtems_termios_device_context
Termios device context.
Definition
termiosdevice.h:68
rtems_termios_device_handler
Termios device handler.
Definition
termiosdevice.h:100
tms570_sci_context
Definition
tms570-sci-driver.h:54
tms570_sci_t
Definition
reg_sci.h:54
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:609
driver_context_table
tms570_sci_context driver_context_table[]
Table including all serial drivers.
Definition
tms570-sci.c:57
tms570_sci_set_attributes
bool tms570_sci_set_attributes(rtems_termios_device_context *base, const struct termios *t)
Set attributes of the HW peripheral.
Definition
tms570-sci.c:232
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:624
tms570.h
This header file provides TMS570 interfaces.
Generated by
1.18.0