-
Notifications
You must be signed in to change notification settings - Fork 280
Add initial ADC/GPIO implementation for ESP32-H2 #494
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
Add initial ADC/GPIO implementation for ESP32-H2 #494
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.
Code looks good to me! Cannot verify it on hardware currently
This adds ADC but not the adc-example? Not a problem - just curious |
I'll verify on real HW tomorrow (I don't have H2 with me at the moment :D ) |
9311f58
to
9dab674
Compare
@bjoernQ fair enough, that's been reverted. Not sure why I changed it in the first place TBH 🤷🏻♂️ ADC stuff is just sort of intermingled with the GPIO stuff, so I included those bits. Didn't test or anything, guess I could remove it but I think it's fine to include for 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.
LGTM, both examples (hello_world
and blinky
) work on real H2 chip correctly.
We have some warnings
warning: unused variable: `system`
--> /home/ubuntu/esp-hal/esp-hal-common/src/system.rs:502:13
|
502 | let system = unsafe { &*SystemPeripheral::PTR };
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_system`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `peripheral`
--> /home/ubuntu/esp-hal/esp-hal-common/src/system.rs:501:30
|
501 | pub fn enable(&mut self, peripheral: Peripheral) {
| ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_peripheral`
warning: `esp-hal-common` (lib) generated 2 warnings (run `cargo fix --lib -p esp-hal-common` to apply 2 suggestions)
warning: unused variable: `clocks`
--> examples/hello_world.rs:17:9
|
17 | let clocks = ClockControl::configure(system.clock_control, CpuClock::Clock96MHz).freeze();
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_clocks`
but I guess we will clear them along the way.
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! Can't test, but the code looks fine to me.
* Add `esp32h2-hal` package to the VS Code workspace and CI workflow * Add initial (not quite complete) implementation of GPIO/ADC for ESP32-H2
* Add `esp32h2-hal` package to the VS Code workspace and CI workflow * Add initial (not quite complete) implementation of GPIO/ADC for ESP32-H2
* Add `esp32h2-hal` package to the VS Code workspace and CI workflow * Add initial (not quite complete) implementation of GPIO/ADC for ESP32-H2
* Add `esp32h2-hal` package to the VS Code workspace and CI workflow * Add initial (not quite complete) implementation of GPIO/ADC for ESP32-H2
@SergioGasquez was able to test and verify the example on hardware for me. Still need the AF signals and what not, but gives us a base to build off of at least.
(A passing CI run can be found here)