summary refs log tree commit diff
path: root/acpi_tables/src/lib.rs
blob: 73dd9e802a89175766f547b48149e28950c0852e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
// Copyright 2020 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

pub mod rsdp;
pub mod sdt;

fn generate_checksum(data: &[u8]) -> u8 {
    (255 - data.iter().fold(0u8, |acc, x| acc.wrapping_add(*x))).wrapping_add(1)
}