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

4.115
Last change on this file since 991fdb33 was cf4dfc1, checked in by Pavel Pisa <pisa@…>, on 02/04/15 at 17:20:27

arm/tms570: sci context has to be writable because it holds state variable.

The structure tms570_sci_context holds state variable
tx_chars_in_hw which holds if and how many characters
(in the optional FIFO support for some Ti SCIs) are submitted
into hardware.

When field is not writable then code breaks when RTEMS
is build for Flash area.

The problem found and analyzed by Martin Galvan from tallertechnologies.

Signed-off-by: Pavel Pisa <pisa@…>

  • 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 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.