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

Last change on this file since 5ca634e9 was 5ca634e9, checked in by Sebastian Huber <sebastian.huber@…>, on Mar 9, 2017 at 12:23:54 PM

bsp/tms570: Support printk() early

Allow use of printk() early in the initalization and without a console
driver.

  • Property mode set to 100644
File size: 1.4 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 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
59/** @} */
60
61#ifdef __cplusplus
62}
63#endif /* __cplusplus */
64
65#endif /* TMS570_SCI_DRIVER */
Note: See TracBrowser for help on using the repository browser.