-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Adding Basic RTC API #5097
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
base: main
Are you sure you want to change the base?
Adding Basic RTC API #5097
Conversation
|
Unfortunately I don't think we should do this. It's not embassy-stm32's job to define traits for abstracting over different RTC hardware. An RTC trait is something that could go in the |
Do you mean the embassy-hal-internal directory? I could implement it the way you are suggesting |
|
No, embedded-hal |
|
I meant In general the Embassy project doesn't define traits for abstracting things because they're an "ecosystem-wide" concern. If Embassy defines its own trait and implements it on its HALs, it's not very useful because you still can use it with Embassy only, other non-Embassy HALs won't implement it. If the trait is in I'm not sure how easy it'll be to add an RTC trait to |
I'll talk to the team to see if that's worth pursuing. We are trying to add some APIs that we could use in the future, but what you are saying makes sense to me. |
Add Hardware Agnostic RTC API with unit testing.
The API is being used by examples/smt32wba6/src/bin/rtc.rs
Unit tests added: