raw_acpi/sbst.rs
1use crate::SDTHeader;
2
3#[derive(Copy, Clone)]
4#[repr(C, packed)]
5/// ## Smart Battery Table (SBST)
6///
7/// If the platform supports batteries as defined by the Smart Battery Specification 1.0 or 1.1, then an Smart Battery Table (SBST) is present.
8/// This table indicates the energy level trip points that the platform requires for placing the system into the specified sleeping state
9/// and the suggested energy levels for warning the user to transition the platform into a sleeping state.
10///
11/// Notice that while Smart Batteries can report either in current (mA/mAh) or in energy (mW/mWh),
12/// OSPM must set them to operate in energy (mW/mWh) mode so that the energy levels specified in the SBST can be used.
13///
14/// OSPM uses these tables with the capabilities of the batteries to determine the different trip points.
15pub struct SmartBatteryTable {
16 /// - **Signature** - "SBST"
17 pub header: SDTHeader,
18 /// OEM suggested energy level in milliWatt-hours (mWh) at which OSPM warns the user.
19 pub warning_evergy_level: u32,
20 /// OEM suggested platform energy level in mWh at which OSPM will transition the system to a sleeping state.
21 pub low_energy_level: u32,
22 /// OEM suggested platform energy level in mWh at which OSPM performs an emergency shutdown.
23 pub critical_energy_level: u32,
24}