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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [infra/] [current/] [include/] [diag.h] - Blame information for rev 786

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
// ####ECOSGPLCOPYRIGHTBEGIN####
12
// -------------------------------------------
13
// This file is part of eCos, the Embedded Configurable Operating System.
14
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
15
//
16
// eCos is free software; you can redistribute it and/or modify it under
17
// the terms of the GNU General Public License as published by the Free
18
// Software Foundation; either version 2 or (at your option) any later
19
// version.
20
//
21
// eCos is distributed in the hope that it will be useful, but WITHOUT
22
// ANY 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
27
// along with eCos; if not, write to the Free Software Foundation, Inc.,
28
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
29
//
30
// As a special exception, if other files instantiate templates or use
31
// macros or inline functions from this file, or you compile this file
32
// and link it with other works to produce a work based on this file,
33
// this file does not by itself cause the resulting work to be covered by
34
// the GNU General Public License. However the source code for this file
35
// must still be made available in accordance with section (3) of the GNU
36
// General Public License v2.
37
//
38
// This exception does not invalidate any other reasons why a work based
39
// on this file might be covered by the GNU General Public License.
40
// -------------------------------------------
41
// ####ECOSGPLCOPYRIGHTEND####
42
//==========================================================================
43
//#####DESCRIPTIONBEGIN####
44
//
45
// Author(s):   nickg
46
// Contributors:        nickg, gthomas
47
// Date:        1998-03-02
48
// Purpose:     Diagnostic Routines for Infra Development
49
// Description: Diagnostic routines for use during infra development.
50
// Usage:       #include <cyg/infra/diag.h>
51
//
52
//####DESCRIPTIONEND####
53
//
54
//==========================================================================*/
55
 
56
#include <pkgconf/infra.h>
57
#include <cyg/infra/cyg_type.h>
58
#include <stdarg.h>
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
externC void diag_dump_buf_32bit(void *buf, CYG_ADDRWORD len);
75
externC void diag_dump_buf_16bit(void *buf, CYG_ADDRWORD len);
76
typedef int __printf_fun(const char *fmt, ...);
77
externC void diag_vdump_buf_with_offset(__printf_fun *pf,
78
                                        cyg_uint8     *p,
79
                                        CYG_ADDRWORD   s,
80
                                        cyg_uint8     *base);
81
externC void diag_dump_buf_with_offset(cyg_uint8     *p,
82
                                       CYG_ADDRWORD   s,
83
                                       cyg_uint8     *base);
84
 
85
externC void diag_dump_buf_with_offset_32bit(cyg_uint32 *p,
86
                                             CYG_ADDRWORD     s,
87
                                             cyg_uint32      *base);
88
 
89
externC void diag_dump_buf_with_offset_16bit(cyg_uint16 *p,
90
                                             CYG_ADDRWORD     s,
91
                                             cyg_uint16      *base);
92
 
93
/* Formatted print      */
94
externC int  diag_printf( const char *fmt, ... ) CYGBLD_ATTRIB_PRINTF_FORMAT(1,2);
95
 
96
externC void diag_init_putc(void (*putc)(char c, void **param));
97
externC int  diag_sprintf(char *buf, const char *fmt, ...)
98
     CYGBLD_ATTRIB_PRINTF_FORMAT(2,3);
99
externC int  diag_snprintf(char *buf, size_t len, const char *fmt, ...)
100
     CYGBLD_ATTRIB_PRINTF_FORMAT(3,4);
101
externC int  diag_vsprintf(char *buf, const char *fmt, va_list ap)
102
     CYGBLD_ATTRIB_PRINTF_FORMAT(2,0);
103
externC int  diag_vsnprintf(char *buf, size_t len, const char *fmt, va_list ap)
104
     CYGBLD_ATTRIB_PRINTF_FORMAT(3,0);
105
externC int  diag_vprintf(const char *fmt, va_list ap)
106
     CYGBLD_ATTRIB_PRINTF_FORMAT(1,0);
107
 
108
 
109
/*---------------------------------------------------------------------------*/
110
/* Internal Diagnostic MACROS                                                */
111
 
112
#define DIAG_DEVICE_START_SYNC()
113
#define DIAG_DEVICE_END_SYNC()
114
 
115
/*---------------------------------------------------------------------------*/
116
#endif /* CYGONCE_INFRA_DIAG_H */
117
/* EOF diag.h */

powered by: WebSVN 2.1.0

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