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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [or1ksim/] [peripheral/] [channels/] [generic.c] - Blame information for rev 1767

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

Line No. Rev Author Line
1 1070 rprescott
/* generic.c -- Definition of generic functions for peripheral to
2
 * communicate with host
3
 
4 1748 jeremybenn
   Copyright (C) 2002 Richard Prescott <rip@step.polymtl.ca
5
   Copyright (C) 2008 Embecosm Limited
6 1070 rprescott
 
7 1748 jeremybenn
   Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
8 1070 rprescott
 
9 1748 jeremybenn
   This file is part of Or1ksim, the OpenRISC 1000 Architectural Simulator.
10 1070 rprescott
 
11 1748 jeremybenn
   This program is free software; you can redistribute it and/or modify it
12
   under the terms of the GNU General Public License as published by the Free
13
   Software Foundation; either version 3 of the License, or (at your option)
14
   any later version.
15 1070 rprescott
 
16 1748 jeremybenn
   This program is distributed in the hope that it will be useful, but WITHOUT
17
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
19
   more details.
20 1070 rprescott
 
21 1748 jeremybenn
   You should have received a copy of the GNU General Public License along
22
   with this program.  If not, see <http://www.gnu.org/licenses/>.  */
23 1244 hpanther
 
24 1748 jeremybenn
/* This program is commented throughout in a fashion suitable for processing
25
   with Doxygen. */
26 1244 hpanther
 
27 1070 rprescott
 
28 1748 jeremybenn
/* Autoconf and/or portability configuration */
29
#include "config.h"
30 1070 rprescott
 
31 1748 jeremybenn
/* System includes */
32
#include <stdlib.h>
33
#include <errno.h>
34
 
35
 
36
int
37
generic_open (void *data)
38 1070 rprescott
{
39 1748 jeremybenn
  if (data)
40
    {
41
      return 0;
42
    }
43
  errno = ENODEV;
44
  return -1;
45 1070 rprescott
}
46
 
47 1748 jeremybenn
 
48
void
49
generic_close (void *data)
50 1070 rprescott
{
51 1748 jeremybenn
  return;
52 1070 rprescott
}
53
 
54 1748 jeremybenn
 
55
void
56
generic_free (void *data)
57 1070 rprescott
{
58 1748 jeremybenn
  if (data)
59
    {
60
      free (data);
61
    }
62 1070 rprescott
}

powered by: WebSVN 2.1.0

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