ch58x-hal
ch58x-hal copied to clipboard
Support current embedded stack versions
This PR updates all dependencies and makes the changes required for them to work, so new versions of embassy and related packages can be used.
- Rewrote the time driver as the upstream interface has changed
- Replaced .variant functions from svd2rust with .bits
- Replaced interrupt signatures with
#[qingke_rt::interrupt] - Removed unnecessary unsafe blocks
Only systick and gpio have currently been tested, with a ch583. Note that the risc32 embassy driver does not work properly with qingke chips without further changes which I'm working on for a future PR.
Ideally the .variant change can be reverted by adding enums to the svd files in ch32-rs.
Depends on https://github.com/ch32-rs/ch32-rs/pull/22
Note: The old time driver implementation had a potential race condition where the systick cmp value could end up set below cnt, which won't interrupt. I'm fairly sure other chXXX crates have similar issues.