mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-30 14:35:17 -04:00
Implement LP0-Entry BPMP Firmware
This commit is contained in:
parent
f7598cb433
commit
5370c7b150
12 changed files with 510 additions and 0 deletions
15
exosphere/bpmpfw/src/timer.h
Normal file
15
exosphere/bpmpfw/src/timer.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef EXOSPHERE_BPMPFW_TIMER_H
|
||||
#define EXOSPHERE_BPMPFW_TIMER_H
|
||||
|
||||
#define TIMERUS_CNTR_1US_0 (*((volatile uint32_t *)(0x60005010)))
|
||||
|
||||
static inline void timer_wait(uint32_t microseconds) {
|
||||
uint32_t old_time = TIMERUS_CNTR_1US_0;
|
||||
while (TIMERUS_CNTR_1US_0 - old_time <= microseconds) {
|
||||
/* Spin-lock. */
|
||||
}
|
||||
}
|
||||
|
||||
void spinlock_wait(uint32_t count);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue