SCSI support: ROG Arion external drive LED control

This commit is contained in:
Luke D. Jones
2024-12-21 20:35:51 +13:00
parent 19ffcf3376
commit 0f2d89858e
24 changed files with 1393 additions and 172 deletions

View File

@@ -13,6 +13,7 @@ description = "dbus interface methods for asusctl"
asusd = { path = "../asusd" }
rog_anime = { path = "../rog-anime", features = ["dbus"] }
rog_slash = { path = "../rog-slash", features = ["dbus"] }
rog_scsi = { path = "../rog-scsi", features = ["dbus"] }
rog_aura = { path = "../rog-aura" }
rog_profiles = { path = "../rog-profiles" }
rog_platform = { path = "../rog-platform" }

View File

@@ -1,5 +1,6 @@
pub use asusd::{DBUS_IFACE, DBUS_NAME, DBUS_PATH};
pub mod scsi_aura;
pub mod zbus_anime;
pub mod zbus_aura;
pub mod zbus_fan_curves;

56
rog-dbus/src/scsi_aura.rs Normal file
View File

@@ -0,0 +1,56 @@
//! # D-Bus interface proxy for: `org.asuslinux.ScsiAura`
//!
//! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection
//! data. Source: `Interface '/org/asuslinux/M3D0AP048745_scsi' from service
//! 'org.asuslinux.Daemon' on system bus`.
//!
//! You may prefer to adapt it, instead of using it verbatim.
//!
//! More information can be found in the [Writing a client proxy] section of the
//! zbus documentation.
//!
//! This type implements the [D-Bus standard interfaces],
//! (`org.freedesktop.DBus.*`) for which the following zbus API can be used:
//!
//! * [`zbus::fdo::PeerProxy`]
//! * [`zbus::fdo::PropertiesProxy`]
//! * [`zbus::fdo::IntrospectableProxy`]
//!
//! Consequently `zbus-xmlgen` did not generate code for the above interfaces.
//!
//! [Writing a client proxy]: https://dbus2.github.io/zbus/client.html
//! [D-Bus standard interfaces]: https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces,
use rog_scsi::{AuraEffect, AuraMode};
use zbus::proxy;
#[proxy(
interface = "org.asuslinux.ScsiAura",
default_service = "org.asuslinux.Daemon",
default_path = "/org/asuslinux"
)]
pub trait ScsiAura {
/// AllModeData method
#[allow(clippy::type_complexity)]
fn all_mode_data(&self) -> zbus::Result<std::collections::HashMap<AuraMode, AuraEffect>>;
/// DeviceType property
#[zbus(property)]
fn device_type(&self) -> zbus::Result<u32>;
/// Enabled property
#[zbus(property)]
fn enabled(&self) -> zbus::Result<bool>;
#[zbus(property)]
fn set_enabled(&self, value: bool) -> zbus::Result<()>;
/// LedMode property
#[zbus(property)]
fn led_mode(&self) -> zbus::Result<u8>;
#[zbus(property)]
fn set_led_mode(&self, mode: AuraMode) -> zbus::Result<()>;
/// LedModeData property
#[zbus(property)]
fn led_mode_data(&self) -> zbus::Result<AuraEffect>;
#[zbus(property)]
fn set_led_mode_data(&self, effect: AuraEffect) -> zbus::Result<()>;
}