MOXA linux-2.6.x / linux-2.6.9-uc0 from sdlinux-moxaart.tgz
[linux-2.6.9-moxart.git] / include / asm-arm / arch-moxacpu / gpio.h
blobb78b62a00168a210cf471ca2bdb265e4db53d664
2 #ifndef _MOXACPU_GPIO_H
3 #define _MOXACPU_GPIO_H
5 typedef struct _mcpu_gpio_reg_struct {
6 unsigned int data_out;
7 unsigned int data_in;
8 unsigned int pin_dir; // 1 for output, 0 for input
9 unsigned int reserved;
10 unsigned int data_set;
11 unsigned int data_clear;
12 unsigned int pin_pull_enable;
13 unsigned int pin_pull_type;
14 unsigned int int_enable;
15 unsigned int int_raw_state;
16 unsigned int int_masked_state;
17 unsigned int int_mask;
18 unsigned int int_clear;
19 unsigned int int_trigger;
20 unsigned int int_both;
21 unsigned int int_rise_neg;
22 unsigned int bounce_enable;
23 unsigned int bounce_pre_scale;
24 } mcpu_gpio_reg_t;
26 #define MCPU_GPIO_INPUT 0
27 #define MCPU_GPIO_OUTPUT 1
28 #define MCPU_GPIO_HIGH 1
29 #define MCPU_GPIO_LOW 0
31 extern void mcpu_gpio_inout(u32 gpio, int inout);
32 extern u32 mcpu_gpio_get_inout(u32 gpio);
33 extern void mcpu_gpio_set(u32 gpio, int highlow);
34 extern u32 mcpu_gpio_get(u32 gpio);
35 extern void mcpu_gpio_mp_set(u32 gpio);
36 extern void mcpu_gpio_mp_clear(u32 gpio);
38 #endif // _MOXACPU_GPIO_H