universal7885: fm-hidl -> fm-aidl

This commit is contained in:
roynatech2544 2022-10-05 09:59:31 +00:00
commit a8eed8f2aa
4 changed files with 87 additions and 0 deletions

View file

@ -0,0 +1,9 @@
aidl_interface {
name: "vendor.eureka.hardware.fmradio",
srcs: ["vendor/eureka/hardware/fmradio/*.aidl"],
backend: {
ndk: {
enabled: true,
},
},
}

View file

@ -0,0 +1,21 @@
// Copyright (C) 2022 Eureka Team
//
// 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 vendor.eureka.hardware.fmradio;
@Backing(type="int")
enum Direction {
UP,
DOWN,
}

View file

@ -0,0 +1,33 @@
// Copyright (C) 2022 Eureka Team
//
// 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 vendor.eureka.hardware.fmradio;
import vendor.eureka.hardware.fmradio.Direction;
import vendor.eureka.hardware.fmradio.Status;
import vendor.eureka.hardware.fmradio.Space;
interface IFMRadio {
void adjustFreqByStep(in Direction dir);
Space getChannelSpacing();
int getFreqFromSysfs();
boolean isAvailable();
void setChannelSpacing(in Space space);
void setManualFreq(in float freq);
}

View file

@ -0,0 +1,24 @@
// Copyright (C) 2022 Eureka Team
//
// 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 vendor.eureka.hardware.fmradio;
@Backing(type="int")
enum Space {
CHANNEL_SPACING_10HZ = 1,
CHANNEL_SPACING_20HZ,
CHANNEL_SPACING_30HZ,
CHANNEL_SPACING_40HZ,
CHANNEL_SPACING_50HZ = 5,
}