gpiotool 应用方式
- 原创
- |
- 浏览:750
- |
- 更新:
简单介绍嵌入式ARM 系统下Gpio工具的应用
方法/步骤
登陆IMM系统,在串口下查看系统状态
$ cd /usr/local/bin/
./gpiotool
- 此文章未经许可获取自百度经验
Gpio Test Tool - Copyright (c) 2006 - 2007 cetc.
Usage : gpiotool <gpionumber> <option> [--verbose]
--get-dir: Get the specified gpio's direction
--set-dir-input: Set the specified gpio to be an input
--set-dir-output: Set the specified gpio to be an output
--get-pol: Get the specified gpio polarity
--set-pol-high: Set the specified gpio polarity
--set-pol-low: Set the specified gpio polarity
--get-pull-up-down: Get the specified gpio pull-up/pull-down control bits
--set-pull-down: Set Internal Pull-down enabled for specified gpio
--set-pull-up: Set Internal Pull-up enabled for specified gpio
--set-no-pull-up-down: Set No pull-up/Pull-down for the specified gpio
--get-gpios-data: Get the data for multiple gpios, with spaces between each number
--set-gpios-high: Set the data to high for multiple gpios, with spaces between each number
--set-gpios-low: Set the data to low for multiple gpios, with spaces between each number
--get-gpios-dir: Get the direction for multiple gpios, with spaces between each number
--set-gpios-dir-input: Set the direction to input for multiple gpios, with spaces between each number
--set-gpios-dir-output: Set the direction to output for multiple gpios, with spaces between each number
--get-data: Get the specified gpio's data
--set-data-high: Set the specified gpio high
--set-data-low: Set the specified gpio low
--set-od-high: Set the specified gpio as open drain output line with high level
--set-od-low: Set the specified gpio as open drain output line with low level
--set-gpio-ints: Set the gpio interrupts (as specified in the code)
--wait-for-ints: Wait for the gpio interrupts (as specified in the code)
--set-sgpio-int-cont-mode: Set the continous mode after interrupt
--reset-gpio-ints: Reset the gpio interrupts
--enable-debouncing: Enable GPIO Debouncing
--disable-debouncing: Disable GPIO Debouncing
--get-debounce-event: Get GPIO Debounce event
--get-debounce-clock: Get GPIO Debounce clock value
--set-debounce-clock: set GPIO Debounce clock value
--reg-reading-on-int: Register the reding address on gpio interrupt
--get-reading-on-int: Get Registered reading on gpio interrupt.
--verbose: Verbose for Debugging messages
翻译提示步骤,查看使用格式
$ ./gpiotool 19 --set-dir-output /*设置方向*/
$ ./gpiotool 19 --get-dir /*查看方向*/
Output Pin
$ ./gpiotool 19 --get-data /*查看高低*/
Pin is High
$ ./gpiotool 19 --set-data-low /*拉低*/
END