summaryrefslogtreecommitdiffstats
path: root/ir
diff options
context:
space:
mode:
authorConnor O'Brien <connoro@google.com>2016-12-02 16:21:25 -0800
committerConnor O'Brien <connoro@google.com>2016-12-12 11:25:17 -0800
commitbf5cddbea0e26fb3595b01dffac6c83a45e5a4b1 (patch)
tree4f5a1dec56be2f43d5ed676b1b39afa478561a70 /ir
parent827e0386510a29159296a16d5f8e5cc34b8141a8 (diff)
downloadplatform_hardware_interfaces-bf5cddbea0e26fb3595b01dffac6c83a45e5a4b1.tar.gz
platform_hardware_interfaces-bf5cddbea0e26fb3595b01dffac6c83a45e5a4b1.tar.bz2
platform_hardware_interfaces-bf5cddbea0e26fb3595b01dffac6c83a45e5a4b1.zip
consumerir: define the consumerir HIDL interface
Change-Id: Ifa8632915f8c5bb15da5f379202f5ddf2e08c09a Signed-off-by: Connor O'Brien <connoro@google.com>
Diffstat (limited to 'ir')
-rw-r--r--ir/1.0/Android.bp56
-rw-r--r--ir/1.0/Android.mk118
-rw-r--r--ir/1.0/IConsumerIr.hal40
-rw-r--r--ir/1.0/types.hal24
-rw-r--r--ir/Android.bp4
5 files changed, 242 insertions, 0 deletions
diff --git a/ir/1.0/Android.bp b/ir/1.0/Android.bp
new file mode 100644
index 0000000000..9badd6f2d9
--- /dev/null
+++ b/ir/1.0/Android.bp
@@ -0,0 +1,56 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+genrule {
+ name: "android.hardware.ir@1.0_genc++",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.ir@1.0",
+ srcs: [
+ "types.hal",
+ "IConsumerIr.hal",
+ ],
+ out: [
+ "android/hardware/ir/1.0/types.cpp",
+ "android/hardware/ir/1.0/ConsumerIrAll.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.ir@1.0_genc++_headers",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.ir@1.0",
+ srcs: [
+ "types.hal",
+ "IConsumerIr.hal",
+ ],
+ out: [
+ "android/hardware/ir/1.0/types.h",
+ "android/hardware/ir/1.0/IConsumerIr.h",
+ "android/hardware/ir/1.0/IHwConsumerIr.h",
+ "android/hardware/ir/1.0/BnConsumerIr.h",
+ "android/hardware/ir/1.0/BpConsumerIr.h",
+ "android/hardware/ir/1.0/BsConsumerIr.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.ir@1.0",
+ generated_sources: ["android.hardware.ir@1.0_genc++"],
+ generated_headers: ["android.hardware.ir@1.0_genc++_headers"],
+ export_generated_headers: ["android.hardware.ir@1.0_genc++_headers"],
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "android.hidl.base@1.0",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "android.hidl.base@1.0",
+ ],
+}
diff --git a/ir/1.0/Android.mk b/ir/1.0/Android.mk
new file mode 100644
index 0000000000..5d29b30f38
--- /dev/null
+++ b/ir/1.0/Android.mk
@@ -0,0 +1,118 @@
+# This file is autogenerated by hidl-gen. Do not edit manually.
+
+LOCAL_PATH := $(call my-dir)
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.ir@1.0-java
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(local-generated-sources-dir)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_JAVA_LIBRARIES := \
+ android.hidl.base@1.0-java \
+
+
+#
+# Build types.hal (ConsumerIrFreqRange)
+#
+GEN := $(intermediates)/android/hardware/ir/1.0/ConsumerIrFreqRange.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.ir@1.0::types.ConsumerIrFreqRange
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IConsumerIr.hal
+#
+GEN := $(intermediates)/android/hardware/ir/1.0/IConsumerIr.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IConsumerIr.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.ir@1.0::IConsumerIr
+
+$(GEN): $(LOCAL_PATH)/IConsumerIr.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_JAVA_LIBRARY)
+
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.ir@1.0-java-static
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(local-generated-sources-dir)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+ android.hidl.base@1.0-java-static \
+
+
+#
+# Build types.hal (ConsumerIrFreqRange)
+#
+GEN := $(intermediates)/android/hardware/ir/1.0/ConsumerIrFreqRange.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.ir@1.0::types.ConsumerIrFreqRange
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IConsumerIr.hal
+#
+GEN := $(intermediates)/android/hardware/ir/1.0/IConsumerIr.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IConsumerIr.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.ir@1.0::IConsumerIr
+
+$(GEN): $(LOCAL_PATH)/IConsumerIr.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/ir/1.0/IConsumerIr.hal b/ir/1.0/IConsumerIr.hal
new file mode 100644
index 0000000000..f928c0ecd6
--- /dev/null
+++ b/ir/1.0/IConsumerIr.hal
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2016 The Android Open Source Project
+ *
+ * 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.
+ */
+
+package android.hardware.ir@1.0;
+
+interface IConsumerIr {
+ /*
+ * transmit() sends an IR pattern at a given carrierFreq.
+ *
+ * The pattern is alternating series of carrier on and off periods measured in
+ * microseconds. The carrier should be turned off at the end of a transmit
+ * even if there are and odd number of entries in the pattern array.
+ *
+ * This call must return when the transmit is complete or encounters an error.
+ *
+ * returns: true on success, false on error.
+ */
+ transmit(int32_t carrierFreq, vec<int32_t> pattern, int32_t patternLen) generates (bool success);
+
+ /*
+ * getCarrierFreqs() enumerates which frequencies the IR transmitter supports.
+ *
+ * returns: On success, true and a vector of all supported frequency
+ * ranges. On error, returns false.
+ */
+ getCarrierFreqs() generates (bool success, vec<ConsumerIrFreqRange> ranges);
+};
diff --git a/ir/1.0/types.hal b/ir/1.0/types.hal
new file mode 100644
index 0000000000..9c65de6a07
--- /dev/null
+++ b/ir/1.0/types.hal
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2016 The Android Open Source Project
+ *
+ * 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.
+ */
+
+package android.hardware.ir@1.0;
+
+struct ConsumerIrFreqRange {
+ uint32_t min;
+
+ uint32_t max;
+
+};
diff --git a/ir/Android.bp b/ir/Android.bp
new file mode 100644
index 0000000000..bbb3e4bac0
--- /dev/null
+++ b/ir/Android.bp
@@ -0,0 +1,4 @@
+// This is an autogenerated file, do not edit.
+subdirs = [
+ "1.0",
+]