diff options
author | Wolfgang Denk <wd@denx.de> | 2010-04-08 00:06:31 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-04-08 00:06:31 +0200 |
commit | 6a1f7e54c2dd8888dbc118e8de372dec29a0a9c5 (patch) | |
tree | df5b6d67be790d75e60f8fcd97360fc1f179ab0d /doc/README.s5pc1xx | |
parent | d8bc0a2889700ba063598de6d4e7d135360b537e (diff) | |
parent | b5045cdda556c73e2697cd1d3ea6563315cbf490 (diff) | |
download | u-boot-imx-6a1f7e54c2dd8888dbc118e8de372dec29a0a9c5.zip u-boot-imx-6a1f7e54c2dd8888dbc118e8de372dec29a0a9c5.tar.gz u-boot-imx-6a1f7e54c2dd8888dbc118e8de372dec29a0a9c5.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'doc/README.s5pc1xx')
-rw-r--r-- | doc/README.s5pc1xx | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/doc/README.s5pc1xx b/doc/README.s5pc1xx index 5a0fe33..ab1f024 100644 --- a/doc/README.s5pc1xx +++ b/doc/README.s5pc1xx @@ -41,7 +41,23 @@ To check SoC: printf("cpu is s5pc110\n"); gpio - not supported yet. + + struct s5pc100_gpio *gpio = (struct s5pc100_gpio*)S5PC100_GPIO_BASE; + + /* GPA[0] pin set to irq */ + gpio_cfg_pin(&gpio->gpio_a, 0, GPIO_IRQ); + + /* GPA[0] pin set to input */ + gpio_direction_input(&gpio->gpio_a, 0); + + /* GPA[0] pin set to output/high */ + gpio_direction_output(&gpio->gpio_a, 0, 1); + + /* GPA[0] value set to low */ + gpio_set_value(&gpio->gpio_a, 0, 0); + + /* get GPA[0] value */ + value = gpio_get_value(&gpio->gpio_a, 0); Links ===== |