acpi_tables: aml: Implement Aml::append_aml_bytes() for Io

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2021-11-03 14:29:05 +00:00
parent 6c181061df
commit 7ad83f1daa

View File

@ -494,16 +494,14 @@ impl Io {
}
impl Aml for Io {
fn to_aml_bytes(&self) -> Vec<u8> {
let mut bytes = vec![0x47]; /* Io Port Descriptor */
fn append_aml_bytes(&self, bytes: &mut Vec<u8>) {
bytes.push(0x47); /* Io Port Descriptor */
bytes.push(1); /* IODecode16 */
bytes.append(&mut self.min.to_le_bytes().to_vec());
bytes.append(&mut self.max.to_le_bytes().to_vec());
bytes.push(self.alignment);
bytes.push(self.length);
bytes
}
}