Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/efc: add API for read/erase/write flash #31

Draft
wants to merge 8 commits into
base: development
Choose a base branch
from

Conversation

tmplt
Copy link
Member

@tmplt tmplt commented Sep 17, 2022

No description provided.

@tmplt
Copy link
Member Author

tmplt commented Sep 17, 2022

CC @martinmortsell

@martinmortsell
Copy link
Contributor

All checks are finally passing.

Currently a user could generate multiple tokens for the same flash sector, I'm going to look into making sure that only one set of Sectors can be generated using the EFC singleton from the pac.

I am uncertain about the write_page method, in the past I've seen the compiler optimize away writes, but I have not managed to trigger that behaviour this time.

Apart from that, it would be nice to have better support for writing across multiple sectors, e.g. iterating across a subset of the sectors or similar.

@martinmortsell
Copy link
Contributor

I have basically rewritten the FLash API from scratch, as I found the embedded-storage crate which defines traits for flash transfers.
I'll look through the code tomorrow and see if I can break it somehow, but this is mostly ready for review now.

@tmplt
Copy link
Member Author

tmplt commented Aug 23, 2023

I suggest rebasing upon master, and some squashing, to simplify the review.

Add Erase Sector Method

Add Write Page Method

Add Write Word Method

Add Two Bootloader Examples
Update `efc.rs` Example

Add Flash Sector Tokens and read_word Funcitonality (WIP)

Add Erase Sector Method

Add Write Page Method

Add Write Word Method

Refractor Flash API, Move Sectors Struct Into Efc Struct

Update `efc.rs` Example

Fix Issues Causing `docs` Generation To Fail

Fix Clippy Lints

Fix Issues With `atsamv71_xult` Examples

Run `cargo fmt`

Run `cargo fmt` On Examples
Remove Dead Code

Conform To Clippy And Rusfmt

Update Examples

Update `CHANGELOG.md`

Run `fmt` On Examples
Add Doc Comment To CAPACITY const
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants