![]() |
gpio
1.4.2
General Purpose I/O Package
|
Macros | |
| #define | APP_EC_OK 0 |
| success exit code | |
| #define | APP_EC_ARGS 2 |
| command-line options/arguments error exit code | |
| #define | APP_EC_EXEC 4 |
| execution exit code | |
Functions | |
| static int | strToInt (const string &str, int &val) |
| static int | strToBits (const string &str, byte_t *p) |
| static void | mainInit (int argc, char *argv[]) |
| Main initialization. More... | |
| static int | sysfsProbe (gpio_info_t *pInfo) |
| Probe GPIO state. More... | |
| static int | sysfsProbeAndPrint () |
| int | main (int argc, char *argv[]) |
| Main. More... | |
Variables | |
| static char * | Argv0 |
| the command | |
| static char * | OptsMethod = (char *)"sysfs" |
| system file system | |
| static int | ArgsGpio |
| gpio number | |
| static OptsPgmInfo_T | PgmInfo |
| Program information. More... | |
| static OptsInfo_T | OptsInfo [] |
| Command line options information. More... | |
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Main.
| argc | Command-line argument count. |
| argv | Command-line argument list. |
Definition at line 400 of file gpioprobe.cxx.
References APP_EC_ARGS, mainInit(), and OptsMethod.
|
static |
Main initialization.
| argc | Command-line argument count. |
| argv | Command-line argument list. |
Definition at line 163 of file gpioprobe.cxx.
References APP_EC_ARGS, ArgsGpio, Argv0, OptsInfo, PgmInfo, and PkgInfo.
Referenced by main().
|
static |
Probe GPIO state.
Method: sysfs
| [out] | pInfo | Pointer to GPIO info. |
Definition at line 196 of file gpioprobe.cxx.
References APP_EC_EXEC, APP_EC_OK, ArgsGpio, gpio_info_t::dir, gpio_info_t::edge, gpio_info_t::gpio, GPIO_DIR_IN, GPIO_DIR_IN_STR, GPIO_DIR_OUT, GPIO_DIR_OUT_STR, GPIO_EDGE_BOTH, GPIO_EDGE_BOTH_STR, GPIO_EDGE_FALLING, GPIO_EDGE_FALLING_STR, GPIO_EDGE_NONE, GPIO_EDGE_NONE_STR, GPIO_EDGE_RISING, GPIO_EDGE_RISING_STR, GPIO_PULL_DN, GPIO_PULL_DN_STR, GPIO_PULL_DS_STR, GPIO_PULL_UP, GPIO_PULL_UP_STR, gpioProbe(), gpio_info_t::pin, and gpio_info_t::value.
|
static |
Command line options information.
Definition at line 82 of file gpioprobe.cxx.
Referenced by mainInit().
|
static |
Program information.
Definition at line 64 of file gpioprobe.cxx.
Referenced by mainInit().