source: rtems/c/src/lib/libbsp/arm/tms570/include/tms570-sci-driver.h @ 924cbd4f

4.11
Last change on this file since 924cbd4f was 7fd5e89, checked in by Sebastian Huber <sebastian.huber@…>, on Oct 7, 2014 at 2:28:04 PM

termios: Partially hide rtems_termios_tty

Move interrupt lock to device context and expose only this structure to
the read, write and set attributes device handler. This makes these
device handler independent of the general Termios infrastructure
suitable for direct use in printk() support.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/**
2 * @file tms570-sci-driver.h
3 *
4 * @ingroup tms570
5 *
6 * @brief Declaration of serial's driver inner structure.
7 */
8
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 */
38typedef 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 const tms570_sci_context driver_context_table[];
51
52/** @} */
53
54#ifdef __cplusplus
55}
56#endif /* __cplusplus */
57
58#endif /* TMS570_SCI_DRIVER */
Note: See TracBrowser for help on using the repository browser.