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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [tools/] [src/] [infra/] [diag.h] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 26 unneback
#ifndef CYGONCE_INFRA_DIAG_H
2
#define CYGONCE_INFRA_DIAG_H
3
 
4
/*=============================================================================
5
//
6
//      diag.h
7
//
8
//      Diagnostic Routines for Infra Development
9
//
10
//==========================================================================
11
//####COPYRIGHTBEGIN####
12
//
13
// ----------------------------------------------------------------------------
14
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
15
//
16
// This file is part of the eCos host tools.
17
//
18
// This program is free software; you can redistribute it and/or modify it
19
// under the terms of the GNU General Public License as published by the Free
20
// Software Foundation; either version 2 of the License, or (at your option)
21
// any later version.
22
//
23
// This program is distributed in the hope that it will be useful, but WITHOUT
24
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
25
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
26
// more details.
27
//
28
// You should have received a copy of the GNU General Public License along with
29
// this program; if not, write to the Free Software Foundation, Inc.,
30
// 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
31
//
32
// ----------------------------------------------------------------------------
33
//
34
//####COPYRIGHTEND####
35
//==========================================================================
36
//#####DESCRIPTIONBEGIN####
37
//
38
// Author(s):   nickg
39
// Contributors:        nickg
40
// Date:        1998-03-02
41
// Purpose:     Diagnostic Routines for Infra Development
42
// Description: Diagnostic routines for use during infra development.
43
// Usage:       #include <cyg/infra/diag.h>
44
//
45
//####DESCRIPTIONEND####
46
//
47
//==========================================================================*/
48
 
49
#include <pkgconf/infra.h>
50
#include <cyg/infra/cyg_type.h>
51
 
52
#ifdef CYGDBG_INFRA_DIAG_PRINTF_USE_VARARG
53
#include <stdarg.h>
54
#endif
55
 
56
#ifdef CYGDBG_INFRA_DIAG_USE_DEVICE
57
#include <cyg/io/io_diag.h>
58
#endif
59
 
60
/*---------------------------------------------------------------------------*/
61
/* Diagnostic routines                                                       */
62
 
63
externC void diag_init(void);         /* Initialize, call before any others*/
64
 
65
externC void diag_write_char(char c); /* Write single char to output       */
66
 
67
externC void diag_write_string(const char *psz); /* Write zero terminated string */
68
 
69
externC void diag_write_dec( cyg_int32 n);    /* Write decimal value       */
70
 
71
externC void diag_write_hex( cyg_uint32 n);   /* Write hexadecimal value   */
72
 
73
externC void diag_dump_buf(void *buf, CYG_ADDRWORD len);
74
 
75
#ifdef CYGDBG_INFRA_DIAG_PRINTF_USE_VARARG
76
 
77
externC void diag_printf( const char *fmt, ... );  /* Formatted print      */
78
 
79
#else
80
 
81
// This function deliberately has a K&R prototype to avoid having to use
82
// varargs, or pad arglists or anything grody like that.
83
 
84
#warning CYGDBG_INFRA_DIAG_PRINTF_USE_VARARG not enabled
85
#warning Expect a "function declaration isn't a prototype" warning
86
 
87
externC void diag_printf(/* const char *fmt, CYG_ADDRWORD, CYG_ADDRWORD,
88
                         CYG_ADDRWORD, CYG_ADDRWORD, CYG_ADDRWORD,
89
                         CYG_ADDRWORD, CYG_ADDRWORD, CYG_ADDRWORD */);
90
 
91
#endif
92
 
93
/*---------------------------------------------------------------------------*/
94
/* Internal Diagnostic MACROS                                                */
95
 
96
#ifdef CYGDBG_INFRA_DIAG_USE_DEVICE
97
#define DIAG_DEVICE_START_SYNC()        diag_device_start_sync()
98
#define DIAG_DEVICE_END_SYNC()          diag_device_end_sync()
99
#else
100
#define DIAG_DEVICE_START_SYNC()
101
#define DIAG_DEVICE_END_SYNC()
102
#endif
103
 
104
/*---------------------------------------------------------------------------*/
105
#endif /* CYGONCE_INFRA_DIAG_H */
106
/* EOF diag.h */

powered by: WebSVN 2.1.0

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