Commit Graph

10 Commits

Author SHA1 Message Date
Lephe 291c3cef17
cpg: restore overclock settings when leaving 2022-05-16 20:13:13 +01:00
Lephe b942bc5d19
clock: add overclock support on fx-CG 10/20/50 2022-05-15 19:20:14 +01:00
Lephe 0c2935055e
cpg: provide a function to recompute clock frequency 2022-04-15 21:08:37 +01:00
Lephe 10180d31bc
add C++ header guards 2021-06-13 18:13:09 +02:00
Lephe 95dbec17ab
cpu: allow functions to block the sleep() function
This change introduces new sleep_block() and sleep_unblock() functions
that control whether the sleep() function actually sleeps. This type of
behavior was already implemented in the DMA driver, since DMA access to
on-chip memory is paused when sleeping (on-chip memory being paused
itself), which would make waiting for a DMA transfer a freeze.

Because DMA transfers are now asynchronous, and USB transfers that may
involve on-chip memory are coming, this API change allows the DMA and
USB drivers to block the sleep() function so that user code can sleep()
for interrupts without having to worry about asynchronous tasks
requiring on-chip memory to complete.
2021-05-12 09:17:25 +02:00
Lephe 8ff7d89d33
cpg, tmu: add spin waiting and spin delay functions for drivers
This change adds a new TMU function timer_spinwait() which waits for a
timer to raise its UNF flag. This makes it possible to wait even when
interrupts are disabled.

This is used by the new CPG function sleep_us_spin() which waits for a
given delay without using interrupts. This is currently used in SPU
initialization.
2020-10-21 14:49:34 +02:00
Lephe dc83d5ee1f
timer: final iteration on the API
This commit minimally changes the signature of timer_setup() to greatly
simplify timer management, allowing to user to let the library choose
available timers dynamically depending on the settings.
2020-06-20 22:45:46 +02:00
lephe 3f7c0a04ad way too much, including bopti/topti, timers, and more. 2019-02-21 21:00:26 +01:00
lephe 298338f633 More timers, RTC, basic overclock-resistant keyboard, CPG, PFC, driver levels. 2018-08-19 17:11:37 +02:00
lephe 2f0e049c33 More interrupt system, exceptions, timers. 2018-08-01 20:41:36 +02:00