Update deps. Fixes to runtime

This commit is contained in:
Luke D. Jones
2022-11-07 09:47:15 +13:00
parent efc752cce6
commit 5f4e950819
8 changed files with 83 additions and 133 deletions

View File

@@ -7,26 +7,33 @@ use zbus_macros::dbus_proxy;
)]
trait Anime {
/// Set whether the AniMe will show boot, suspend, or off animations
#[inline]
fn set_boot_on_off(&self, status: bool) -> zbus::Result<()>;
/// Set the global AniMe brightness
#[inline]
fn set_brightness(&self, bright: f32) -> zbus::Result<()>;
/// Set whether the AniMe is displaying images/data
#[inline]
fn set_on_off(&self, status: bool) -> zbus::Result<()>;
/// Writes a data stream of length. Will force system thread to exit until it is restarted
#[inline]
fn write(&self, input: AnimeDataBuffer) -> zbus::Result<()>;
/// Get status of if the AniMe LEDs are on
#[inline]
#[dbus_proxy(property)]
fn awake_enabled(&self) -> zbus::Result<bool>;
/// Get the status of if factory system-status animations are enabled
#[inline]
#[dbus_proxy(property)]
fn boot_enabled(&self) -> zbus::Result<bool>;
/// Notify listeners of the status of AniMe LED power and factory system-status animations
#[inline]
#[dbus_proxy(signal)]
fn power_states(&self, data: AnimePowerStates) -> zbus::Result<()>;
}

View File

@@ -34,46 +34,60 @@ const BLOCKING_TIME: u64 = 40; // 100ms = 10 FPS, max 50ms = 20 FPS, 40ms = 25 F
)]
trait Led {
/// NextLedMode method
#[inline]
fn next_led_mode(&self) -> zbus::Result<()>;
/// PrevLedMode method
#[inline]
fn prev_led_mode(&self) -> zbus::Result<()>;
/// Toggle to next led brightness
#[inline]
fn next_led_brightness(&self) -> zbus::Result<()>;
/// Toggle to previous led brightness
#[inline]
fn prev_led_brightness(&self) -> zbus::Result<()>;
/// SetBrightness method
#[inline]
fn set_brightness(&self, brightness: LedBrightness) -> zbus::Result<()>;
/// SetLedMode method
#[inline]
fn set_led_mode(&self, effect: &AuraEffect) -> zbus::Result<()>;
#[inline]
fn set_leds_power(&self, options: AuraPowerDev, enabled: bool) -> zbus::Result<()>;
#[inline]
fn per_key_raw(&self, data: PerKeyRaw) -> zbus::fdo::Result<()>;
/// NotifyLed signal
#[inline]
#[dbus_proxy(signal)]
fn notify_led(&self, data: AuraEffect) -> zbus::Result<()>;
#[dbus_proxy(signal)]
#[inline]
fn notify_power_states(&self, data: AuraPowerDev) -> zbus::Result<()>;
/// LedBrightness property
#[inline]
#[dbus_proxy(property)]
fn led_brightness(&self) -> zbus::Result<i16>;
/// LedMode property
#[inline]
fn led_mode(&self) -> zbus::Result<AuraModeNum>;
/// LedModes property
#[inline]
fn led_modes(&self) -> zbus::Result<BTreeMap<AuraModeNum, AuraEffect>>;
// As property doesn't work for AuraPowerDev (complexity of serialization?)
// #[dbus_proxy(property)]
#[inline]
fn leds_enabled(&self) -> zbus::Result<AuraPowerDev>;
}

View File

