diff options
author | Matt Spinler <spinler@us.ibm.com> | 2017-05-25 10:17:13 -0500 |
---|---|---|
committer | Matt Spinler <spinler@us.ibm.com> | 2017-05-25 11:18:49 -0500 |
commit | 936a504319e01642fc5803c00ff4aa5baeafacef (patch) | |
tree | 43bb5b97599d6bbd8f74b5a7ee4fee4d1eb94a19 | |
parent | 77ec47996d0c8b78d0f08d17fed8ff03107a1e03 (diff) | |
download | phosphor-gpio-monitor-936a504319e01642fc5803c00ff4aa5baeafacef.tar.gz phosphor-gpio-monitor-936a504319e01642fc5803c00ff4aa5baeafacef.zip |
Create phosphor-gpio-util framework
This application can write GPIOs. Read support may
be added in the future.
Aside from just setting a GPIO low or high, it can
also do: 0 -> <delay> -> 1 or 1 -> <delay> -> 0.
All functionality will be added in future commits
Change-Id: I2d3c761eb909ddce3952bfb3173ce271f03544ba
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | gpio-util/Makefile.am | 8 | ||||
-rw-r--r-- | gpio-util/main.cpp | 20 |
5 files changed, 34 insertions, 5 deletions
@@ -36,14 +36,15 @@ Makefile.in /texinfo.tex # Repo specific items -/*.o +*.o /config.h /config.h.in~ /config.log /config.status /phosphor-gpio-monitor -/Makefile -/.deps +Makefile +.deps /*-libtool /test/.deps /test/Makefile +phosphor-gpio-util diff --git a/Makefile.am b/Makefile.am index 3e55c5b..d664672 100644 --- a/Makefile.am +++ b/Makefile.am @@ -17,4 +17,4 @@ phosphor_gpio_monitor_CXXFLAGS = $(SYSTEMD_CFLAGS) \ $(PHOSPHOR_LOGGING_CFLAGS) \ $(LIBEVDEV_CFLAGS) -SUBDIRS = test +SUBDIRS = test gpio-util diff --git a/configure.ac b/configure.ac index 4a05a22..ae95205 100644 --- a/configure.ac +++ b/configure.ac @@ -46,5 +46,5 @@ AS_IF([test "x$enable_oe_sdk" == "xyes"], ) # Create configured output -AC_CONFIG_FILES([Makefile test/Makefile]) +AC_CONFIG_FILES([Makefile gpio-util/Makefile test/Makefile]) AC_OUTPUT diff --git a/gpio-util/Makefile.am b/gpio-util/Makefile.am new file mode 100644 index 0000000..ea8c763 --- /dev/null +++ b/gpio-util/Makefile.am @@ -0,0 +1,8 @@ +AM_DEFAULT_SOURCE_EXT = .cpp +AM_CPPFLAGS = -iquote ${top_srcdir} + +sbin_PROGRAMS = \ + phosphor-gpio-util + +phosphor_gpio_util_SOURCES = \ + main.cpp diff --git a/gpio-util/main.cpp b/gpio-util/main.cpp new file mode 100644 index 0000000..b8801aa --- /dev/null +++ b/gpio-util/main.cpp @@ -0,0 +1,20 @@ +/** + * Copyright © 2017 IBM Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +int main(int argc, char** argv) +{ + return 0; +} |