source: rtems/c/src/libchip/serial/ns16550.h @ 4f1173bc

4.115
Last change on this file since 4f1173bc was 4f1173bc, checked in by Jennifer Averett <jennifer.averett@…>, on 02/23/12 at 16:40:33

Avoid NULL dereference in printk() before libchip console initialized

With the addition of dynamically registered libchip serial devices,
there is the need to be able to use printk() before the console driver
has initialized the indirect pointer table. This lets printk() support
routines call pass a control structure directly without a lookup through
the uninitialized indirect one.

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/**
2 *  @file
3 * 
4 */
5
6/*
7 *  COPYRIGHT (c) 1998 by Radstone Technology
8 *
9 *  THIS FILE IS PROVIDED TO YOU, THE USER, "AS IS", WITHOUT WARRANTY OF ANY
10 *  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
11 *  IMPLIED WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK
12 *  AS TO THE QUALITY AND PERFORMANCE OF ALL CODE IN THIS FILE IS WITH YOU.
13 *
14 *  You are hereby granted permission to use, copy, modify, and distribute
15 *  this file, provided that this notice, plus the above copyright notice
16 *  and disclaimer, appears in all copies. Radstone Technology will provide
17 *  no support for this code.
18 *
19 *  COPYRIGHT (c) 1989-2012.
20 *  On-Line Applications Research Corporation (OAR).
21 *
22 *  The license and distribution terms for this file may be
23 *  found in the file LICENSE in this distribution or at
24 *  http://www.rtems.com/license/LICENSE.
25 *
26 *  $Id$
27 */
28
29#ifndef _NS16550_H_
30#define _NS16550_H_
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36/*
37 * Driver function table
38 */
39
40extern console_fns ns16550_fns;
41extern console_fns ns16550_fns_polled;
42
43/*
44 * Flow control function tables
45 */
46
47extern console_flow ns16550_flow_RTSCTS;
48extern console_flow ns16550_flow_DTRCTS;
49
50/*
51 *  Helpers for printk
52 */
53void ns16550_outch_polled(console_tbl *c, char out);
54int ns16550_inch_polled(console_tbl *c);
55
56#ifdef __cplusplus
57}
58#endif
59
60#endif /* _NS16550_H_ */
Note: See TracBrowser for help on using the repository browser.