Crate ectool[−][src]
Library for accessing System76 ECs
First, construct an access method, using an object implementing the Access
trait. Next, an Ec
object can be contructed, which exposes the command interface.
There are some differences between targets and features that are listed below:
AccessHid
requires thehidapi
feature. Only functional on USB ECs.AccessLpcDirect
requires theredox_hwio
feature and a nightly compiler. This method is only recommended for use in firmware with LPC ECs, as mutual exclusion is not guaranteed.AccessLpcLinux
requires thestd
feature andlinux
target_os. Recommended for LPC ECs, as this method can utilize mutual exclusion.EcLegacy
,Pmc
, andSuperIo
all require theredox_hwio
feature and a nightly compiler. It is only recommended to use these in firmware, as mutual exclusion is not guaranteed.
Macros
timeout |
Structs
AccessHid | Use USB HID access, only for USB ECs |
AccessLpcDirect | Use direct hardware access. Unsafe due to not having mutual exclusion |
AccessLpcLinux | Use /dev/port access with file locking |
AccessLpcSim | |
Ec | Run EC commands using a provided access method |
EcLegacy | Run some EC commands on previous proprietary firmware |
Firmware | Parses firmware information from a firmware ROM |
Pmc | Standard ACPI EC interface |
SpiRom | SPI ROM transactions |
StdTimeout | Timeout implemented using std::time |
SuperIo | Super I/O interface provided by LPC ECs |
Enums
Error | Errors returned by operations |
SpiTarget | Target which will receive SPI commands |
Traits
Access | Access method for running an EC command |
Spi | SPI bus transactions |
Timeout | Timeout for use in blocking operations |