• Main Page
  • Classes
  • Files
  • File List
  • File Members

qeinterrupt.h

Go to the documentation of this file.
00001 //
00002 // begin license header
00003 //  
00004 // This file is part of Terk and TerkOS.
00005 //
00006 // All Terk and TerkOS source code is provided under the terms of the 
00007 // GNU General Public License v2 (http://www.gnu.org/licenses/gpl-2.0.html).  
00008 // Those wishing to use Terk and TerkOS source code, software and/or
00009 // technologies under different licensing terms should contact us at 
00010 // [email protected]. Such licensing terms are available for
00011 // all portions of the Terk and TerkOS codebase presented here.
00012 //
00013 // end license header
00014 //
00015 
00016 #ifndef _QEINTERRUPT_H
00017 #define _QEINTERRUPT_H
00018 
00019 #include <linux/ioctl.h>
00020 
00021 #ifndef TRUE
00022 #define TRUE                 1
00023 #endif
00024 #ifndef FALSE               
00025 #define FALSE                0
00026 #endif
00027 
00028 #define QEINT_MAJOR_NUMBER     210
00029 #define QEINT_MINOR_NUMBER     0
00030 
00031 #define QEINT_NUM_INTERRUPTS   32
00032 #define QEINT_BASE_ADDR        0x20000ff0
00033 #define QEINT_WIDTH            0x10
00034 #define QEINT_INTERRUPT        IRQ_EP93XX_EXT0
00035 
00036 #define QEINT_MODE_UNUSED      0
00037 #define QEINT_MODE_FAST        1
00038 #define QEINT_MODE_DEFERRED    2
00039 
00040 #define QEINT_IOC_MAGIC        0xe1
00041 
00042 #define QEINT_IOC_READ_STATUS  _IOR(QEINT_IOC_MAGIC, 1, char)
00043 #define QEINT_IOC_RESET_STATUS _IO(QEINT_IOC_MAGIC, 2)
00044 #define QEINT_IOC_DISABLE      _IO(QEINT_IOC_MAGIC, 3)
00045 #define QEINT_IOC_ENABLE       _IO(QEINT_IOC_MAGIC, 4)
00046 
00047 #define QEINT_IOC_MAXNR        4
00048 
00049 int qe_interrupt_enable(unsigned char vector);
00050 int qe_interrupt_disable(unsigned char vector);
00051 int qe_interrupt_register(unsigned char vector, unsigned char mode, void (*callback)(unsigned char));
00052 void qe_interrupt_time(int vector, struct timeval *ptv);
00053 int qe_interrupt_unregister(int vector);
00054 #endif

Generated on Mon Oct 3 2011 15:36:31 for libqwerk by  doxygen 1.7.1