[−][src]Struct ectool::Ec
Run EC commands using a provided access method
Implementations
impl<A: Access> Ec<A>[src]
pub unsafe fn new(access: A) -> Result<Self, Error>[src]
Probes for a compatible EC
pub unsafe fn access(&mut self) -> &mut A[src]
Unsafe access to access
pub unsafe fn probe(&mut self) -> Result<u8, Error>[src]
Probe for EC
pub unsafe fn board(&mut self, data: &mut [u8]) -> Result<usize, Error>[src]
Read board from EC
pub unsafe fn version(&mut self, data: &mut [u8]) -> Result<usize, Error>[src]
Read version from EC
pub unsafe fn print(&mut self, data: &[u8]) -> Result<usize, Error>[src]
Print data to EC console
pub unsafe fn spi(
&mut self,
target: SpiTarget,
scratch: bool
) -> Result<EcSpi<'_, A>, Error>[src]
&mut self,
target: SpiTarget,
scratch: bool
) -> Result<EcSpi<'_, A>, Error>
Access EC SPI bus
pub unsafe fn reset(&mut self) -> Result<(), Error>[src]
Reset EC. Will also power off computer.
pub unsafe fn fan_get(&mut self, index: u8) -> Result<u8, Error>[src]
Read fan duty cycle by fan index
pub unsafe fn fan_set(&mut self, index: u8, duty: u8) -> Result<(), Error>[src]
Set fan duty cycle by fan index
pub unsafe fn keymap_get(
&mut self,
layer: u8,
output: u8,
input: u8
) -> Result<u16, Error>[src]
&mut self,
layer: u8,
output: u8,
input: u8
) -> Result<u16, Error>
Read keymap data by layout, output pin, and input pin
pub unsafe fn keymap_set(
&mut self,
layer: u8,
output: u8,
input: u8,
value: u16
) -> Result<(), Error>[src]
&mut self,
layer: u8,
output: u8,
input: u8,
value: u16
) -> Result<(), Error>
Set keymap data by layout, output pin, and input pin
Auto Trait Implementations
impl<A> RefUnwindSafe for Ec<A> where
A: RefUnwindSafe,
A: RefUnwindSafe,
impl<A> Send for Ec<A> where
A: Send,
A: Send,
impl<A> Sync for Ec<A> where
A: Sync,
A: Sync,
impl<A> Unpin for Ec<A> where
A: Unpin,
A: Unpin,
impl<A> UnwindSafe for Ec<A> where
A: UnwindSafe,
A: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,