diff --git a/acpi_tables/src/aml.rs b/acpi_tables/src/aml.rs index 86710d065..e44c02cfc 100644 --- a/acpi_tables/src/aml.rs +++ b/acpi_tables/src/aml.rs @@ -7,6 +7,33 @@ pub trait Aml { fn to_bytes(&self) -> Vec; } +pub const ZERO: Zero = Zero {}; +pub struct Zero {} + +impl Aml for Zero { + fn to_bytes(&self) -> Vec { + vec![0u8] + } +} + +pub const ONE: One = One {}; +pub struct One {} + +impl Aml for One { + fn to_bytes(&self) -> Vec { + vec![1u8] + } +} + +pub const ONES: Ones = Ones {}; +pub struct Ones {} + +impl Aml for Ones { + fn to_bytes(&self) -> Vec { + vec![0xffu8] + } +} + pub struct Path { root: bool, name_parts: Vec<[u8; 4]>,