Files
javier 91783deb7b
CI / Build & test (macOS) (push) Has been cancelled
CI / Embedded Swift cross-compile (push) Has been cancelled
Documentation / deploy (push) Has been cancelled
Added missing documentation to the source code in the Playdate bindings target.
2026-07-25 12:55:53 +02:00

17 lines
683 B
Swift

internal import CPlaydate
extension System {
/// Battery and power supply state.
public struct PowerStatus: OptionSet, Sendable {
public let rawValue: UInt32
public init(rawValue: UInt32) { self.rawValue = rawValue }
/// The battery is charging.
public static let charging = PowerStatus(rawValue: UInt32(kPDPowerStatusCharging.rawValue))
/// Power is supplied over USB.
public static let usb = PowerStatus(rawValue: UInt32(kPDPowerStatusUsb.rawValue))
/// Power is supplied through the accessory screw terminals.
public static let screws = PowerStatus(rawValue: UInt32(kPDPowerStatusScrews.rawValue))
}
}