From: Bartosz Golaszewski Date: Thu, 22 Jun 2017 19:16:40 +0000 (+0200) Subject: README: improve readability of examples X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=fdd037c0dd20cd5dfaa3fbefa6d2dd3a523f525d;p=qemu-gpiodev%2Flibgpiod.git README: improve readability of examples We're using the same character for comments and the command prompt. That's not very readable. Use '$' as prompt. Signed-off-by: Bartosz Golaszewski --- diff --git a/README.md b/README.md index 6004fc1..643de06 100644 --- a/README.md +++ b/README.md @@ -69,42 +69,42 @@ There are currently six command-line tools available: Examples: # Read the value of a single GPIO line. - # gpioget gpiochip1 23 + $ gpioget gpiochip1 23 0 # Read two values at the same time. Set the active state of the lines # to low. - # gpioget --active-low gpiochip1 23 24 + $ gpioget --active-low gpiochip1 23 24 1 1 # Set values of two lines, then daemonize and wait for a signal (SIGINT or # SIGTERM) before releasing them. - # gpioset --mode=signal --background gpiochip1 23=1 24=0 + $ gpioset --mode=signal --background gpiochip1 23=1 24=0 # Set the value of a single line, then exit immediately. This is useful # for floating pins. - # gpioset gpiochip1 23=1 + $ gpioset gpiochip1 23=1 # Find a GPIO line by name. - # gpiofind "USR-LED-2" + $ gpiofind "USR-LED-2" gpiochip1 23 # Toggle a GPIO by name, then wait for the user to press ENTER. - # gpioset --mode=wait `gpiofind "USR-LED-2"`=1 + $ gpioset --mode=wait `gpiofind "USR-LED-2"`=1 # Wait for three rising edge events on a single GPIO line, then exit. - # gpiomon --num-events=3 --rising-edge gpiochip2 3 + $ gpiomon --num-events=3 --rising-edge gpiochip2 3 event: RISING EDGE offset: 3 timestamp: [ 1151.814356387] event: RISING EDGE offset: 3 timestamp: [ 1151.815449803] event: RISING EDGE offset: 3 timestamp: [ 1152.091556803] # Wait for a single falling edge event. Specify a custom output format. - # gpiomon --format="%e %o %s %n" --falling-edge gpiochip1 4 + $ gpiomon --format="%e %o %s %n" --falling-edge gpiochip1 4 0 4 1156 615459801 # Pause execution until a single event of any type occurs. Don't print # anything. Find the line by name. - # gpiomon --num-events=1 --silent `gpiofind "USR-IN"` + $ gpiomon --num-events=1 --silent `gpiofind "USR-IN"` TESTING -------