MCPcopy Index your code
hub / github.com/FrameworkComputer/framework-system / get_gpio

Method get_gpio

framework_lib/src/chromium_ec/mod.rs:1782–1791  ·  view source on GitHub ↗
(&self, name: &str)

Source from the content-addressed store, hash-verified

1780 Ok(())
1781 }
1782 pub fn get_gpio(&self, name: &str) -> EcResult<bool> {
1783 const MAX_LEN: usize = 32;
1784 let mut request = EcRequestGpioGetV0 { name: [0; MAX_LEN] };
1785
1786 let end = MAX_LEN.min(name.len());
1787 request.name[..end].copy_from_slice(&name.as_bytes()[..end]);
1788
1789 let res = request.send_command(self)?;
1790 Ok(res.val == 1)
1791 }
1792
1793 pub fn get_all_gpios(&self) -> EcResult<u8> {
1794 let res = EcRequestGpioGetV1Count {

Callers 3

set_gpu_descriptorMethod · 0.80
run_with_argsFunction · 0.80

Calls 1

send_commandMethod · 0.45

Tested by

no test coverage detected