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

Function parse_pd_ver

framework_lib/src/power.rs:1011–1026  ·  view source on GitHub ↗
(data: &[u8; 8])

Source from the content-addressed store, hash-verified

1009 ])
1010}
1011fn parse_pd_ver(data: &[u8; 8]) -> ControllerVersion {
1012 ControllerVersion {
1013 base: BaseVersion {
1014 major: (data[3] >> 4) & 0xF,
1015 minor: (data[3]) & 0xF,
1016 patch: data[2],
1017 build_number: u16::from_le_bytes([data[0], data[1]]),
1018 },
1019 app: AppVersion {
1020 application: Application::Notebook,
1021 major: (data[7] >> 4) & 0xF,
1022 minor: (data[7]) & 0xF,
1023 circuit: data[6],
1024 },
1025 }
1026}
1027
1028// NOTE: TGL (hx20) does not have this host command
1029pub fn read_pd_version(ec: &CrosEc) -> EcResult<MainPdVersions> {

Callers 2

parse_pd_ver_sliceFunction · 0.85
read_pd_versionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected