• Johny Lin's avatar
    Polld: support GPIO read/write · 97b40772
    Johny Lin authored
    extension for touch panel fixture usage.
    
    BUG=None
    TEST=Manually on Beaglebone
      1. Check help string
         $ python poll_client.py -h
    
      2. Start polld
         $ python polld.py -d
    
      3. Check gpio7 is not exported yet
         $ ls -d /sys/class/gpio/gpio7 # should fail
    
      4. Run poll_client to poll gpio7
         $ python poll_client.py -r 100 gpio_falling:7
    
         Connect voltage 3.3V to GPIO7, then change to GND.
         The client waiting for GPIO7 should be notified.
    
      5. Run poll_client to read/write gpio7
         $ python poll_client.py -r 1 gpio_read:7
         --> gpio7 = 0
         $ python poll_client.py -r 1 gpio_set1:7
         $ python poll_client.py -r 1 gpio_read:7
         --> gpio7 = 1
         $ python poll_client.py -r 1 gpio_set0:7
         $ python poll_client.py -r 1 gpio_read:7
         --> gpio7 = 0
    
      6. Stop polld.py by Ctrl+C or SIGTERM.
         Check gpio7 under sysfs are unexported again.
    
    Change-Id: I6e8aff6dd36a803a00bc180e21b7ba6e149d89b0
    Reviewed-on: https://chromium-review.googlesource.com/266960Tested-by: default avatarPin-chih Lin <johnylin@chromium.org>
    Reviewed-by: default avatarPin-chih Lin <johnylin@chromium.org>
    Commit-Queue: Pin-chih Lin <johnylin@chromium.org>
    97b40772
Name
Last commit
Last update
..
poll_client.py Loading commit data...
poll_common.py Loading commit data...
poll_gpio.py Loading commit data...
poll_server.py Loading commit data...
polld.py Loading commit data...