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

Deduplicate SoC/arch-specific task switching related code #284

Merged
merged 4 commits into from
Oct 13, 2023

Conversation

bugadani
Copy link
Contributor

@bugadani bugadani commented Oct 12, 2023

Github handles moved files a bit funnily but I can't do much about that. This PR extract the architecture-common parts out of the old timer_*.rs files, moves those timer files into a folder. These files still do more than just timer-related setup and interrupt handling, but I didn't actually want to change how the big picture looks.

I un-public-ed some modules that were hidden. I'm not sure if some dependency relied on these modules being public, but hidden docs usually indicate that is not an intended use.

@bugadani bugadani changed the title Deduplicate task switching related code Deduplicate SoC/arch-specific task switching related code Oct 12, 2023
@bugadani bugadani marked this pull request as draft October 12, 2023 13:46
@bugadani bugadani force-pushed the cleanup branch 2 times, most recently from 7d0733d to ecc8f74 Compare October 12, 2023 14:07
@bugadani bugadani marked this pull request as ready for review October 12, 2023 16:24
@bjoernQ
Copy link
Contributor

bjoernQ commented Oct 13, 2023

Looks good! I also meant to do some cleanup there but never got to it

There are however some unused imports - e.g.

warning: unused imports: `Alarm`, `Periodic`, `SystemTimer`, `Target`, `riscv`, `self`
 --> esp-wifi\src\timer\timer_esp32c3.rs:5:23
  |
5 |         peripherals::{self, Interrupt},
  |                       ^^^^
6 |         prelude::*,
7 |         riscv,
  |         ^^^^^
8 |         systimer::{Alarm, Periodic, SystemTimer, Target},
  |                    ^^^^^  ^^^^^^^^  ^^^^^^^^^^^  ^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `binary`
 --> esp-wifi\src\timer\riscv.rs:6:5
  |
6 |     binary,
  |     ^^^^^^


warning: unused imports: `TIMG1`, `Timer0`, `Timer`
 --> esp-wifi\src\timer\timer_esp32.rs:4:25
  |
4 |     peripherals::{self, TIMG1},
  |                         ^^^^^
5 |     timer::{Timer, Timer0},
  |             ^^^^^  ^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

@bugadani bugadani force-pushed the cleanup branch 7 times, most recently from efcb954 to c48c69d Compare October 13, 2023 09:09
Copy link
Contributor

@bjoernQ bjoernQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Thanks!

@bjoernQ bjoernQ merged commit 887eb22 into esp-rs:main Oct 13, 2023
@bugadani bugadani deleted the cleanup branch October 13, 2023 10:42
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