@@ -28,52 +28,67 @@ use zbus_macros::dbus_proxy;
)]
trait RogBios {
/// DgpuDisable method
#[inline]
fn dgpu_disable(&self) -> zbus::Result<bool>;
/// EgpuEnable method
#[inline]
fn egpu_enable(&self) -> zbus::Result<bool>;
/// GpuMuxMode method
#[inline]
fn gpu_mux_mode(&self) -> zbus::Result<GpuMode>;
/// PanelOd method
#[inline]
fn panel_od(&self) -> zbus::Result<bool>;
/// PostBootSound method
#[inline]
fn post_boot_sound(&self) -> zbus::Result<i16>;
/// SetDgpuDisable method
#[inline]
fn set_dgpu_disable(&self, disable: bool) -> zbus::Result<()>;
/// SetEgpuEnable method
#[inline]
fn set_egpu_enable(&self, enable: bool) -> zbus::Result<()>;
/// SetGpuMuxMode method
#[inline]
fn set_gpu_mux_mode(&self, mode: GpuMode) -> zbus::Result<()>;
/// SetPanelOd method
#[inline]
fn set_panel_od(&self, overdrive: bool) -> zbus::Result<()>;
/// SetPostBootSound method
#[inline]
fn set_post_boot_sound(&self, on: bool) -> zbus::Result<()>;
/// NotifyDgpuDisable signal
#[inline]
#[dbus_proxy(signal)]
fn notify_dgpu_disable(&self, disable: bool) -> zbus::Result<()>;
/// NotifyEgpuEnable signal
#[inline]
#[dbus_proxy(signal)]
fn notify_egpu_enable(&self, enable: bool) -> zbus::Result<()>;
/// NotifyGpuMuxMode signal
#[inline]
#[dbus_proxy(signal)]
fn notify_gpu_mux_mode(&self, mode: GpuMode) -> zbus::Result<()>;
/// NotifyPanelOd signal
#[inline]
#[dbus_proxy(signal)]
fn notify_panel_od(&self, overdrive: bool) -> zbus::Result<()>;
/// NotifyPostBootSound signal
#[inline]
#[dbus_proxy(signal)]
fn notify_post_boot_sound(&self, on: bool) -> zbus::Result<()>;
}

View File

@@ -27,19 +27,24 @@ use zbus_macros::dbus_proxy;
)]
trait Power {
/// charge_control_end_threshold method
#[inline]
fn charge_control_end_threshold(&self) -> zbus::Result<u8>;
/// MainsOnline method
#[inline]
fn mains_online(&self) -> zbus::Result<bool>;
/// set_charge_control_end_threshold method
#[inline]
fn set_charge_control_end_threshold(&self, limit: u8) -> zbus::Result<()>;
/// NotifyCharge signal
#[inline]
#[dbus_proxy(signal)]
fn notify_charge_control_end_threshold(&self, limit: u8) -> zbus::Result<u8>;
/// NotifyMainsOnline signal
#[inline]
#[dbus_proxy(signal)]
fn notify_mains_online(&self, on: bool) -> zbus::Result<()>;
}

View File

@@ -31,44 +31,55 @@ use zbus_macros::dbus_proxy;
)]
trait Profile {
/// Get the fan-curve data for the currently active Profile
#[inline]
fn fan_curve_data(&self, profile: Profile) -> zbus::Result<FanCurveSet>;
/// Fetch the active profile name
#[inline]
fn active_profile(&self) -> zbus::Result<Profile>;
/// Get a list of profiles that have fan-curves enabled.
#[inline]
fn enabled_fan_profiles(&self) -> zbus::Result<Vec<Profile>>;
/// Toggle to next platform_profile. Names provided by `Profiles`.
/// If fan-curves are supported will also activate a fan curve for profile.
#[inline]
fn next_profile(&self) -> zbus::Result<()>;
/// Fetch profile names
#[inline]
fn profiles(&self) -> zbus::Result<Vec<Profile>>;
/// Set this platform_profile name as active
#[inline]
fn set_active_profile(&self, profile: Profile) -> zbus::Result<()>;
/// Set a profile fan curve enabled status. Will also activate a fan curve.
#[inline]
fn set_fan_curve_enabled(&self, profile: Profile, enabled: bool) -> zbus::Result<()>;
/// Set the fan curve for the specified profile, or the profile the user is
/// currently in if profile == None. Will also activate the fan curve.
#[inline]
fn set_fan_curve(&self, profile: Profile, curve: CurveData) -> zbus::Result<()>;
/// Reset the stored (self) and device curve to the defaults of the platform.
///
/// Each platform_profile has a different default and the defualt can be read
/// only for the currently active profile.
#[inline]
fn set_active_curve_to_defaults(&self) -> zbus::Result<()>;
/// Reset the stored (self) and device curve to the defaults of the platform.
///
/// Each platform_profile has a different default and the defualt can be read
/// only for the currently active profile.
#[inline]
fn reset_profile_curves(&self, profile: Profile) -> zbus::fdo::Result<()>;
/// NotifyProfile signal
#[inline]
#[dbus_proxy(signal)]
async fn notify_profile(&self, profile: Profile) -> zbus::Result<Profile>;
}

View File

@@ -28,5 +28,6 @@ use zbus_macros::dbus_proxy;
)]
trait Supported {
/// SupportedFunctions method
#[inline]
fn supported_functions(&self) -> zbus::Result<SupportedFunctions>;
}