00001 /* 00002 * UIOMux: a conflict manager for system resources, including UIO devices. 00003 * Copyright (C) 2009 Renesas Technology Corp. 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Library General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Library General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Library General Public 00016 * License along with this library; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA 00018 */ 00019 00020 #ifndef __UIOMUX_DUMP_H__ 00021 #define __UIOMUX_DUMP_H__ 00022 00023 #include <stdio.h> 00024 00031 /* 00032 * Dump the contents of the MMIO region for a UIO managed resource to a file handle. 00033 * \param stream A FILE handle 00034 * \param uiomux A UIOMux handle 00035 * \param resource A single named resource 00036 * \returns Number of characters written 00037 * \retval 0 Failure: resource not managed, or more than one resource given. 00038 * \retval <0 Failure: error writing to stream. 00039 */ 00040 int uiomux_dump_mmio (FILE * stream, UIOMux * uiomux, uiomux_resource_t resource); 00041 00042 /* 00043 * Dump the contents of the MMIO region for a UIO managed resource to a file. 00044 * The name of the file can be given as a format string. 00045 * \param uiomux A UIOMux handle 00046 * \param resource A single named resource 00047 * \param fmt The file name 00048 * \returns Number of characters written 00049 * \retval 0 Failure: resource not managed, or more than one resource given. 00050 * \retval <0 Failure: error writing to stream. 00051 */ 00052 int uiomux_dump_mmio_filename (UIOMux * uiomux, uiomux_resource_t resource, 00053 const char *fmt, ...); 00054 00055 #endif /* __UIOMUX_DUMP_H__ */