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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [host/] [infra/] [diag.h] - Blame information for rev 864

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

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

powered by: WebSVN 2.1.0

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