Skip to content

Commit

Permalink
additional feedback from Matt
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron-Hartwig committed May 20, 2024
1 parent 88794ca commit e3a5ae6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions build/fpga-regmap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,7 @@ fn write_reg_fields(
writeln!(
output,
"
{prefix} use zerocopy::AsBytes;
{prefix} #[derive(Copy, Clone, Eq, PartialEq, AsBytes)]
{prefix} #[repr(C)]
{prefix} #[derive(Copy, Clone, Eq, PartialEq)]
{prefix} #[allow(dead_code)]
{prefix} pub enum {encode_name} {{"
)
Expand Down
4 changes: 2 additions & 2 deletions drv/transceivers-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ impl ServerImpl {
// - SFF-8636 rev 2.10a, Section 6.2.4
Ok(Celsius(out.temperature.get() as f32 / 256.0))
} else {
Err(FpgaError::ImplError(status.error.as_bytes()[0]))
Err(FpgaError::ImplError(status.error as u8))
}
}

Expand Down Expand Up @@ -301,7 +301,7 @@ impl ServerImpl {
} else {
// TODO: how should we handle this?
// Right now, we'll retry on the next pass through the loop.
Err(FpgaError::ImplError(status.error.as_bytes()[0]))
Err(FpgaError::ImplError(status.error as u8))
}
}

Expand Down

0 comments on commit e3a5ae6

Please sign in to comment.