-
Notifications
You must be signed in to change notification settings - Fork 254
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
Create safe wrappers for some ROM functions in the rom
module
#1290
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whilst you're touching these pieces, could you fix the transmute in esp32s3's CPU control?
We transmute an address to call ets_set_appcpu_boot_addr
- we should just put this in the rom-functions.x linker script instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Much cleaner this way. I left 2 suggestion that can totally be ignored.
@SergioGasquez thanks, but there is so much cleanup that needs to be done in some of these modules I'm not going to worry about that stuff right now 😁 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
7aa8461
to
70d44e7
Compare
…rs#1290) * Create safe wrappers for some ROM functions in the `rom` module * Replace transmute in ESP32-S3's `cpu_control` module with ROM function * Inline *all* the things! * Remove duplicate of `rom::regi2c_write` with ROM function
The idea here is basically to provide consistent APIs (as consistent as possible, as least) for our ROM functions, contained within the
rom
module. Rather than having a bunch of externs and unsafe blocks throughout our drivers, we can simply define safe wrappers within this module.There are still some lingering
extern "C" {}
blocks in the code base, but they're generally pretty specific to a peripheral and chip, so I've left them for now.(Some unrelated cleanup got mixed in here, sorry for the noise)