summaryrefslogtreecommitdiffstats
path: root/mainapp.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add clang-format to repoPatrick Venture2018-11-011-13/+11
| | | | | | | Add clang-format to repo. Change-Id: I3f8704d80dd0bdde0706ab189c68cffe6d347995 Signed-off-by: Patrick Venture <venture@google.com>
* Add --continue argumentLei YU2018-04-121-2/+9
| | | | | | | | | | | | | | | | | | | | The monitor will exit when key is pressed. Add --continue argument and if it is set to "true", the monitor will continue after key is pressed. This is useful in cases to monitor a button presses. E.g. It can be used to monitor ID button and start a system unit everytime when the button is pressed. This argument is optional so it does not break the current code. Tested: With "--continue=true", the monitor does not exit when the key is pressed. Without the argument of if it is set to other strings, the monitor exits after the key is pressed. Change-Id: I4f2ca16d7b26e10397181c83c2c5947ed5ce091f Signed-off-by: Lei YU <mine260309@gmail.com>
* Call defined target when GPIO line is assertedVishwanatha Subbanna2017-04-271-2/+14
| | | | | Change-Id: Ia5445a8d6585acfec69783ba158c8d866d526e97 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Add sd_event loop and callback handlerVishwanatha Subbanna2017-04-271-2/+17
| | | | | Change-Id: I032d1156be2b8082fdf347a60ec883a9bc0038ae Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Populate the file descriptor for the deviceVishwanatha Subbanna2017-04-261-2/+5
| | | | | | | | | | | On a GPIO chip, there could be many gpio lines and for each line, there would be a corresponding input device event file. To know the assertion state of a GPIO line, a descriptor is needed. This descriptor will later be plugged into sd_event so that the GPIO state changes can be caught and handled. Change-Id: Idc8c2b429688fea2a5124b96677085b1be48128b Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Add code to accept command line argumentsVishwanatha Subbanna2017-04-261-0/+64
Accepts command line arguments for path, interested GPIO transition and an optional systemd unit file to be called into when the GPIO transitions per expectation. Change-Id: I98d967d36cfbb768bc9d0dd04517575fa7e408fe Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
OpenPOWER on IntegriCloud