OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [powerpc/] [fads/] [current/] [include/] [hal_diag.h] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
#ifndef CYGONCE_HAL_HAL_DIAG_H
2
#define CYGONCE_HAL_HAL_DIAG_H
3
 
4
//=============================================================================
5
//
6
//      hal_diag.h
7
//
8
//      HAL Support for Kernel Diagnostic Routines
9
//
10
//=============================================================================
11
//####UNSUPPORTEDBEGIN####
12
//
13
// -------------------------------------------
14
// This source file has been contributed to eCos/Red Hat. It may have been
15
// changed slightly to provide an interface consistent with those of other 
16
// files.
17
//
18
// The functionality and contents of this file is supplied "AS IS"
19
// without any form of support and will not necessarily be kept up
20
// to date by Red Hat.
21
//
22
// All inquiries about this file, or the functionality provided by it,
23
// should be directed to the 'ecos-discuss' mailing list (see
24
// http://ecos.sourceware.org/ecos/intouch.html for details).
25
//
26
// Maintained by:  <Unmaintained>
27
// -------------------------------------------
28
//
29
//####UNSUPPORTEDEND####
30
//=============================================================================
31
// ####ECOSGPLCOPYRIGHTBEGIN####                                            
32
// -------------------------------------------                              
33
// This file is part of eCos, the Embedded Configurable Operating System.   
34
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
35
//
36
// eCos is free software; you can redistribute it and/or modify it under    
37
// the terms of the GNU General Public License as published by the Free     
38
// Software Foundation; either version 2 or (at your option) any later      
39
// version.                                                                 
40
//
41
// eCos is distributed in the hope that it will be useful, but WITHOUT      
42
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or    
43
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License    
44
// for more details.                                                        
45
//
46
// You should have received a copy of the GNU General Public License        
47
// along with eCos; if not, write to the Free Software Foundation, Inc.,    
48
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.            
49
//
50
// As a special exception, if other files instantiate templates or use      
51
// macros or inline functions from this file, or you compile this file      
52
// and link it with other works to produce a work based on this file,       
53
// this file does not by itself cause the resulting work to be covered by   
54
// the GNU General Public License. However the source code for this file    
55
// must still be made available in accordance with section (3) of the GNU   
56
// General Public License v2.                                               
57
//
58
// This exception does not invalidate any other reasons why a work based    
59
// on this file might be covered by the GNU General Public License.         
60
// -------------------------------------------                              
61
// ####ECOSGPLCOPYRIGHTEND####                                              
62
//=============================================================================
63
//#####DESCRIPTIONBEGIN####
64
//
65
// Author(s):   nickg
66
// Contributors:nickg
67
// Date:        1998-03-02
68
// Purpose:     HAL Support for Kernel Diagnostic Routines
69
// Description: Diagnostic routines for use during kernel development.
70
// Usage:       #include <cyg/hal/hal_diag.h>
71
//
72
//####DESCRIPTIONEND####
73
//
74
//=============================================================================
75
 
76
#include <pkgconf/hal.h>
77
 
78
#include <cyg/infra/cyg_type.h>
79
 
80
#if defined(CYGSEM_HAL_VIRTUAL_VECTOR_DIAG)
81
 
82
#include <cyg/hal/hal_if.h>
83
#include <cyg/hal/quicc_smc2.h>
84
 
85
#define HAL_DIAG_INIT() hal_if_diag_init()
86
#define HAL_DIAG_WRITE_CHAR(_c_) hal_if_diag_write_char(_c_)
87
#define HAL_DIAG_READ_CHAR(_c_) hal_if_diag_read_char(&_c_)
88
 
89
#ifndef CYGPRI_CONSOLE_PROCS_HANDLED
90
# define HAL_PLF_DIAG_RAW_INIT() cyg_smc2_init(9600)
91
# define HAL_PLF_DIAG_RAW_WRITE_CHAR(_c_) cyg_smc2_putchar(_c_)
92
# define HAL_PLF_DIAG_RAW_READ_CHAR(_c_) (_c_) = cyg_smc2_getchar()
93
#endif
94
 
95
#else // everything by steam
96
 
97
//-----------------------------------------------------------------------------
98
// functions implemented in hal_diag.c
99
 
100
externC void hal_diag_init(void);
101
 
102
externC void hal_diag_write_char(char c);
103
 
104
externC void hal_diag_read_char(char *c);
105
 
106
//-----------------------------------------------------------------------------
107
 
108
#define HAL_DIAG_INIT() hal_diag_init()
109
 
110
#define HAL_DIAG_WRITE_CHAR(_c_) hal_diag_write_char(_c_)
111
 
112
#define HAL_DIAG_READ_CHAR(_c_) hal_diag_read_char(&_c_)
113
 
114
#endif // CYGSEM_HAL_VIRTUAL_VECTOR_DIAG
115
 
116
//-----------------------------------------------------------------------------
117
// end of hal_diag.h
118
#endif // CYGONCE_HAL_HAL_DIAG_H

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.