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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [infra/] [v2_0/] [include/] [diag.h] - Blame information for rev 565

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

Line No. Rev Author Line
1 27 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
//####ECOSGPLCOPYRIGHTBEGIN####
12
// -------------------------------------------
13
// This file is part of eCos, the Embedded Configurable Operating System.
14
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
15
// Copyright (C) 2002 Gary Thomas
16
//
17
// eCos is free software; you can redistribute it and/or modify it under
18
// the terms of the GNU General Public License as published by the Free
19
// Software Foundation; either version 2 or (at your option) any later version.
20
//
21
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
22
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
23
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
24
// for more details.
25
//
26
// You should have received a copy of the GNU General Public License along
27
// with eCos; if not, write to the Free Software Foundation, Inc.,
28
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
29
//
30
// As a special exception, if other files instantiate templates or use macros
31
// or inline functions from this file, or you compile this file and link it
32
// with other works to produce a work based on this file, this file does not
33
// by itself cause the resulting work to be covered by the GNU General Public
34
// License. However the source code for this file must still be made available
35
// in accordance with section (3) of the GNU General Public License.
36
//
37
// This exception does not invalidate any other reasons why a work based on
38
// this file might be covered by the GNU General Public License.
39
//
40
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
41
// at http://sources.redhat.com/ecos/ecos-license/
42
// -------------------------------------------
43
//####ECOSGPLCOPYRIGHTEND####
44
//==========================================================================
45
//#####DESCRIPTIONBEGIN####
46
//
47
// Author(s):   nickg
48
// Contributors:        nickg, gthomas
49
// Date:        1998-03-02
50
// Purpose:     Diagnostic Routines for Infra Development
51
// Description: Diagnostic routines for use during infra development.
52
// Usage:       #include <cyg/infra/diag.h>
53
//
54
//####DESCRIPTIONEND####
55
//
56
//==========================================================================*/
57
 
58
#include <pkgconf/infra.h>
59
#include <cyg/infra/cyg_type.h>
60
#include <stdarg.h>
61
 
62
/*---------------------------------------------------------------------------*/
63
/* Diagnostic routines                                                       */
64
 
65
externC void diag_init(void);         /* Initialize, call before any others*/
66
 
67
externC void diag_write_char(char c); /* Write single char to output       */
68
 
69
externC void diag_write_string(const char *psz); /* Write zero terminated string */
70
 
71
externC void diag_write_dec( cyg_int32 n);    /* Write decimal value       */
72
 
73
externC void diag_write_hex( cyg_uint32 n);   /* Write hexadecimal value   */
74
 
75
externC void diag_dump_buf(void *buf, CYG_ADDRWORD len);
76
externC void diag_dump_buf_32bit(void *buf, CYG_ADDRWORD len);
77
externC void diag_dump_buf_16bit(void *buf, CYG_ADDRWORD len);
78
typedef int __printf_fun(const char *fmt, ...);
79
externC void diag_vdump_buf_with_offset(__printf_fun *pf,
80
                                        cyg_uint8     *p,
81
                                        CYG_ADDRWORD   s,
82
                                        cyg_uint8     *base);
83
externC void diag_dump_buf_with_offset(cyg_uint8     *p,
84
                                       CYG_ADDRWORD   s,
85
                                       cyg_uint8     *base);
86
 
87
externC void diag_dump_buf_with_offset_32bit(cyg_uint32 *p,
88
                                             CYG_ADDRWORD     s,
89
                                             cyg_uint32      *base);
90
 
91
externC void diag_dump_buf_with_offset_16bit(cyg_uint16 *p,
92
                                             CYG_ADDRWORD     s,
93
                                             cyg_uint16      *base);
94
 
95
externC int  diag_printf( const char *fmt, ... );  /* Formatted print      */
96
 
97
externC void diag_init_putc(void (*putc)(char c, void **param));
98
externC int  diag_sprintf(char *buf, const char *fmt, ...);
99
externC int  diag_snprintf(char *buf, size_t len, const char *fmt, ...);
100
externC int  diag_vsprintf(char *buf, const char *fmt, va_list ap);
101
externC int  diag_vprintf(const char *fmt, va_list ap);
102
 
103
 
104
/*---------------------------------------------------------------------------*/
105
/* Internal Diagnostic MACROS                                                */
106
 
107
#define DIAG_DEVICE_START_SYNC()
108
#define DIAG_DEVICE_END_SYNC()
109
 
110
/*---------------------------------------------------------------------------*/
111
#endif /* CYGONCE_INFRA_DIAG_H */
112
/* EOF diag.h */

powered by: WebSVN 2.1.0

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