Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ jobs:
fail-fast: false
matrix:
commit: ${{ fromJSON(needs.commit_list.outputs.commits) }}
msrv: ["1.79"] # We're relying on namespaced-features, which
msrv: ["1.84"] # We're relying on namespaced-features, which
# was released in 1.60
#
# We also depend on `fixed' which requires rust
Expand Down
10 changes: 10 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,16 @@ impl BootableRegionDescriptors {
)
.unwrap()
}

/// Get descriptor for a specific app slot
pub fn get_app_at_slot(&self, app_slot: u32) -> Result<AppImageDescriptor, ParseError> {
if app_slot >= self.header.num_app_slots {
return Err(ParseError::InvalidAppSlot);
}

// can't fail as BootableRegionDescriptors only constructs if all app descriptors are valid
AppImageDescriptor::from_region(self.header.app_descriptor_base_address as *const u32, app_slot)
}
}

impl BootableRegionDescriptorHeader {
Expand Down