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

Subversion Repositories or1k

[/] [or1k/] [tags/] [stable_0_2_0_rc3/] [or1ksim/] [peripheral/] [gpio_i.h] - Blame information for rev 477

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

Line No. Rev Author Line
1 444 erez
/* gpio_i.h -- Definition of internal types and structures for GPIO code
2
   Copyright (C) 2001 Erez Volk, erez@mailandnews.comopencores.org
3
 
4
   This file is part of OpenRISC 1000 Architectural Simulator.
5
 
6
   This program is free software; you can redistribute it and/or modify
7
   it under the terms of the GNU General Public License as published by
8
   the Free Software Foundation; either version 2 of the License, or
9
   (at your option) any later version.
10
 
11
   This program is distributed in the hope that it will be useful,
12
   but WITHOUT ANY WARRANTY; without even the implied warranty of
13
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
   GNU General Public License for more details.
15
 
16
   You should have received a copy of the GNU General Public License
17
   along with this program; if not, write to the Free Software
18
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
*/
20
 
21
#ifndef __OR1KSIM_PERIPHERAL_GPIO_I_H
22
#define __OR1KSIM_PERIPHERAL_GPIO_I_H
23
 
24
#include "gpio.h"
25
#include "config.h"
26
 
27
/*
28
 * The various VAPI IDs each GPIO device has
29
 */
30 477 erez
enum { GPIO_VAPI_DATA = 0, GPIO_VAPI_AUX, GPIO_VAPI_CLOCK,
31
       GPIO_VAPI_RGPIO_OE, GPIO_VAPI_RGPIO_INTE, GPIO_VAPI_RGPIO_PTRIG, GPIO_VAPI_RGPIO_AUX, GPIO_VAPI_RGPIO_CTRL,
32
       GPIO_NUM_VAPI_IDS };
33 444 erez
 
34
 
35
/*
36
 * Implementatino of GPIO Code Registers and State
37
 */
38
struct gpio_device
39
{
40
  /* Base address in memory */
41
  unsigned long baseaddr;
42
 
43
  /* Which IRQ to generate */
44
  int irq;
45
 
46
  /* Which GPIO is this? */
47
  unsigned gpio_number;
48
 
49
  /* VAPI IDs */
50 477 erez
  unsigned long base_vapi_id;
51 444 erez
 
52
  /* Auxiliary inputs */
53
  unsigned long auxiliary_inputs;
54
 
55
  /* Visible registers */
56
  struct
57
  {
58
    unsigned long in;
59
    unsigned long out;
60
    unsigned long oe;
61
    unsigned long inte;
62
    unsigned long ptrig;
63
    unsigned long aux;
64
    unsigned long ctrl;
65
 
66
    int external_clock;
67
  } curr, next;
68
};
69
 
70
 
71
 
72
 
73
#endif /* __OR1KSIM_PERIPHERAL_GPIO_I_H */

powered by: WebSVN 2.1.0

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