Xenomai API
2.5.6.1
|
00001 00021 #ifndef __ANALOGY_8255_H__ 00022 #define __ANALOGY_8255_H__ 00023 00024 #include <analogy/analogy_driver.h> 00025 00026 typedef int (*a4l_8255_cb_t)(int, int, int, unsigned long); 00027 00028 typedef struct subd_8255_struct { 00029 unsigned long cb_arg; 00030 a4l_8255_cb_t cb_func; 00031 unsigned int status; 00032 int have_irq; 00033 int io_bits; 00034 } subd_8255_t; 00035 00036 #if (defined(CONFIG_XENO_DRIVERS_ANALOGY_8255) || \ 00037 defined(CONFIG_XENO_DRIVERS_ANALOGY_8255_MODULE)) 00038 00039 #define _8255_SIZE 4 00040 00041 #define _8255_DATA 0 00042 #define _8255_CR 3 00043 00044 #define CR_C_LO_IO 0x01 00045 #define CR_B_IO 0x02 00046 #define CR_B_MODE 0x04 00047 #define CR_C_HI_IO 0x08 00048 #define CR_A_IO 0x10 00049 #define CR_A_MODE(a) ((a)<<5) 00050 #define CR_CW 0x80 00051 00052 void subdev_8255_init(a4l_subd_t *subd); 00053 void subdev_8255_interrupt(a4l_subd_t *subd); 00054 00055 #else /* !CONFIG_XENO_DRIVERS_ANALOGY_8255 */ 00056 00057 #define subdev_8255_init(x) do { } while(0) 00058 #define subdev_8255_interrupt(x) do { } while(0) 00059 00060 #endif /* CONFIG_XENO_DRIVERS_ANALOGY_8255 */ 00061 00062 #endif /* !__ANALOGY_8255_H__ */