mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-30 14:35:17 -04:00
Add some more MMIO, smcCpuOn
This commit is contained in:
parent
5c24f58402
commit
a800c3c2e7
10 changed files with 204 additions and 3 deletions
18
exosphere/timers.c
Normal file
18
exosphere/timers.c
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "timers.h"
|
||||
|
||||
volatile void *g_timer_registers = NULL;
|
||||
|
||||
void set_timer_address(void *timer_base) {
|
||||
g_timer_registers = timer_base;
|
||||
}
|
||||
|
||||
inline void *get_timer_address(void) {
|
||||
return g_timer_registers;
|
||||
}
|
||||
|
||||
void wait(uint32_t microseconds) {
|
||||
uint32_t old_time = TIMERUS_CNTR_1US_0;
|
||||
while (TIMERUS_CNTR_1US_0 - old_time <= result) {
|
||||
/* Spin-lock. */
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue