Skip to content

Commit

Permalink
Fix reading number of parameter headers for SFDP
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgreig committed Jan 20, 2021
1 parent 94d0f3c commit c370f2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ impl<'a, A: FlashAccess> Flash<'a, A> {

// Read just SFDP header to get NPH first.
let data = self.read_sfdp(0, 8)?;
let nph = data[5] as usize;
let nph = data[6] as usize + 1;

// Re-read overall SFDP header including parameter headers.
// Handle errors parsing the header by returning Ok(None),
Expand Down

0 comments on commit c370f2b

Please sign in to comment.