Add reversed aguiledbelt HIDL HAL

This commit is contained in:
Peter Cai 2023-04-23 13:14:53 -04:00
parent bfc4cd8de6
commit a426233cb6
5 changed files with 55 additions and 0 deletions

5
interfaces/Android.bp Normal file
View File

@ -0,0 +1,5 @@
hidl_package_root {
name: "vendor",
path: "device/peter/gsi/interfaces/vendor",
}

View File

@ -0,0 +1,16 @@
// This file is autogenerated by hidl-gen -Landroidbp.
hidl_interface {
name: "vendor.mediatek.hardware.aguiledbelt@1.0",
root: "vendor",
system_ext_specific: true,
srcs: [
"types.hal",
"IAguiLedBeltLight.hal",
"ILedBeltLightCallback.hal",
],
interfaces: [
"android.hidl.base@1.0",
],
gen_java: true,
}

View File

@ -0,0 +1,14 @@
package vendor.mediatek.hardware.aguiledbelt@1.0;
import vendor.mediatek.hardware.aguiledbelt@1.0::ILedBeltLightCallback;
interface IAguiLedBeltLight {
setLedBeltLightMusicState(uint32_t lightId, uint32_t color, uint32_t brightness, bool isRandom);
setLedBeltLightAtomphereState(uint32_t lightId, uint32_t color, uint32_t brightness);
setLedBeltLightState(uint32_t type, uint32_t color, uint32_t brightness);
setLedBeltBrightnessState(uint32_t lightId, uint32_t color, uint32_t brightness, bool isRandom);
setLedBeltPatternSettingsState(uint32_t lightId, uint32_t color, uint32_t brightness, bool isRandom);
setLedBeltAlwaysOnState(uint32_t lightId, uint32_t color, uint32_t brightness, bool isRandom);
setCallback(ILedBeltLightCallback callback);
setLedBeltChargingState(uint32_t lightId, uint32_t color);
};

View File

@ -0,0 +1,5 @@
package vendor.mediatek.hardware.aguiledbelt@1.0;
interface ILedBeltLightCallback {
onStateChanged(uint32_t id, uint32_t state);
};

View File

@ -0,0 +1,15 @@
package vendor.mediatek.hardware.aguiledbelt@1.0;
enum LedBeltType: uint8_t {
BATTERY = 0x64,
WLR_BATTERY = 0x65,
NOTIFICATIONS = 0x66,
CALL = 0x67,
LIGHT_ID_VOICE_ASSISTANT = 0x68,
MUSIC = 0x6b,
LIGHT_ID_FLIP = 0x6c,
BRIGHTNESS = 0x6e,
ATMOSPHERE = 0x6f,
PATTERN_SETTINGS = 0x70,
ALWAYS_ON = 0x71,
};