-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4bfb52f
commit 2808fdb
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
use std::ffi::c_int; | ||
|
||
use bytemuck::{Pod, Zeroable}; | ||
|
||
use crate::{ec_command::ec_command_bytemuck, EcCmdResult}; | ||
|
||
use super::CrosEcCmd; | ||
|
||
#[repr(C, packed)] | ||
#[derive(Pod, Zeroable, Clone, Copy, Debug)] | ||
pub struct EcResponseFpStats { | ||
pub capture_time_us: u32, | ||
pub matching_time_us: u32, | ||
pub overall_time_us: u32, | ||
pub overall_t0: OverallT0, | ||
pub timestamps_invalid: u8, | ||
pub template_matched: i8, | ||
} | ||
|
||
#[repr(C, packed)] | ||
#[derive(Pod, Zeroable, Clone, Copy, Debug)] | ||
pub struct OverallT0 { | ||
pub lo: u32, | ||
pub hi: u32, | ||
} | ||
|
||
pub fn fp_stats(fd: c_int) -> EcCmdResult<EcResponseFpStats> { | ||
ec_command_bytemuck(CrosEcCmd::FpStats, 0, &(), fd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters