atkacpi

package
v1.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DevsHardwareCtrl       uint32 = 0x00100021
	DevsBatteryChargeLimit uint32 = 0x00120057
	DevsThrottleCtrl       uint32 = 0x00120075
	DevsCPUFanCurve        uint32 = 0x00110024
	DevsGPUFanCurve        uint32 = 0x00110025
	DstsDefaultCPUFanCurve uint32 = 0x00110024
	DstsDefaultGPUFanCurve uint32 = 0x00110025
	DstsCurrentCPUFanSpeed uint32 = 0x00110013
	DstsCurrentGPUFanSpeed uint32 = 0x00110014
	DstsCheckCharger       uint32 = 0x0012006c
)

Defines the IIA0 argument (big endian for readability) golang: this is not ergonomic *face palm*

Variables

This section is empty.

Functions

func NewACPIListener

func NewACPIListener(haltCtx context.Context, eventCh chan uint32) error

NewACPIListener will query WMI directly and return acpi events to the channel

Types

type Method

type Method uint32

Method defines the WMI method IDs

const (
	DSTS Method = 0x53545344
	DEVS Method = 0x53564544
	INIT Method = 0x54494e49
	BSTS Method = 0x53545342 // returns 0 on G14
	SFUN Method = 0x4e554653
)

Defines the WMI method IDs (big endian for readability) golang: this is not ergonomic *face palm*

type WMI

type WMI interface {
	// Evaluate will pass through the buffer (little endian) to the WMI method
	Evaluate(id Method, args []byte) ([]byte, error)
	// Close will close the underlying IO to the hardware
	Close() error
}

WMI is for evaluating WMI methods

func NewWMI

func NewWMI(dryRun bool) (WMI, error)

NewWMI returns an WMI for evaluating WMI methods exposed by the ATKD ACPI device

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL