Go to the documentation of this file.
36#ifndef NIDAS_ARCOM_VIPER_DIO_H
37#define NIDAS_ARCOM_VIPER_DIO_H
49#define VIPER_DIO_IOC_MAGIC 'v'
54#define VIPER_DIO_GET_NOUT _IO(VIPER_DIO_IOC_MAGIC,0)
57#define VIPER_DIO_GET_NIN _IO(VIPER_DIO_IOC_MAGIC,1)
60#define VIPER_DIO_CLEAR \
61 _IOW(VIPER_DIO_IOC_MAGIC,2,unsigned char)
64#define VIPER_DIO_SET \
65 _IOW(VIPER_DIO_IOC_MAGIC,3,unsigned char)
69#define VIPER_DIO_SET_TO_VAL \
70 _IOW(VIPER_DIO_IOC_MAGIC,4,unsigned char[2])
73#define VIPER_DIO_GET_DOUT \
74 _IOR(VIPER_DIO_IOC_MAGIC,5,unsigned char)
77#define VIPER_DIO_GET_DIN \
78 _IOR(VIPER_DIO_IOC_MAGIC,6,unsigned char)
80#define VIPER_DIO_IOC_MAXNR 6
82#define VIPER_DIO_NOUT 8
84#define VIPER_DIO_NIN 8
89#include <linux/version.h>
92#include <linux/device.h>
93#include <linux/cdev.h>
95#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)
96#include <mach/viper.h>
98#include <asm/arch/viper.h>
104#define _VIPER_GPIO_PHYS (VIPER_CPLD_PHYS + 0x500000)
106#define VIPER_GPIO __VIPER_CPLD_REG(_VIPER_GPIO_PHYS)
117#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
118 struct mutex reg_mutex;
120 struct semaphore reg_mutex;
123 struct class* vclass;
static string device
Definition sing.cc:60