2 * Copyright 2016 The Android Open Source Project
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package android.hardware.ir@1.0;
19 interface IConsumerIr {
21 * transmit() sends an IR pattern at a given carrierFreq.
23 * The pattern is alternating series of carrier on and off periods measured in
24 * microseconds. The carrier should be turned off at the end of a transmit
25 * even if there are and odd number of entries in the pattern array.
27 * This call must return when the transmit is complete or encounters an error.
29 * returns: true on success, false on error.
31 transmit(int32_t carrierFreq, vec<int32_t> pattern, int32_t patternLen) generates (bool success);
34 * getCarrierFreqs() enumerates which frequencies the IR transmitter supports.
36 * returns: On success, true and a vector of all supported frequency
37 * ranges. On error, returns false.
39 getCarrierFreqs() generates (bool success, vec<ConsumerIrFreqRange> ranges);