Connor O'Brien | bf5cddb | 2016-12-02 16:21:25 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 The Android Open Source Project |
| 3 | * |
| 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 |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 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. |
| 15 | */ |
| 16 | |
| 17 | package android.hardware.ir@1.0; |
| 18 | |
| 19 | interface IConsumerIr { |
Andreas Huber | 3e4acb8 | 2017-03-28 14:40:58 -0700 | [diff] [blame] | 20 | /** |
Connor O'Brien | bf5cddb | 2016-12-02 16:21:25 -0800 | [diff] [blame] | 21 | * transmit() sends an IR pattern at a given carrierFreq. |
| 22 | * |
| 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. |
| 26 | * |
| 27 | * This call must return when the transmit is complete or encounters an error. |
| 28 | * |
| 29 | * returns: true on success, false on error. |
| 30 | */ |
Connor O'Brien | 7a4e7eb | 2016-12-19 15:55:12 -0800 | [diff] [blame] | 31 | transmit(int32_t carrierFreq, vec<int32_t> pattern) generates (bool success); |
Connor O'Brien | bf5cddb | 2016-12-02 16:21:25 -0800 | [diff] [blame] | 32 | |
Andreas Huber | 3e4acb8 | 2017-03-28 14:40:58 -0700 | [diff] [blame] | 33 | /** |
Connor O'Brien | bf5cddb | 2016-12-02 16:21:25 -0800 | [diff] [blame] | 34 | * getCarrierFreqs() enumerates which frequencies the IR transmitter supports. |
| 35 | * |
| 36 | * returns: On success, true and a vector of all supported frequency |
| 37 | * ranges. On error, returns false. |
| 38 | */ |
| 39 | getCarrierFreqs() generates (bool success, vec<ConsumerIrFreqRange> ranges); |
| 40 | }; |