Dioctl

From embeddedTS Manuals

dioctl is a userspace driver utility to manage the GPIO that goes through the FPGA.

Overview

To manipulate the GPIO controller we have implemented in the FPGA we have created dioctl. This provides a consistant and simple way for managing dio with different boards.

Usage

Help

General options:
-a | --arch               display what arches this binary supports
-s | --server=<port>      Daemonize and run as server listening on port
-o | --poll=rate          milliseconds between DIO polls (0 = never poll)
-f | --file=board        read the config definitions for the specified board
-p | --port=<host><:port> Talk to dioctl server
-g | --getcaps            Get DIO capabilities
-m | --model              Get model id of board
-l | --lookup=name        Get logical DIO number from DIO name
-L | --lookup=name:value  Get full DIO name from partial match and value
-D | --define=name:DIOnum Associate new name with logical DIO number
-U | --undef=name         De-Associate name with logical DIO number
-r | --read=DIOnum        Read the state of the specified DIO
-1 | --1=DIOnum           set the specified DIO to output and drive high
-0 | --0=DIOnum           set the specified DIO to output and drive low
-i | --input=DIOnum       set the specified DIO to an input
-G | --group=num:val1...  set the specified DIO Group number to the list of DIOs
-w | --wait=num:val1...   wait for any DIO in the specified group number to be the given value
-W | --wait=num:val       wait for the specified DIO number to read as the given value
-t | --test               test macro-controller with base board
-B | --bus=debuglevel     log bus cycle accesses to stderr
-d | --dump               dump a table of the current servers DIO mappings

    To specify a DIO group where a DIO number is expected, add 1000 to the group number.
    Otherwise, DIOnum can be specified by an absolute DIO number, a DIO name, or
    the connector name.