tosc-rs / mnemos

An Operating System for Building Small Computers
https://mnemos.dev
Apache License 2.0
260 stars 18 forks source link

refac(D1): move spin delay from `ccu` to `clint` #305

Closed hawkw closed 10 months ago

hawkw commented 10 months ago

This branch addresses a minor TODO in the ccu module, by moving the spin delay function from the ccu module into a function on the Clint type. Additionally, I've removed the &self receiver from Clint::get_mtime, since we don't actually use the &self. This lets us change get_mtime to a free function, and therefore remove the unsafe calls to Clint::summon() in a few places, so we can get rid of a few unneeded unsafe blocks.